/* calc/assets/css/calculators/hr_zones.css */

:root {
    /* Cardio Wave Palette */
    --bg-cardio-card: #0F172A; /* Slate 900 */
    --text-cardio-main: #F8FAFC; /* Slate 50 */
    --text-cardio-muted: #94A3B8; /* Slate 400 */
    
    --zone-1: #64748B; /* Slate 500 */
    --zone-2: #10B981; /* Emerald 500 */
    --zone-3: #F59E0B; /* Amber 500 */
    --zone-4: #F97316; /* Orange 500 */
    --zone-5: #EF4444; /* Red 500 */
    
    --border-cardio: #1E293B; /* Slate 800 */
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }

/* СИММЕТРИЧНАЯ СЕТКА И ФИКС ВЫСОТЫ */
.calc-grid { 
    display: grid !important; grid-template-columns: 1fr; gap: 24px; align-items: start; 
    width: 100%; box-sizing: border-box; 
}
@media (min-width: 900px) { 
    .calc-grid { grid-template-columns: 1fr 1fr !important; } 
}

/* Разрешаем контейнерам менять высоту при появлении новых блоков */
.calc-inputs, .calc-results { 
    min-width: 0 !important; max-width: 100% !important; 
    box-sizing: border-box !important; overflow: visible !important; 
    height: auto !important; 
}

