/*!
 * OEE Calculator — module CSS (e2z-oee- prefix).
 * Color scheme (spec): Primary #134E4A (production teal), Secondary #0F172A,
 * Accent #22C55E (efficiency green), BG #F0FDFA.
 * Scope: .e2z-tool-oee-calculator (framework shortcode wrapper).
 */

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

.e2z-tool-oee-calculator .e2z-oee-container {
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	line-height: 1.5;
	color: #0F172A;
	width: 100%;
	margin: 0 auto;
	background: #F0FDFA;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(19, 78, 74, 0.14);
	overflow: hidden;
}

/* Monospace technical fields */
.e2z-tool-oee-calculator .e2z-oee-mono,
.e2z-tool-oee-calculator .e2z-oee-stat-value,
.e2z-tool-oee-calculator .e2z-oee-formula,
.e2z-tool-oee-calculator .e2z-oee-table td {
	font-family: 'SF Mono', 'Courier New', ui-monospace, Menlo, Consolas, monospace;
}

/* Header */
.e2z-tool-oee-calculator .e2z-oee-header {
	padding: 24px 16px;
	background: linear-gradient(135deg, #0F172A, #134E4A);
	color: #fff;
	text-align: center;
	border-bottom: 3px solid #22C55E;
}
.e2z-tool-oee-calculator .e2z-oee-title {
	font-size: 1.7rem;
	font-weight: 700;
	margin: 0 0 4px;
	color: #fff;
}
.e2z-tool-oee-calculator .e2z-oee-subtitle {
	font-size: 0.85rem;
	opacity: 0.85;
	margin: 0;
}

/* Layout */
.e2z-tool-oee-calculator .e2z-oee-main-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 16px;
}
@media (min-width: 1024px) {
	.e2z-tool-oee-calculator .e2z-oee-main-grid {
		flex-direction: row;
		align-items: flex-start;
	}
	.e2z-tool-oee-calculator .e2z-oee-inputs-panel { flex: 2; min-width: 0; }
	.e2z-tool-oee-calculator .e2z-oee-results-panel { flex: 3; min-width: 360px; }
}

.e2z-tool-oee-calculator .e2z-oee-inputs-panel,
.e2z-tool-oee-calculator .e2z-oee-results-panel {
	background: #FFFFFF;
	border-radius: 12px;
	padding: 20px;
	border: 1px solid #99F6E4;
	box-shadow: 0 2px 8px rgba(19, 78, 74, 0.05);
	min-width: 0;
}
.e2z-tool-oee-calculator .e2z-oee-section-title {
	font-size: 1.02rem;
	font-weight: 600;
	color: #134E4A;
	margin: 0 0 12px;
	padding-bottom: 7px;
	border-bottom: 2px solid #DCFCE7;
}
.e2z-tool-oee-calculator .e2z-oee-inputs-panel .e2z-oee-section-title { margin-top: 14px; }

/* Tabs */
.e2z-tool-oee-calculator .e2z-oee-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 16px;
	background: #F0FDFA;
	padding: 4px;
	border-radius: 8px;
	flex-wrap: wrap;
}
.e2z-tool-oee-calculator .e2z-oee-tab {
	flex: 1;
	min-width: 110px;
	min-height: 44px;
	padding: 10px 6px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: #115E59;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
}
.e2z-tool-oee-calculator .e2z-oee-tab-active {
	background: #134E4A;
	color: #fff;
}

