/*!
 * Engineering Unit Calculator — module CSS (e2z-euc- prefix).
 * Color scheme (spec): Primary #0F172A (universal slate), Secondary #1E293B,
 * Accent #0EA5E9 (sky), BG #F8FAFC.
 * Scope: .e2z-tool-engineering-unit-calculator (framework shortcode wrapper).
 */

.e2z-tool-engineering-unit-calculator,
.e2z-tool-engineering-unit-calculator *,
.e2z-tool-engineering-unit-calculator *::before,
.e2z-tool-engineering-unit-calculator *::after {
	box-sizing: border-box;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-container {
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	line-height: 1.5;
	color: #0F172A;
	width: 100%;
	margin: 0 auto;
	background: #F8FAFC;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
	overflow: hidden;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-mono,
.e2z-tool-engineering-unit-calculator .e2z-euc-factor-bar,
.e2z-tool-engineering-unit-calculator .e2z-euc-table td {
	font-family: 'SF Mono', 'Courier New', ui-monospace, Menlo, Consolas, monospace;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-header {
	padding: 22px 16px;
	background: linear-gradient(135deg, #0F172A, #1E293B);
	color: #fff;
	text-align: center;
	border-bottom: 3px solid #0EA5E9;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-title {
	font-size: 1.45rem;
	font-weight: 700;
	margin: 0 0 4px;
	color: #fff;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-subtitle {
	font-size: 0.82rem;
	opacity: 0.85;
	margin: 0;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-body {
	padding: 16px;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 12px;
	flex: 1;
	min-width: 140px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-row .e2z-euc-field { margin-bottom: 0; }
.e2z-tool-engineering-unit-calculator .e2z-euc-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #334155;
	margin-bottom: 4px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-hint {
	font-size: 0.75rem;
	color: #94A3B8;
	margin: 0 0 10px;
	line-height: 1.45;
	display: block;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-input {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #E2E8F0;
	border-radius: 6px;
	font-size: 0.95rem;
	background: #fff;
	color: #0F172A;
	font-family: inherit;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-input:focus {
	outline: none;
	border-color: #0EA5E9;
	box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}
.e2z-tool-engineering-unit-calculator .e2z-euc-cat-field { max-width: 420px; }

/* Convert row — the simple surface */
.e2z-tool-engineering-unit-calculator .e2z-euc-convert-row {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-box {
	flex: 1;
	min-width: 240px;
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-box .e2z-euc-label { margin-bottom: 0; }
.e2z-tool-engineering-unit-calculator .e2z-euc-from-val,
.e2z-tool-engineering-unit-calculator .e2z-euc-to-val {
	font-size: 1.25rem;
	font-weight: 700;
	min-height: 52px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-search {
	min-height: 40px;
	font-size: 0.85rem;
	background: #F8FAFC;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-from-unit,
.e2z-tool-engineering-unit-calculator .e2z-euc-to-unit {
	min-height: 132px;
	padding: 4px;
	font-size: 0.85rem;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-from-unit option,
.e2z-tool-engineering-unit-calculator .e2z-euc-to-unit option {
	padding: 5px 6px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-swap-btn {
	min-width: 46px;
	min-height: 46px;
	border: 1px solid #0EA5E9;
	border-radius: 50%;
	background: #fff;
	color: #0EA5E9;
	font-size: 1.15rem;
	font-weight: 700;
	cursor: pointer;
	flex-shrink: 0;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-swap-btn:hover { background: #0EA5E9; color: #fff; }

/* Factor transparency */
.e2z-tool-engineering-unit-calculator .e2z-euc-factor-bar {
	background: #0F172A;
	color: #7DD3FC;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 0.8rem;
	margin-bottom: 10px;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-word;
	min-height: 40px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-factor-err { color: #FCA5A5; }

/* Recent pairs */
.e2z-tool-engineering-unit-calculator .e2z-euc-recent-bar {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-recent-chip {
	border: 1px solid #E2E8F0;
	border-radius: 999px;
	background: #fff;
	color: #334155;
	font-size: 0.74rem;
	padding: 6px 12px;
	min-height: 32px;
	cursor: pointer;
	font-family: inherit;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-recent-chip:hover { border-color: #0EA5E9; color: #0EA5E9; }

/* Advanced tabs */
.e2z-tool-engineering-unit-calculator .e2z-euc-adv-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-adv-tab {
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid #E2E8F0;
	border-radius: 8px;
	background: #fff;
	color: #475569;
	font-family: inherit;
	font-size: 0.84rem;
	font-weight: 600;
	cursor: pointer;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-adv-tab:hover { border-color: #0EA5E9; }
.e2z-tool-engineering-unit-calculator .e2z-euc-adv-tab-active {
	background: #1E293B;
	color: #fff;
	border-color: #1E293B;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-adv-panel {
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 14px;
	margin-bottom: 12px;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-custom-btn-field { justify-content: flex-end; }
.e2z-tool-engineering-unit-calculator .e2z-euc-custom-add-btn,
.e2z-tool-engineering-unit-calculator .e2z-euc-batch-btn {
	min-height: 44px;
	padding: 11px 20px;
	border: none;
	border-radius: 8px;
	background: #0EA5E9;
	color: #fff;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-custom-add-btn:hover,
.e2z-tool-engineering-unit-calculator .e2z-euc-batch-btn:hover { filter: brightness(1.1); }

.e2z-tool-engineering-unit-calculator .e2z-euc-custom-list {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 10px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-custom-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #BAE6FD;
	background: #F0F9FF;
	color: #0369A1;
	border-radius: 999px;
	font-size: 0.76rem;
	padding: 5px 10px;
	font-family: 'SF Mono', monospace;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-custom-del {
	border: none;
	background: transparent;
	color: #DC2626;
	font-weight: 800;
	cursor: pointer;
	font-size: 0.85rem;
	min-width: 20px;
	min-height: 20px;
	padding: 0;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-batch-in { min-height: 96px; font-size: 0.88rem; resize: vertical; }
.e2z-tool-engineering-unit-calculator .e2z-euc-batch-out { margin-top: 12px; }

.e2z-tool-engineering-unit-calculator .e2z-euc-table-wrap { width: 100%; overflow-x: auto; }
.e2z-tool-engineering-unit-calculator .e2z-euc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.8rem;
	background: #fff;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-table th {
	background: #0F172A;
	color: #7DD3FC;
	padding: 8px 6px;
	text-align: center;
	font-weight: 600;
	white-space: nowrap;
	font-family: 'Inter', system-ui, sans-serif;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-table td {
	padding: 7px 6px;
	text-align: right;
	border-bottom: 1px solid #F1F5F9;
	white-space: nowrap;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-table tbody tr:nth-child(odd) { background: #F8FAFC; }
.e2z-tool-engineering-unit-calculator .e2z-euc-table td.e2z-euc-td-bad { color: #B91C1C; text-align: left; }

.e2z-tool-engineering-unit-calculator .e2z-euc-note {
	font-size: 0.83rem;
	margin: 8px 0 0;
	padding: 9px 11px;
	border-radius: 6px;
	background: #E0F2FE;
	color: #075985;
	border-left: 3px solid #0EA5E9;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-export-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 6px;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-print-btn,
.e2z-tool-engineering-unit-calculator .e2z-euc-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;
}
.e2z-tool-engineering-unit-calculator .e2z-euc-print-btn { background: #0F172A; }
.e2z-tool-engineering-unit-calculator .e2z-euc-copy-btn { background: #1E293B; }
.e2z-tool-engineering-unit-calculator .e2z-euc-print-btn:hover,
.e2z-tool-engineering-unit-calculator .e2z-euc-copy-btn:hover { filter: brightness(1.4); }

.e2z-tool-engineering-unit-calculator .e2z-euc-disclaimer {
	font-size: 0.75rem;
	color: #94A3B8;
	margin: 12px 0 0;
	line-height: 1.45;
}

.e2z-tool-engineering-unit-calculator .e2z-euc-hidden { display: none !important; }

@media (max-width: 640px) {
	.e2z-tool-engineering-unit-calculator .e2z-euc-swap-btn {
		transform: rotate(90deg);
		align-self: center;
	}
}
@media (max-width: 480px) {
	.e2z-tool-engineering-unit-calculator .e2z-euc-title { font-size: 1.1rem; }
	.e2z-tool-engineering-unit-calculator .e2z-euc-body { padding: 12px; }
	.e2z-tool-engineering-unit-calculator .e2z-euc-box { min-width: 100%; }
	.e2z-tool-engineering-unit-calculator .e2z-euc-from-val,
	.e2z-tool-engineering-unit-calculator .e2z-euc-to-val { font-size: 1.05rem; }
}
@media (max-width: 360px) {
	.e2z-tool-engineering-unit-calculator .e2z-euc-header { padding: 16px 10px; }
	.e2z-tool-engineering-unit-calculator .e2z-euc-title { font-size: 1rem; }
	.e2z-tool-engineering-unit-calculator .e2z-euc-field { min-width: 100%; }
}
