/* --- Стили EV Charging (Cyan Theme) --- */
:root {
    --accent-cyan: #06B6D4;
    --accent-cyan-dark: #0E7490;
    --accent-cyan-light: #ECFEFF;
    --gradient-cyan-card: linear-gradient(135deg, #22D3EE 0%, #0891B2 100%);
    
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --radius-lg: 16px;
    --font-main: 'Inter', sans-serif;
}

/* Base Layout */
.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* Inputs */
.calc-inputs { gap: 24px; }
.input-group { margin-bottom: 24px; }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 600px) { .grid-2-col { grid-template-columns: 1fr; } }

.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.input-wrapper { position: relative; display: flex; align-items: center; }

.input-wrapper input {
    width: 100%; padding: 16px; padding-right: 40px;
    font-size: 18px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: border 0.2s; background: #fff;
    font-family: var(--font-main);
}
.input-wrapper input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1); }
.currency { position: absolute; right: 16px; color: var(--text-secondary); pointer-events: none; }
.divider { border: 0; border-top: 1px solid #E5E7EB; margin: 24px 0; }

/* --- CUSTOM SELECT (JS-Driven, Like Kitchen) --- */
.calc-select-hidden { display: none; } /* Скрываем стандартный */

.custom-select { position: relative; user-select: none; width: 100%; }

.custom-select-trigger {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 16px; 
    font-size: 16px; font-weight: 500; font-family: var(--font-main);
    color: var(--text-primary); background: #fff;
    border: 1px solid #E5E7EB; border-radius: 12px; cursor: pointer;
    transition: all 0.2s; box-sizing: border-box;
}
.custom-select-trigger:hover { border-color: #D1D5DB; }
.custom-select.open .custom-select-trigger { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1); }

/* Стрелка */
.custom-arrow {
    width: 10px; height: 10px; 
    border-right: 2px solid #9CA3AF; border-bottom: 2px solid #9CA3AF;
    transform: rotate(45deg); transition: transform 0.2s; 
    margin-left: 12px; margin-bottom: 2px;
}
.custom-select.open .custom-arrow { transform: rotate(-135deg); margin-bottom: -2px; border-color: var(--accent-cyan); }

/* Выпадающий список */
.custom-options {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    z-index: 100; opacity: 0; visibility: hidden;
    transform: translateY(-10px); transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 300px; overflow-y: auto;
}
.custom-select.open .custom-options { opacity: 1; visibility: visible; transform: translateY(0); }

/* Опции */
.custom-option {
    padding: 14px 16px; font-size: 15px; cursor: pointer; transition: background 0.1s;
    border-bottom: 1px solid #F3F4F6; color: var(--text-primary);
}
.custom-option:last-child { border-bottom: none; }
.custom-option:hover { background: var(--accent-cyan-light); color: var(--accent-cyan-dark); }
.custom-option.selected { background: var(--accent-cyan-light); color: var(--accent-cyan-dark); font-weight: 600; }

/* Visual Range Bar */
.range-slider-group { margin-bottom: 24px; padding: 0 4px; }
.range-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.range-labels b { color: var(--accent-cyan-dark); }
.dual-range-visual { height: 8px; background: #E5E7EB; border-radius: 4px; position: relative; }
.range-bar { 
    position: absolute; height: 100%; background: var(--accent-cyan); 
    border-radius: 4px; transition: all 0.3s ease; opacity: 0.8;
}

/* Result Card */
.card--cyan { background: var(--gradient-cyan-card); color: #fff; border: none; }
.card--cyan h2 { color: rgba(255,255,255,0.95); margin-bottom: 24px; text-align: center; font-size: 20px; }
@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

.fuel-price-big { font-size: 56px; font-weight: 800; line-height: 1; margin-bottom: 32px; display: flex; justify-content: center; align-items: baseline; gap: 8px; }

/* Liquid Battery */
.battery-container { position: relative; width: 140px; height: 200px; margin: 0 auto 32px auto; }
.battery-top { width: 60px; height: 12px; background: rgba(255,255,255,0.5); margin: 0 auto; border-radius: 4px 4px 0 0; }
.battery-body {
    width: 100%; height: 100%;
    border: 4px solid rgba(255,255,255,0.5); border-radius: 16px;
    position: relative; overflow: hidden;
    background: rgba(0,0,0,0.1); backdrop-filter: blur(4px);
}
.battery-liquid {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 50%;
    background: #fff; transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(255,255,255,0.5); opacity: 0.9;
}
.battery-liquid::before {
    content: ''; position: absolute; top: -5px; left: 0; width: 100%; height: 10px;
    background: inherit; border-radius: 50%; animation: wave 2s infinite ease-in-out;
}
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.7); } }

