/* Override Tailwind for iOS 27 Style */
.bg-slate-800 {
	background: rgba(255, 255, 255, 0.04) !important;
	backdrop-filter: blur(10px) !important;
	-webkit-backdrop-filter: blur(10px) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}
.bg-slate-900, .bg-slate-900\/50, .bg-slate-900\/80 {
	background: rgba(255, 255, 255, 0.03) !important;
}
.bg-slate-700\/50 {
	background: rgba(24, 24, 27, 0.5) !important;
}
.border-slate-700 {
	border-color: rgba(255, 255, 255, 0.1) !important;
}
.border-slate-600 {
	border-color: rgba(255, 255, 255, 0.15) !important;
}
.rounded-xl {
	border-radius: 28px !important;
}
.rounded-lg {
	border-radius: 18px !important;
}
.p-5 {
	padding: 1.5rem !important;
}
.p-3 {
	padding: 0.75rem !important;
}
.space-y-1.5 > :not([hidden]) ~ :not([hidden]) {
	margin-top: 0.375rem !important;
}
.text-xs {
	font-size: 0.75rem !important;
	line-height: 1.25rem !important;
}

/* iOS 27 Style Base */
:root {
	--ios-bg: #0a0a0f;
	--ios-card: rgba(255, 255, 255, 0.04);
	--ios-card-border: rgba(255, 255, 255, 0.1);
	--ios-card-border-hover: rgba(255, 255, 255, 0.15);
	--ios-input-bg: rgba(255, 255, 255, 0.06);
	--ios-input-border: rgba(255, 255, 255, 0.15);
	--ios-accent: #06b6d4;
	--ios-accent-hover: #0891b2;
}

html {
	font-size: 14px;
	scroll-behavior: smooth;
}

.bg-ios-bg {
	background: var(--ios-bg) !important;
}
.bg-header {
	background: rgba(10, 10, 15, 0.8) !important;
	backdrop-filter: blur(20px) !important;
	-webkit-backdrop-filter: blur(20px) !important;
}
.border-slate-700\/50 {
	border-color: rgba(255, 255, 255, 0.05) !important;
}

body {
	background: radial ellipse at top right var(--ios-bg) url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230f172a' fill-opacity='0.15'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	background-size: 80px 80px;
}

/* Main container */
main {
	background: linear-gradient(180deg, #0a0a0f 0%, #11111a 100%);
	min-height: calc(100vh - 60px);
}

/* Custom Input Styling - iOS Style */
.input-field {
	width: 100%;
	background: var(--ios-input-bg);
	border: 1px solid var(--ios-input-border);
	border-radius: 18px;
	padding: 0.7rem 1rem;
	font-size: 0.9rem;
	color: #f1f5f9;
	font-weight: 400;
	transition: all 0.2s ease;
	outline: none;
}

.input-field:focus {
	border-color: var(--ios-accent);
	box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
	background: rgba(255, 255, 255, 0.08);
}

.input-field::placeholder {
	color: #94a3b8;
}

/* Compari.ro Links */
a[href*="compari.ro"] {
	text-decoration: none;
	transition: all 0.2s ease;
}
a[href*="compari.ro"]:hover {
	color: var(--ios-accent) !important;
	text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

/* Action Buttons - iOS Style */
#btnReset, #btnPrint {
	background: rgba(255, 255, 255, 0.06) !important;
	border: 1px solid rgba(255, 255, 255, 0.15) !important;
	border-radius: 14px !important;
	transition: all 0.2s ease !important;
}
#btnReset:hover, #btnPrint:hover {
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: rgba(255, 255, 255, 0.25) !important;
}
#btnReset:hover i, #btnPrint:hover i {
	color: var(--ios-accent);
}
#btnReset:hover { border-color: var(--ios-accent); }

/* Building Type Buttons - iOS Segmented Control */
.b-type-btn {
	background: var(--ios-card);
	border: 1px solid var(--ios-card-border);
	border-radius: 20px;
	padding: 1rem 0.75rem;
	transition: all 0.2s ease;
	cursor: pointer;
}

.b-type-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.2);
}

.b-type-btn.active-type {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(6, 182, 212, 0.15) 100%);
	border-color: var(--ios-accent);
	box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
	transform: translateY(-1px);
}

