/* --- Стили для Calories Burned (Blue Theme) --- */
:root {
    --accent-blue: #2563EB;
    --accent-blue-dark: #1E40AF;
    --accent-blue-light: #EFF6FF; /* Добавлено для ховера селекта */
    --gradient-blue-card: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    
    /* Темный цвет текста для максимального контраста */
    --text-on-blue: #172554; 
}

.calc-header { margin-bottom: 24px; }
.subtitle { color: var(--text-secondary); margin-top: 6px; }

/* Сетка */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* --- FIX: STACKING CONTEXT (Важно для селекта) --- */
.calc-inputs.card {
    position: relative;
    z-index: 50 !important;
    overflow: visible !important;
}
.calc-results {
    position: relative;
    z-index: 10;
}

/* Inputs */
.calc-inputs { gap: 16px; }
.input-group { margin-bottom: 16px; }

.input-group label { 
    display: block; font-size: 13px; font-weight: 600; 
    margin-bottom: 6px; color: var(--text-primary); 
}

.input-wrapper { position: relative; display: flex; align-items: center; }

.input-wrapper input {
    width: 100%; padding: 12px 14px; padding-right: 36px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 10px;
    outline: none; transition: border 0.2s, box-shadow 0.2s;
    font-family: var(--font-main);
}
.input-wrapper input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.suffix { position: absolute; right: 14px; color: var(--text-secondary); pointer-events: none; font-size: 14px; }

/* --- CUSTOM SELECT (Скопировано из Kitchen.css и адаптировано цвета) --- */
.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: 12px 14px; font-size: 16px; font-weight: 500;
    color: var(--text-primary); background: #fff;
    border: 1px solid #E5E7EB; border-radius: 10px; 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-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

.custom-arrow {
    width: 8px; height: 8px; 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-blue); }

.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.15); 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-group-label {
    padding: 8px 14px; font-size: 11px; font-weight: 700; color: var(--text-secondary);
    background: #F9FAFB; text-transform: uppercase; letter-spacing: 0.05em;
    pointer-events: none; position: sticky; top: 0; z-index: 2; border-bottom: 1px solid #E5E7EB;
}
.custom-option {
    padding: 10px 14px; 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-blue-light); color: var(--accent-blue-dark); }
.custom-option.selected { background: var(--accent-blue-light); color: var(--accent-blue-dark); font-weight: 600; }

.divider { border: 0; border-top: 1px solid #E5E7EB; margin: 20px 0; }

/* Range Slider */
.label-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.range-val { font-weight: 700; color: var(--accent-blue); font-size: 16px; }
.range-wrapper { padding: 0 2px; }

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%;
    background: var(--accent-blue); cursor: pointer; margin-top: -8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); border: 2px solid #fff;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer; background: #E5E7EB; border-radius: 2px;
}
.range-steps { display: flex; justify-content: space-between; margin-top: 8px; font-size: 10px; color: var(--text-secondary); }

/* --- КАРТОЧКА РЕЗУЛЬТАТА --- */
.card--blue { 
    background: var(--gradient-blue-card); 
    color: var(--text-on-blue); 
    border: 1px solid rgba(37, 99, 235, 0.2);
    overflow: visible;
}

.card--blue h2 { color: var(--text-on-blue) !important; margin-bottom: 0; opacity: 1; font-size: 20px; }

.result-header-row { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 16px; 
}

@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

.burn-result-big {
    font-size: 48px; font-weight: 800; line-height: 1; margin-bottom: 20px;
    display: flex; align-items: baseline; gap: 6px; 
    color: var(--text-on-blue) !important;
}
.burn-result-big small { font-size: 20px; opacity: 0.9; font-weight: 700; }

.summary-divider { height: 1px; background: rgba(23, 37, 84, 0.15); margin: 16px 0; }

/* --- FOOD EQUIVALENTS --- */
.food-grid-label {
    font-size: 12px; text-transform: uppercase; font-weight: 700;
    color: var(--text-on-blue); opacity: 0.7; margin-bottom: 12px;
}

.food-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

.food-item {
    background: rgba(255,255,255,0.6);
    border-radius: 10px; padding: 10px;
    display: flex; align-items: center; gap: 10px;
    transition: transform 0.2s;
    border: 1px solid rgba(255,255,255,0.4);
}
.food-item:hover { transform: translateY(-2px); background: rgba(255,255,255,0.8); }

.food-icon { font-size: 24px; line-height: 1; }
.food-info { display: flex; flex-direction: column; }
.food-info span { font-size: 16px; font-weight: 800; color: var(--text-on-blue); line-height: 1.2; }
.food-info small { font-size: 11px; font-weight: 600; opacity: 0.8; color: var(--text-on-blue); }

.tip-box { 
    font-size: 13px; opacity: 1; line-height: 1.4; 
    font-weight: 600; margin-top: 4px;
}
#tip-text { color: var(--text-on-blue) !important; }

/* --- НИЖНИЙ КОНТЕНТ (ИНФО) --- */
.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;
}
.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }

.blue-icon svg { color: #2563EB; }
.orange-icon svg { color: #F59E0B; }
.green-icon svg { color: #10B981; }

.small-heading { margin-top: 40px; margin-bottom: 16px; font-size: 20px; }
.small-heading .header-icon { width: 40px; height: 40px; }
.small-heading .header-icon svg { width: 20px; height: 20px; }

.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: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-radius: 16px; padding: 24px;
    transition: all 0.3s; display: flex; flex-direction: column;
}
.formula-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.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); }

.badge-blue { background: #2563EB; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-orange { background: #F59E0B; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }

.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.math-expression {
    background: #F9FAFB; border: 1px solid #E5E7EB;
    padding: 12px 16px; border-radius: 12px;
    font-weight: 700; color: var(--text-on-blue);
    text-align: center; margin-bottom: 16px; font-size: 15px;
}

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 48px 0; }
.calc-description p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description strong { color: var(--text-primary); }

.faq-blue-style .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 12px;
    overflow: hidden; transition: all 0.2s ease;
}
.faq-blue-style .faq-item[open] { border-color: var(--accent-blue); box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1); }
.faq-question { padding: 16px 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-blue-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-blue-style .faq-item[open] summary.faq-question { color: var(--accent-blue-dark); background: #DBEAFE; }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); line-height: 1; }
.faq-question .icon-plus { display: none; }
.faq-blue-style .faq-item[open] summary.faq-question::after { content: '−'; color: var(--accent-blue); }
.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }

@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .food-grid { grid-template-columns: 1fr 1fr; }
    .icon-heading { font-size: 20px; }
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { width: 100%; align-items: center; }
    .math-expression { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
}