.battery-text {
    position: absolute; width: 100%; top: 50%; transform: translateY(-50%);
    text-align: center; color: var(--accent-cyan-dark); 
    font-weight: 800; font-size: 24px;
    text-shadow: 0 2px 4px rgba(255,255,255,0.5);
    z-index: 10; mix-blend-mode: hard-light;
}
.battery-text small { display: block; font-size: 12px; opacity: 0.8; text-transform: uppercase; }
.charging-bolt {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 64px; height: 64px; color: rgba(255,255,255,0.2); pointer-events: none;
}

.split-cost-box { background: #fff; border-radius: 12px; padding: 16px; color: var(--accent-cyan-dark); }
.split-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.split-row:last-child { margin-bottom: 0; }
.split-row strong { font-size: 16px; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 24px 0; }
.tip-box { font-size: 13px; opacity: 0.9; line-height: 1.5; }

/* Info Wrapper */
.info-wrapper { padding: 60px 0 60px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px; }
.info-wrapper .container { max-width: 800px; margin: 0 auto; }

.icon-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.header-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.04); flex-shrink: 0; margin-top: -4px; }
.blue-icon svg { color: #3B82F6; }
.orange-icon svg { color: #F97316; }
.red-icon svg { color: #EF4444; }

.intro-text { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.6; }

.formulas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.formula-card { background: #fff; border: 1px solid rgba(0,0,0,0.04); box-shadow: var(--shadow-soft); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; }
.formula-header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.formula-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.badge-blue { background: #3B82F6; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-green { background: #10B981; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.math-expression { background: #F9FAFB; border: 1px solid #E5E7EB; padding: 12px 16px; border-radius: 12px; font-weight: 700; color: var(--accent-cyan-dark); text-align: center; margin-bottom: 16px; font-size: 15px; }

/* Table */
.table-wrapper { overflow-x: auto; margin-bottom: 24px; border-radius: 12px; border: 1px solid #E5E7EB; }
.comparison-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.comparison-table th { background: #F9FAFB; padding: 12px 16px; text-align: left; font-size: 13px; text-transform: uppercase; color: var(--text-secondary); font-weight: 700; border-bottom: 1px solid #E5E7EB; }
.comparison-table td { padding: 16px; font-size: 14px; color: var(--text-primary); border-bottom: 1px solid #F3F4F6; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: #ECFEFF; }

/* Links (Color Fix) */
.info-wrapper a {
    color: var(--accent-cyan-dark); text-decoration: underline; text-decoration-color: rgba(14, 116, 144, 0.3); font-weight: 600; transition: all 0.2s ease;
}
.info-wrapper a:hover { color: var(--accent-cyan); background: rgba(6, 182, 212, 0.05); border-radius: 4px; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 48px 0; }

/* FAQ */
.faq-fuel-style .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-fuel-style .faq-item[open] { border-color: var(--accent-cyan); box-shadow: 0 4px 20px rgba(6, 182, 212, 0.1); }
.faq-fuel-style summary.faq-question { padding: 16px 20px; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-fuel-style .faq-item[open] summary.faq-question { color: var(--accent-cyan-dark); background: var(--accent-cyan-light); }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); font-weight: 400; line-height: 1; }
.faq-fuel-style .faq-item[open] summary.faq-question::after { content: '−'; color: var(--accent-cyan-dark); }
.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }

/* Mobile */
@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { font-size: 20px; gap: 12px; margin-bottom: 20px; }
    .header-icon { width: 40px; height: 40px; border-radius: 12px; }
    .header-icon svg { width: 20px; height: 20px; }
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { align-items: center; width: 100%; }
    .math-expression { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
    .info-wrapper { margin-top: 40px; padding-top: 40px; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }