/* --- Стили для Калькулятора Краски (Cyan/Teal Theme) --- */
:root {
    --accent-cyan: #06B6D4;
    --accent-cyan-dark: #0891B2;
    --gradient-cyan-card: linear-gradient(135deg, #22D3EE 0%, #06B6D4 100%);
}

.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; } }

/* Результаты (Cyan Card) */
.card--cyan { background: var(--gradient-cyan-card); color: #fff; border: none; }
.card--cyan h2 { color: rgba(255,255,255,0.9); margin-bottom: 24px; }
@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

/* Ведро */
.paint-bucket-visual { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; }
.bucket-icon {
    width: 80px; height: 80px; background: rgba(255,255,255,0.2);
    border-radius: 20px; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.bucket-val { display: flex; flex-direction: column; }
.bucket-val span { font-size: 48px; font-weight: 800; line-height: 1; }
.bucket-val small { font-size: 18px; opacity: 0.8; }

.result-details { display: flex; flex-direction: column; gap: 12px; }
.detail-row { display: flex; justify-content: space-between; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 8px; }

.tip-box {
    background: rgba(0,0,0,0.15); padding: 12px 16px; border-radius: 12px;
    display: flex; gap: 12px; font-size: 13px; line-height: 1.4; margin-bottom: 20px;
}
.total-with-reserve {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; color: var(--accent-cyan-dark); padding: 16px; border-radius: 12px; font-weight: 600;
}
.total-with-reserve strong { font-size: 20px; }

/* --- INPUTS И РЕЖИМЫ (FIXED HEIGHT 54px) --- */
.calc-inputs { gap: 24px; }
.input-group { margin-bottom: 24px; }
.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%; 
    height: 54px; /* !ВАЖНО: Высота совпадает с переключателем */
    padding: 0 40px 0 16px; /* Вертикальный паддинг 0, центрируем через flex */
    font-size: 18px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: border 0.2s, box-shadow 0.2s;
    font-family: var(--font-main);
    box-sizing: border-box; /* Чтобы паддинг не ломал высоту */
}
.input-wrapper input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1); }
.suffix { position: absolute; right: 16px; color: var(--text-secondary); pointer-events: none; }
.helper-text { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

.row-3-col { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) { .row-3-col { grid-template-columns: repeat(3, 1fr); } }
.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Табы (Сверху) */
.mode-switcher {
    display: flex; background: #F3F4F6; padding: 4px;
    border-radius: 12px; margin-bottom: 24px; gap: 4px;
}
.mode-btn {
    flex: 1; padding: 10px 4px; border: none; background: transparent;
    color: var(--text-secondary); font-size: 13px; font-weight: 600;
    border-radius: 8px; cursor: pointer; transition: all 0.2s; text-align: center;
}
.mode-btn.active { background: #fff; color: var(--text-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

/* Счетчики (Counter) */
.openings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opening-item {
    background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 12px;
    padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.opening-item span { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.counter {
    display: flex; align-items: center; background: #fff;
    border-radius: 8px; border: 1px solid #E5E7EB; overflow: hidden; height: 40px;
}
.cnt-btn {
    width: 32px; height: 100%; border: none; background: #F3F4F6;
    cursor: pointer; font-weight: bold; color: var(--text-primary);
}
.cnt-btn:hover { background: #E5E7EB; }
.counter input {
    width: 100%; height: 100%; text-align: center; border: none; font-weight: 600;
    font-size: 14px; outline: none; color: var(--text-primary); padding: 0;
}

/* --- РАДИО-СЕГМЕНТ (ИСПРАВЛЕНО ЦЕНТРИРОВАНИЕ) --- */
.radio-segment {
    display: flex; 
    background: #F3F4F6; 
    border-radius: 12px; 
    padding: 4px; 
    gap: 4px;
    height: 54px; /* !ВАЖНО: Высота совпадает с инпутом */
    box-sizing: border-box; /* Чтобы высота включала паддинг и бордер */
}
.radio-segment label { 
    flex: 1; 
    position: relative; 
    cursor: pointer; 
    display: flex; /* Чтобы ребенок span мог растянуться */
    height: 100%; /* Растягиваем лейбл на всю высоту контейнера */
}
.radio-segment input { display: none; }
.radio-segment span {
    width: 100%;
    height: 100%; /* Растягиваем плашку на всю высоту */
    display: flex; align-items: center; justify-content: center; /* Центрируем текст */
    border-radius: 8px; font-size: 14px; font-weight: 600;
    color: var(--text-secondary); transition: all 0.2s;
    line-height: 1;
    padding: 0; /* Убираем паддинг, чтобы не ломать высоту */
}
.radio-segment input:checked + span {
    background: #fff; color: var(--accent-cyan-dark); box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.checkbox-row { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-top: 16px; }
.checkbox-row input { display: none; }
.checkbox-box {
    width: 24px; height: 24px; border: 2px solid #D1D5DB; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; color: transparent; transition: all 0.2s;
}
.checkbox-row input:checked + .checkbox-box { background: var(--accent-cyan); border-color: var(--accent-cyan); color: #fff; }
.checkbox-row span:last-child { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.divider { border: 0; border-top: 1px solid #E5E7EB; margin: 24px 0; }