/*!
 * Big-O Complexity Reference & Estimator — module CSS (e2z-boc- prefix).
 * Color scheme (spec): Primary #1E1B4B (deep indigo), Secondary #312E81,
 * Accent #FBBF24 (academic gold), BG #F5F3FF.
 * Scope: .e2z-tool-big-o-complexity-estimator (framework shortcode wrapper).
 */

.e2z-tool-big-o-complexity-estimator,
.e2z-tool-big-o-complexity-estimator *,
.e2z-tool-big-o-complexity-estimator *::before,
.e2z-tool-big-o-complexity-estimator *::after {
	box-sizing: border-box;
}

.e2z-tool-big-o-complexity-estimator .e2z-boc-container {
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	line-height: 1.5;
	color: #1E1B4B;
	width: 100%;
	margin: 0 auto;
	background: #F5F3FF;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(30, 27, 75, 0.12);
	overflow: hidden;
}

/* Monospace technical fields (Section F) */
.e2z-tool-big-o-complexity-estimator .e2z-boc-mono,
.e2z-tool-big-o-complexity-estimator .e2z-boc-notation,
.e2z-tool-big-o-complexity-estimator .e2z-boc-table td,
.e2z-tool-big-o-complexity-estimator .e2z-boc-step-math {
	font-family: 'SF Mono', 'Courier New', ui-monospace, Menlo, Consolas, monospace;
}