/* Fields */
.e2z-tool-oee-calculator .e2z-oee-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}
.e2z-tool-oee-calculator .e2z-oee-field {
	flex: 1;
	min-width: 120px;
	display: flex;
	flex-direction: column;
	margin-bottom: 12px;
}
.e2z-tool-oee-calculator .e2z-oee-row .e2z-oee-field { margin-bottom: 0; }
.e2z-tool-oee-calculator .e2z-oee-label {
	font-size: 0.85rem;
	font-weight: 500;
	color: #115E59;
	margin-bottom: 4px;
}
.e2z-tool-oee-calculator .e2z-oee-hint {
	font-size: 0.73rem;
	color: #5EEAD4;
	margin-top: 5px;
	line-height: 1.45;
	display: block;
}
.e2z-tool-oee-calculator .e2z-oee-hint { color: #14B8A6; }
.e2z-tool-oee-calculator .e2z-oee-input {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #99F6E4;
	border-radius: 6px;
	font-size: 0.95rem;
	background: #fff;
	color: #0F172A;
}
.e2z-tool-oee-calculator .e2z-oee-input:focus {
	outline: none;
	border-color: #22C55E;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* Machine rows */
.e2z-tool-oee-calculator .e2z-oee-machine-row {
	padding: 10px;
	background: #F0FDFA;
	border: 1px solid #99F6E4;
	border-left: 3px solid #22C55E;
	border-radius: 8px;
	margin-bottom: 10px;
}
.e2z-tool-oee-calculator .e2z-oee-machine-row-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	gap: 8px;
}
.e2z-tool-oee-calculator .e2z-oee-machine-name {
	flex: 1;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #99F6E4;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #134E4A;
}
.e2z-tool-oee-calculator .e2z-oee-machine-del {
	min-height: 40px;
	min-width: 40px;
	border: 1px solid #FCA5A5;
	border-radius: 6px;
	background: #FEF2F2;
	color: #DC2626;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
}
.e2z-tool-oee-calculator .e2z-oee-machine-del:hover { background: #DC2626; color: #fff; }

.e2z-tool-oee-calculator .e2z-oee-add-machine-btn {
	min-height: 44px;
	padding: 10px 18px;
	border: 1px dashed #22C55E;
	border-radius: 8px;
	background: #fff;
	color: #15803D;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.e2z-tool-oee-calculator .e2z-oee-add-machine-btn:hover { background: #F0FDF4; }

/* Button */
.e2z-tool-oee-calculator .e2z-oee-calc-btn {
	width: 100%;
	min-height: 48px;
	padding: 13px;
	border: none;
	border-radius: 8px;
	background: #134E4A;
	color: #fff;
	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;
	margin-top: 6px;
}
.e2z-tool-oee-calculator .e2z-oee-calc-btn:hover { filter: brightness(1.35); }
.e2z-tool-oee-calculator .e2z-oee-calc-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.55);
}

/* Results */
.e2z-tool-oee-calculator .e2z-oee-empty-state {
	padding: 24px;
	text-align: center;
	color: #64748B;
	background: #F8FAFC;
	border-radius: 8px;
}
.e2z-tool-oee-calculator .e2z-oee-hero {
	border-radius: 10px;
	padding: 16px;
	text-align: center;
	margin-bottom: 14px;
	background: #0F172A;
	border-bottom: 3px solid #22C55E;
}
.e2z-tool-oee-calculator .e2z-oee-hero-value {
	font-size: 2.2rem;
	font-weight: 800;
	margin: 4px 0;
	line-height: 1.12;
	color: #4ADE80;
	font-family: 'SF Mono', 'Courier New', ui-monospace, monospace;
	word-break: break-word;
}
.e2z-tool-oee-calculator .e2z-oee-hero-label {
	font-size: 0.83rem;
	font-weight: 600;
	color: #94A3B8;
	margin: 0;
}
.e2z-tool-oee-calculator .e2z-oee-badge {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 800;
	margin-top: 6px;
	background: #DCFCE7;
	color: #15803D;
}
.e2z-tool-oee-calculator .e2z-oee-badge-poor { background: #FEE2E2; color: #B91C1C; }
.e2z-tool-oee-calculator .e2z-oee-badge-typical { background: #FEF3C7; color: #92400E; }

.e2z-tool-oee-calculator .e2z-oee-result-block {
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 14px;
	margin-bottom: 12px;
}
.e2z-tool-oee-calculator .e2z-oee-result-block h3 {
	font-size: 1rem;
	color: #0F172A;
	margin: 0 0 10px;
}
.e2z-tool-oee-calculator .e2z-oee-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 10px;
}
.e2z-tool-oee-calculator .e2z-oee-stat {
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 8px;
	padding: 10px;
	text-align: center;
}
.e2z-tool-oee-calculator .e2z-oee-stat-label {
	font-size: 0.72rem;
	font-weight: 600;
	color: #64748B;
	margin: 0 0 3px;
	font-family: 'Inter', system-ui, sans-serif;
}
.e2z-tool-oee-calculator .e2z-oee-stat-value {
	font-size: 1.15rem;
	font-weight: 700;
	color: #0F172A;
	margin: 0;
	word-break: break-word;
}
.e2z-tool-oee-calculator .e2z-oee-stat-teal .e2z-oee-stat-value { color: #134E4A; }
.e2z-tool-oee-calculator .e2z-oee-stat-green .e2z-oee-stat-value { color: #16A34A; }

/* Loss bars */
.e2z-tool-oee-calculator .e2z-oee-loss-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 7px;
	font-size: 0.82rem;
}
.e2z-tool-oee-calculator .e2z-oee-loss-name { flex: 0 0 130px; color: #334155; }
.e2z-tool-oee-calculator .e2z-oee-loss-track {
	flex: 1;
	height: 16px;
	background: #E2E8F0;
	border-radius: 999px;
	overflow: hidden;
}
.e2z-tool-oee-calculator .e2z-oee-loss-fill { height: 100%; background: #14B8A6; }
.e2z-tool-oee-calculator .e2z-oee-loss-fill-avail { background: #EF4444; }
.e2z-tool-oee-calculator .e2z-oee-loss-fill-perf { background: #F59E0B; }
.e2z-tool-oee-calculator .e2z-oee-loss-fill-qual { background: #8B5CF6; }
.e2z-tool-oee-calculator .e2z-oee-loss-val { flex: 0 0 60px; text-align: right; font-family: 'SF Mono', monospace; color: #0F172A; }

/* Benchmark scale */
.e2z-tool-oee-calculator .e2z-oee-bench {
	position: relative;
	height: 34px;
	border-radius: 8px;
	overflow: hidden;
	margin: 6px 0 4px;
	background: linear-gradient(to right, #EF4444 0%, #EF4444 40%, #F59E0B 40%, #F59E0B 60%, #FCD34D 60%, #FCD34D 85%, #22C55E 85%, #22C55E 100%);
}
.e2z-tool-oee-calculator .e2z-oee-bench-marker {
	position: absolute;
	top: 0;
	width: 3px;
	height: 100%;
	background: #0F172A;
}
.e2z-tool-oee-calculator .e2z-oee-bench-marker::after {
	content: '▲';
	position: absolute;
	bottom: -2px;
	left: -5px;
	color: #0F172A;
	font-size: 0.7rem;
}
.e2z-tool-oee-calculator .e2z-oee-bench-legend {
	display: flex;
	justify-content: space-between;
	font-size: 0.68rem;
	color: #64748B;
}

/* Table */
.e2z-tool-oee-calculator .e2z-oee-table-wrap { width: 100%; overflow-x: auto; }
.e2z-tool-oee-calculator .e2z-oee-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.8rem;
	background: #fff;
}
.e2z-tool-oee-calculator .e2z-oee-table th {
	background: #0F172A;
	color: #4ADE80;
	padding: 8px 6px;
	text-align: center;
	font-weight: 600;
	white-space: nowrap;
	font-family: 'Inter', system-ui, sans-serif;
}
.e2z-tool-oee-calculator .e2z-oee-table td {
	padding: 7px 6px;
	text-align: center;
	border-bottom: 1px solid #F0FDFA;
	white-space: nowrap;
}
.e2z-tool-oee-calculator .e2z-oee-table tbody tr:nth-child(odd) { background: #F8FAFC; }
.e2z-tool-oee-calculator .e2z-oee-table tbody tr.e2z-oee-weakest { background: #FEE2E2 !important; font-weight: 700; }
.e2z-tool-oee-calculator .e2z-oee-table tbody tr.e2z-oee-best { background: #DCFCE7 !important; font-weight: 700; }

.e2z-tool-oee-calculator .e2z-oee-formula {
	display: block;
	background: #0F172A;
	color: #4ADE80;
	border-radius: 6px;
	padding: 9px 11px;
	font-size: 0.82rem;
	margin: 8px 0 0;
	overflow-x: auto;
	white-space: pre;
}
.e2z-tool-oee-calculator .e2z-oee-steps {
	list-style: none;
	margin: 0;
	padding: 0;
}
.e2z-tool-oee-calculator .e2z-oee-steps li {
	padding: 7px 10px 7px 12px;
	border-left: 3px solid #22C55E;
	margin-bottom: 7px;
	background: #fff;
	border-radius: 0 6px 6px 0;
	font-size: 0.86rem;
	border-top: 1px solid #F0FDFA;
	border-right: 1px solid #F0FDFA;
	border-bottom: 1px solid #F0FDFA;
}

.e2z-tool-oee-calculator .e2z-oee-note {
	font-size: 0.84rem;
	margin: 8px 0 0;
	padding: 9px 11px;
	border-radius: 6px;
}
.e2z-tool-oee-calculator .e2z-oee-note-info { background: #CCFBF1; color: #115E59; border-left: 3px solid #14B8A6; }
.e2z-tool-oee-calculator .e2z-oee-note-warn { background: #FEF3C7; color: #92400E; border-left: 3px solid #F59E0B; }
.e2z-tool-oee-calculator .e2z-oee-note-error { background: #FEF2F2; color: #991B1B; border-left: 3px solid #DC2626; }

/* Export */
.e2z-tool-oee-calculator .e2z-oee-export-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 12px;
}
.e2z-tool-oee-calculator .e2z-oee-print-btn,
.e2z-tool-oee-calculator .e2z-oee-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-oee-calculator .e2z-oee-print-btn { background: #0F172A; }
.e2z-tool-oee-calculator .e2z-oee-copy-btn { background: #134E4A; }
.e2z-tool-oee-calculator .e2z-oee-print-btn:hover,
.e2z-tool-oee-calculator .e2z-oee-copy-btn:hover { filter: brightness(1.4); }

.e2z-tool-oee-calculator .e2z-oee-disclaimer {
	font-size: 0.75rem;
	color: #14B8A6;
	margin: 12px 0 0;
	line-height: 1.45;
}

.e2z-tool-oee-calculator .e2z-oee-hidden { display: none !important; }

/* Responsive */
@media (max-width: 480px) {
	.e2z-tool-oee-calculator .e2z-oee-title { font-size: 1.3rem; }
	.e2z-tool-oee-calculator .e2z-oee-inputs-panel,
	.e2z-tool-oee-calculator .e2z-oee-results-panel { padding: 14px; }
	.e2z-tool-oee-calculator .e2z-oee-hero-value { font-size: 1.7rem; }
	.e2z-tool-oee-calculator .e2z-oee-tab { min-width: 100%; }
	.e2z-tool-oee-calculator .e2z-oee-loss-name { flex-basis: 96px; }
}
@media (max-width: 360px) {
	.e2z-tool-oee-calculator .e2z-oee-header { padding: 16px 10px; }
	.e2z-tool-oee-calculator .e2z-oee-title { font-size: 1.08rem; }
	.e2z-tool-oee-calculator .e2z-oee-field { min-width: 100%; }
}