.group-title { 
    font-size: 14px; font-weight: 800; color: #1E293B; margin: 0 0 16px 0; 
    text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #E2E8F0; padding-bottom: 8px;
}
.input-hint { font-size: 12px; color: #64748B; margin-bottom: 8px; line-height: 1.4; }

/* ПОЛЗУНКИ */
.input-group { width: 100%; font-size: 14px; font-weight: 700; color: #334155;}
.badge-value { font-size: 13px; font-weight: 800; padding: 4px 8px; border-radius: 6px;}

.custom-slider {
    -webkit-appearance: none; width: 100%; height: 8px; border-radius: 99px;
    background: #E2E8F0; outline: none; margin-top: 8px;
}
.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; 
    cursor: pointer; transition: transform 0.1s; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.custom-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.gray-slider::-webkit-slider-thumb { background: #475569; }
.blue-slider::-webkit-slider-thumb { background: #2563EB; }
.red-slider::-webkit-slider-thumb { background: #DC2626; }

/* АЛЕРТ ЦНС */
.cns-alert {
    display: flex; align-items: flex-start; gap: 12px; margin-top: 24px;
    padding: 16px; border-radius: 12px; border: 1px solid; transition: all 0.3s;
}
.cns-icon { font-size: 24px; line-height: 1;}
.cns-text-wrap { display: flex; flex-direction: column; gap: 4px; }
.cns-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;}
.cns-desc { font-size: 13px; font-weight: 500; line-height: 1.5; margin: 0;}

/* Цвета алертов */
.cns-optimal { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.cns-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.cns-danger { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.cns-danger .cns-desc { font-weight: 700; }
.cns-info { background: #F8FAFC; border-color: #E2E8F0; color: #334155; }


/* ========================================================
   ПРАВЫЙ БЛОК (CARDIO WAVE - ЯДЕРНЫЙ ФИКС CMS)
   ======================================================== */
.calc-results { background: transparent !important; background-color: transparent !important; border: none !important; box-shadow: none !important; border-radius: 0 !important;}

div#result-card.card.card--result.card--cardio-wave { 
    background-color: var(--bg-cardio-card) !important; 
    background-image: none !important;
    color: var(--text-cardio-main) !important; 
    border: 1px solid var(--border-cardio) !important; 
    border-radius: 24px !important; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05) !important;
    overflow: hidden !important; 
    padding: 32px 24px !important; 
    display: flex !important; 
    flex-direction: column !important;
    box-sizing: border-box !important;
    isolation: isolate !important; 
    -webkit-appearance: none !important;
    outline: none !important;
    position: relative !important;
    z-index: 1 !important;
    
    height: auto !important; 
    min-height: max-content !important;
}

div#result-card.card.card--result.card--cardio-wave::before, 
div#result-card.card.card--result.card--cardio-wave::after { display: none !important; content: none !important; background: transparent !important; box-shadow: none !important;}

@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

/* ВЕРХНЯЯ СТАТИСТИКА */
.hr-header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #1E293B;}
.hr-stat { display: flex; flex-direction: column; gap: 4px; }
.hr-stat-lbl { font-size: 11px; font-weight: 700; color: var(--text-cardio-muted); text-transform: uppercase; letter-spacing: 0.05em;}
.hr-stat-val { font-size: 32px; font-weight: 900; line-height: 1;}
.hr-stat-val small { font-size: 14px; font-weight: 600; color: #64748B;}

/* ЗОНЫ */
.zones-container { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.zone-row {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
    padding: 16px; border-radius: 12px; background: rgba(30, 41, 59, 0.4);
    border-left: 6px solid transparent; transition: all 0.3s;
}
.z-label { font-size: 18px; font-weight: 900; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 150px;}
.z-name { font-size: 13px; font-weight: 600; color: var(--text-cardio-muted); }
.z-range { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.5px;}

/* Стили зон */
.z5 { border-left-color: var(--zone-5); }
.z5 .z-label { color: var(--zone-5); }
.z4 { border-left-color: var(--zone-4); }
.z4 .z-label { color: var(--zone-4); }
.z3 { border-left-color: var(--zone-3); }
.z3 .z-label { color: var(--zone-3); }

/* Выделение Зоны 2 (Главная зона) */
.z2.highlighted { 
    background: rgba(16, 185, 129, 0.1); border-left-color: var(--zone-2); border: 1px solid rgba(16, 185, 129, 0.3);
    border-left: 6px solid var(--zone-2); position: relative; padding-top: 24px; margin: 8px 0;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}
.z-badge-best {
    position: absolute; top: 0; right: 16px; transform: translateY(-50%);
    background: var(--zone-2); color: #022C22; font-size: 10px; font-weight: 900;
    padding: 4px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.1em;
}
.z2 .z-label { color: var(--zone-2); }
.z-desc { width: 100%; font-size: 12px; color: #A7F3D0; margin-top: 8px; line-height: 1.4; border-top: 1px dashed rgba(16, 185, 129, 0.3); padding-top: 8px;}

.z1 { border-left-color: var(--zone-1); }
.z1 .z-label { color: var(--zone-1); }

/* БЛОКИРОВКА ЗОН ПРИ ПЕРЕТРЕНИРОВАННОСТИ */
.zone-row.disabled { opacity: 0.2; filter: grayscale(100%); position: relative; }
.zone-row.disabled::after {
    content: 'Заблокировано ЦНС'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); background: #EF4444; color: #FFF;
    font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 6px; text-transform: uppercase;
}


/* ========================================================
   SEO ИНФОБЛОКИ И ТАБЛИЦЫ
   ======================================================== */
.info-wrapper { padding: 60px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px; }
.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; }
.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }
.red-icon svg { color: #EF4444; }
.slate-icon svg { color: #64748B; }

.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; width: 100%; box-sizing: border-box;}
.formula-card { background: #fff; border: 1px solid rgba(0,0,0,0.04); box-shadow: 0 4px 20px rgba(0,0,0,0.03); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; min-width: 0; max-width: 100%; box-sizing: border-box;}
.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; }

.badge-dark { background: #F1F5F9; color: #334155; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.math-block { margin-top: 16px; background: #F8FAFC; padding: 12px; border-radius: 8px; text-align: center; font-size: 14px; overflow-x: auto;}

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E2E8F0, transparent); margin: 48px 0; }

.seo-table-container { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 24px; margin-bottom: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); width: 100%; box-sizing: border-box; overflow: hidden; }
.seo-table-container h3 { margin-top: 0; margin-bottom: 20px; font-size: 18px; }
.seo-table { width: 100%; border-collapse: collapse; text-align: left; }
.seo-table th { background: #F8FAFC; padding: 12px 16px; font-weight: 700; border-bottom: 2px solid #E2E8F0; color: #475569;}
.seo-table td { padding: 16px; border-bottom: 1px solid #E2E8F0; font-weight: 500; color: #0F172A;}
.seo-table tr:last-child td { border-bottom: none; }

.faq-section .faq-item { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-section .faq-item[open] { border-color: #EF4444; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
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; transition: background 0.2s; }
summary.faq-question:hover { background-color: #F8FAFC; }
.faq-section .faq-item[open] summary.faq-question { color: #B91C1C; background: #FEF2F2; }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); font-weight: 400; line-height: 1; }
.faq-question .icon-plus { display: none; }
.faq-section .faq-item[open] summary.faq-question::after { content: '−'; color: #B91C1C; }
.faq-answer, .faq-item div[itemprop="text"] { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }


/* ========================================================
   ИСТИННАЯ МОБИЛЬНАЯ АДАПТАЦИЯ (ДВУХУРОВНЕВАЯ)
   ======================================================== */
@media (max-width: 900px) {
    .calc-grid { display: flex !important; flex-direction: column !important; gap: 16px !important; }
    .formulas-grid { grid-template-columns: 1fr !important; gap: 16px !important; margin-bottom: 32px !important; }
    
    div#result-card.card.card--result.card--cardio-wave { border-radius: 20px !important; padding: 24px 16px !important; margin-top: 16px !important;}
    
    .seo-table-container { padding: 16px !important; width: 100% !important; box-sizing: border-box !important;}
    .seo-table { display: block !important; width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
    .seo-table thead, .seo-table tbody { display: table !important; width: 100% !important; min-width: 500px !important; }
    .seo-table th, .seo-table td { padding: 12px !important; font-size: 13px !important; white-space: normal !important; }
}

@media (max-width: 480px) {
    .icon-heading { font-size: 18px !important; gap: 12px !important; word-break: break-word !important; overflow-wrap: break-word !important; }
    .header-icon { width: 36px !important; height: 36px !important; flex-shrink: 0 !important; }
    .header-icon svg { width: 20px !important; height: 20px !important; }
    
    .hr-stat-val { font-size: 28px; }
    .z-label { font-size: 16px; flex-direction: column; align-items: flex-start; gap: 4px; min-width: auto;}
    .z-range { font-size: 18px; }
    .z-badge-best { font-size: 9px; right: 8px; }
}