/* Header */
.e2z-tool-big-o-complexity-estimator .e2z-boc-header {
	padding: 24px 16px;
	background: linear-gradient(135deg, #312E81, #1E1B4B);
	color: #fff;
	text-align: center;
	border-bottom: 3px solid #FBBF24;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-title {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 4px;
	color: #fff;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-subtitle {
	font-size: 0.88rem;
	opacity: 0.82;
	margin: 0;
}

/* Tabs */
.e2z-tool-big-o-complexity-estimator .e2z-boc-tabs {
	display: flex;
	gap: 6px;
	padding: 12px 16px 0;
	background: #F5F3FF;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-tab {
	flex: 1;
	min-height: 46px;
	padding: 12px;
	border: 1px solid #DDD6FE;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	background: #EDE9FE;
	color: #4C1D95;
	font-family: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	cursor: pointer;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-tab-active {
	background: #1E1B4B;
	color: #FBBF24;
	border-color: #1E1B4B;
}

/* Layout */
.e2z-tool-big-o-complexity-estimator .e2z-boc-main-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 16px;
}
@media (min-width: 1024px) {
	.e2z-tool-big-o-complexity-estimator .e2z-boc-main-grid {
		flex-direction: row;
		align-items: flex-start;
	}
	.e2z-tool-big-o-complexity-estimator .e2z-boc-inputs-panel { flex: 2; }
	.e2z-tool-big-o-complexity-estimator .e2z-boc-results-panel { flex: 3; min-width: 380px; }
}

.e2z-tool-big-o-complexity-estimator .e2z-boc-inputs-panel,
.e2z-tool-big-o-complexity-estimator .e2z-boc-results-panel {
	background: #FFFFFF;
	border-radius: 12px;
	padding: 20px;
	border: 1px solid #DDD6FE;
	box-shadow: 0 2px 8px rgba(30, 27, 75, 0.05);
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-section-title {
	font-size: 1.2rem;
	font-weight: 600;
	color: #312E81;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #FEF3C7;
}

/* Fields */
.e2z-tool-big-o-complexity-estimator .e2z-boc-field,
.e2z-tool-big-o-complexity-estimator .e2z-boc-q {
	display: flex;
	flex-direction: column;
	margin-bottom: 14px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-label {
	font-size: 0.86rem;
	font-weight: 600;
	color: #4C1D95;
	margin-bottom: 5px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-hint {
	font-size: 0.74rem;
	color: #A5A0C4;
	margin-top: 5px;
	line-height: 1.4;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-input {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #C4B5FD;
	border-radius: 6px;
	font-size: 0.93rem;
	font-family: inherit;
	background: #fff;
	color: #1E1B4B;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-input:focus {
	outline: none;
	border-color: #FBBF24;
	box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.28);
}

/* Library list */
.e2z-tool-big-o-complexity-estimator .e2z-boc-list {
	max-height: 380px;
	overflow-y: auto;
	border: 1px solid #EDE9FE;
	border-radius: 8px;
	padding: 6px;
	margin-bottom: 12px;
	background: #FAFAFF;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-item {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 9px 8px;
	min-height: 44px;
	border-radius: 6px;
	cursor: pointer;
	border-bottom: 1px solid #F5F3FF;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-item:hover { background: #EDE9FE; }
.e2z-tool-big-o-complexity-estimator .e2z-boc-item-active { background: #DDD6FE; }
.e2z-tool-big-o-complexity-estimator .e2z-boc-item input {
	width: 18px;
	height: 18px;
	accent-color: #FBBF24;
	cursor: pointer;
	flex-shrink: 0;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-item-name {
	flex: 1;
	font-size: 0.86rem;
	font-weight: 500;
	color: #312E81;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-item-avg {
	font-size: 0.78rem;
	font-weight: 700;
	color: #92400E;
	background: #FEF3C7;
	padding: 2px 7px;
	border-radius: 999px;
	font-family: 'SF Mono', 'Courier New', monospace;
	white-space: nowrap;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-cat-head {
	font-size: 0.72rem;
	font-weight: 800;
	color: #6D28D9;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	padding: 10px 8px 5px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-no-results {
	padding: 18px;
	text-align: center;
	color: #A5A0C4;
	font-size: 0.86rem;
}

/* Buttons */
.e2z-tool-big-o-complexity-estimator .e2z-boc-compare-btn,
.e2z-tool-big-o-complexity-estimator .e2z-boc-estimate-btn {
	width: 100%;
	min-height: 48px;
	padding: 13px;
	border: none;
	border-radius: 8px;
	background: #1E1B4B;
	color: #FBBF24;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: filter 0.15s ease;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-compare-btn:hover,
.e2z-tool-big-o-complexity-estimator .e2z-boc-estimate-btn:hover { filter: brightness(1.7); }
.e2z-tool-big-o-complexity-estimator .e2z-boc-estimate-btn:focus-visible,
.e2z-tool-big-o-complexity-estimator .e2z-boc-compare-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.55);
}

/* Results */
.e2z-tool-big-o-complexity-estimator .e2z-boc-empty-state {
	padding: 24px;
	text-align: center;
	color: #6B7280;
	background: #FAFAFF;
	border-radius: 8px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-hero {
	border-radius: 10px;
	padding: 16px;
	text-align: center;
	margin-bottom: 14px;
	background: #1E1B4B;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-hero-label {
	font-size: 0.83rem;
	font-weight: 600;
	color: #C4B5FD;
	margin: 0;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-notation {
	font-size: 2rem;
	font-weight: 800;
	margin: 6px 0;
	line-height: 1.1;
	color: #FBBF24;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-result-block {
	background: #FAFAFF;
	border: 1px solid #EDE9FE;
	border-radius: 10px;
	padding: 14px;
	margin-bottom: 12px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-result-block h3 {
	font-size: 1rem;
	color: #1E1B4B;
	margin: 0 0 10px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
	gap: 10px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-stat {
	background: #fff;
	border: 1px solid #EDE9FE;
	border-radius: 8px;
	padding: 10px;
	text-align: center;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-stat-label {
	font-size: 0.71rem;
	font-weight: 600;
	color: #6D28D9;
	margin: 0 0 3px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-stat-value {
	font-size: 1rem;
	font-weight: 700;
	color: #1E1B4B;
	margin: 0;
	font-family: 'SF Mono', 'Courier New', monospace;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-stat-gold .e2z-boc-stat-value { color: #B45309; }

/* Reasoning steps */
.e2z-tool-big-o-complexity-estimator .e2z-boc-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: e2z-boc-step;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-steps li {
	position: relative;
	padding: 10px 10px 10px 42px;
	margin-bottom: 8px;
	background: #fff;
	border: 1px solid #EDE9FE;
	border-left: 3px solid #FBBF24;
	border-radius: 8px;
	font-size: 0.86rem;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-steps li::before {
	counter-increment: e2z-boc-step;
	content: counter(e2z-boc-step);
	position: absolute;
	left: 10px;
	top: 10px;
	width: 22px;
	height: 22px;
	background: #1E1B4B;
	color: #FBBF24;
	border-radius: 50%;
	font-size: 0.75rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-step-math {
	display: block;
	margin-top: 4px;
	font-size: 0.82rem;
	color: #6D28D9;
	background: #F5F3FF;
	padding: 4px 7px;
	border-radius: 4px;
}

/* Table */
.e2z-tool-big-o-complexity-estimator .e2z-boc-table-wrap { width: 100%; overflow-x: auto; }
.e2z-tool-big-o-complexity-estimator .e2z-boc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.81rem;
	background: #fff;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-table th {
	background: #1E1B4B;
	color: #FBBF24;
	padding: 8px;
	text-align: center;
	font-weight: 600;
	white-space: nowrap;
	font-family: 'Inter', system-ui, sans-serif;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-table td {
	padding: 7px 8px;
	text-align: center;
	border-bottom: 1px solid #F5F3FF;
	white-space: nowrap;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-table td:first-child {
	text-align: left;
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 600;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-best { background: #ECFDF5; color: #065F46; font-weight: 700; }

.e2z-tool-big-o-complexity-estimator .e2z-boc-note {
	font-size: 0.84rem;
	margin: 8px 0 0;
	padding: 9px 11px;
	border-radius: 6px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-note-info { background: #FFFBEB; color: #92400E; border-left: 3px solid #FBBF24; }
.e2z-tool-big-o-complexity-estimator .e2z-boc-note-error { background: #FEF2F2; color: #991B1B; border-left: 3px solid #DC2626; }

/* Chart */
.e2z-tool-big-o-complexity-estimator .e2z-boc-chart-title {
	font-size: 0.95rem;
	color: #312E81;
	margin: 18px 0 8px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-chart-wrap svg {
	width: 100%;
	height: auto;
	background: #FAFAFF;
	border: 1px solid #EDE9FE;
	border-radius: 10px;
}

/* Export */
.e2z-tool-big-o-complexity-estimator .e2z-boc-export-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 12px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-print-btn,
.e2z-tool-big-o-complexity-estimator .e2z-boc-copy-btn {
	flex: 1;
	min-height: 44px;
	padding: 11px;
	border: none;
	border-radius: 8px;
	color: #fff;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.e2z-tool-big-o-complexity-estimator .e2z-boc-print-btn { background: #312E81; }
.e2z-tool-big-o-complexity-estimator .e2z-boc-copy-btn { background: #1E1B4B; }
.e2z-tool-big-o-complexity-estimator .e2z-boc-print-btn:hover,
.e2z-tool-big-o-complexity-estimator .e2z-boc-copy-btn:hover { filter: brightness(1.5); }

.e2z-tool-big-o-complexity-estimator .e2z-boc-disclaimer {
	font-size: 0.75rem;
	color: #A5A0C4;
	margin: 12px 0 0;
	line-height: 1.45;
}

.e2z-tool-big-o-complexity-estimator .e2z-boc-hidden { display: none !important; }

/* Responsive */
@media (max-width: 480px) {
	.e2z-tool-big-o-complexity-estimator .e2z-boc-title { font-size: 1.3rem; }
	.e2z-tool-big-o-complexity-estimator .e2z-boc-notation { font-size: 1.55rem; }
	.e2z-tool-big-o-complexity-estimator .e2z-boc-inputs-panel,
	.e2z-tool-big-o-complexity-estimator .e2z-boc-results-panel { padding: 14px; }
	.e2z-tool-big-o-complexity-estimator .e2z-boc-tab { font-size: 0.8rem; padding: 10px 6px; }
}
@media (max-width: 360px) {
	.e2z-tool-big-o-complexity-estimator .e2z-boc-header { padding: 16px 10px; }
	.e2z-tool-big-o-complexity-estimator .e2z-boc-title { font-size: 1.12rem; }
	.e2z-tool-big-o-complexity-estimator .e2z-boc-item-avg { font-size: 0.7rem; }
}