.b-type-btn.active-type .pictogram {
	background: rgba(6, 182, 212, 0.25);
	box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

/* Wiring Diagram */
.wiring-row {
	display: flex;
	gap: 2px;
	margin: 2px 0;
}
.wire {
	width: 28px;
	height: 14px;
	border-radius: 2px;
	border: 1px solid #334155;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-weight: bold;
	font-family: monospace;
	color: #1e293b;
}
.wire.orange-white { background: linear-gradient(90deg, #ff6b00 50%, #fff 50%); }
.wire.orange { background: #ff6b00; }
.wire.green-white { background: linear-gradient(90deg, #00b844 50%, #fff 50%); }
.wire.blue { background: #0078d7; }
.wire.blue-white { background: linear-gradient(90deg, #0078d7 50%, #fff 50%); }
.wire.green { background: #00b844; }
.wire.brown-white { background: linear-gradient(90deg, #8b4513 50%, #fff 50%); }
.wire.brown { background: #8b4513; }

/* Pictogram Icons */
.pictogram {
	transition: all 0.2s ease;
}
.pictogram.apartament-bg { background-color: rgba(59, 130, 246, 0.15); }
.pictogram.vila-bg { background-color: rgba(16, 185, 129, 0.15); }
.pictogram.birou-bg { background-color: rgba(245, 158, 11, 0.15); }
.pictogram.hala-bg { background-color: rgba(168, 87, 213, 0.15); }

/* Compliance Alerts - iOS Style */
.compliance-ok {
	background: rgba(22, 163, 74, 0.1);
	border: 1px solid rgba(22, 163, 74, 0.3);
	color: #4ade80;
	border-radius: 16px;
}
.compliance-warn {
	background: rgba(245, 158, 11, 0.1);
	border: 1px solid rgba(245, 158, 11, 0.3);
	color: #facc15;
	border-radius: 16px;
}
.compliance-error {
	background: rgba(244, 63, 94, 0.1);
	border: 1px solid rgba(244, 63, 94, 0.3);
	color: #f87171;
	border-radius: 16px;
}

/* Normative Guide Collapsible */
#normGuideContent {
	transition: all 0.3s ease;
}
#normChevron {
	transition: transform 0.3s ease;
}
#normChevron.rotated {
	transform: rotate(180deg);
}

/* === Equipment Configurator - iOS Style === */

/* Equipment Card */
.equipment-card {
	background: var(--ios-card);
	border: 1.5px solid var(--ios-card-border);
	border-radius: 22px;
	padding: 1rem;
	transition: all 0.25s ease;
	cursor: pointer;
}

.equipment-card:hover:not(.non-compliant):not(.cursor-pointer) {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.2);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.equipment-card.selected {
	border-color: var(--ios-accent);
	background: rgba(6, 182, 212, 0.08);
	box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.equipment-card.non-compliant {
	opacity: 0.45;
	cursor: not-allowed;
	position: relative;
}

.equipment-card.non-compliant::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: repeating-linear-gradient(
		45deg,
		rgba(248, 113, 113, 0.1),
		rgba(248, 113, 113, 0.1) 10px,
		rgba(248, 113, 113, 0.15) 10px,
		rgba(248, 113, 113, 0.15) 20px
	);
	border-radius: 22px;
	backdrop-filter: blur(4px);
	opacity: 0.6;
}

.equipment-card.cursor-pointer {
	cursor: pointer;
}

/* Configurator Disabled */
.configurator-disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* Badges */
.badge {
	background: rgba(255, 255, 255, 0.08);
	color: #cbd5e1;
	padding: 0.2rem 0.6rem;
	border-radius: 10px;
	font-size: 0.65rem;
	font-weight: 500;
	white-space: nowrap;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Equipment Status */
.equipment-status {
	font-size: 0.65rem;
	padding: 0.2rem 0.5rem;
	border-radius: 10px;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-weight: 500;
}
.equipment-status.selected {
	background: rgba(6, 182, 212, 0.15);
	color: #06b6d4;
}
.equipment-status.available {
	background: rgba(168, 87, 213, 0.1);
	color: #a78bfa;
}
.equipment-status.non-compliant {
	background: rgba(244, 63, 94, 0.15);
	color: #f87171;
	font-size: 0.6rem;
	max-width: 140px;
}
.equipment-status.non-compliant i {
	font-size: 0.75rem;
}

/* === Card Sections === */
.card-section {
	background: var(--ios-card);
	border: 1px solid var(--ios-card-border);
	border-radius: 28px;
	padding: 1.5rem;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* Checkbox styling */
input[type="checkbox"] {
	appearance: none;
	width: 1rem;
	height: 1rem;
	border: 1.5px solid var(--ios-input-border);
	border-radius: 5px;
	background: var(--ios-input-bg);
	position: relative;
	cursor: pointer;
	transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
	background: var(--ios-accent);
	border-color: var(--ios-accent);
}

input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 3px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(20deg);
}

input[type="checkbox"]:focus {
	box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.3);
	outline: none;
}

/* Radio buttons */
input[type="radio"] {
	appearance: none;
	width: 1rem;
	height: 1rem;
	border: 1.5px solid var(--ios-input-border);
	border-radius: 50%;
	background: var(--ios-input-bg);
	position: relative;
	cursor: pointer;
	transition: all 0.2s ease;
}

input[type="radio"]:checked {
	border-color: var(--ios-accent);
}

input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--ios-accent);
}

/* Section Headers */
.section-title {
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.075em;
}

/* Print Styles */
@media print {
	.no-print { display: none !important; }
	body { background: white !important; color: black !important; }
	.bg-slate-800, .bg-slate-900, .bg-header, .card-section {
		background-color: white !important;
		border: 1px solid #e5e7eb !important;
		box-shadow: none !important;
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
	}
	.text-white, .text-slate-100, .text-slate-300, .text-slate-400 {
		color: #111827 !important;
	}
	.border-slate-700 { border-color: #e5e7eb !important; }
	main {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		background: white !important;
	}
	.lg\:col-span-5, .lg\:col-span-7 { width: 100% !important; }
	.wire {
		border: 1px solid #999 !important;
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}
	.equipment-card {
		border: 1px solid #ccc !important;
		background: white !important;
	}
	.equipment-card.non-compliant::after { display: none !important; }
}