/* --- Стили для Кофе (Coffee Theme) --- */
:root {
    --accent-coffee: #92400E; /* Amber 800 */
    --accent-coffee-light: #FFFBEB;
    --gradient-coffee-card: linear-gradient(135deg, #B45309 0%, #78350F 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; } }

/* Inputs */
.calc-inputs { gap: 16px; }
.input-group { margin-bottom: 16px; }
.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: 14px 16px; 
    font-size: 18px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: border 0.2s;
    font-family: var(--font-main);
    box-sizing: border-box;
}
.input-wrapper input:focus { border-color: var(--accent-coffee); box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15); }

/* Coffee Selector */
.coffee-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coffee-option { cursor: pointer; }
.coffee-option input { display: none; }
.coffee-card {
    border: 1px solid #E5E7EB; border-radius: 10px; padding: 10px;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.2s; background: #fff; height: 100%;
}
.c-icon { font-size: 20px; }
.coffee-card span { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.coffee-option input:checked + .coffee-card {
    border-color: var(--accent-coffee); background: var(--accent-coffee-light);
    color: var(--accent-coffee); box-shadow: 0 2px 8px rgba(180, 83, 9, 0.1);
}
.coffee-option input:checked + .coffee-card span { color: var(--accent-coffee); }

/* Counter */
.counter-round {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    background: #fff; border-radius: 20px; padding: 2px; border: 1px solid #E5E7EB;
    height: 52px; 
}
.counter-round button {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: #F3F4F6; color: var(--text-primary); font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 18px; padding: 0; padding-bottom: 2px;
}
.counter-round input {
    width: 40px; text-align: center; border: none; font-weight: 700; font-size: 18px; padding: 0;
    background: transparent; font-family: var(--font-main);
}

.helper-text { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Результаты (Coffee Card) --- */
.card--coffee { 
    background: var(--gradient-coffee-card); 
    color: #fff; 
    border: none; 
    min-height: 380px; 
}

/* Tabs */
.tabs-header {
    display: flex; background: rgba(0,0,0,0.2); 
    border-radius: 12px; padding: 4px; margin-bottom: 24px;
}
.tab-btn {
    flex: 1; border: none; background: transparent; color: rgba(255,255,255,0.7);
    padding: 8px; font-weight: 600; cursor: pointer; border-radius: 8px; transition: all 0.2s;
}
.tab-btn.active { background: #fff; color: var(--accent-coffee); }

/* Tab Content */
.tab-content h2 { margin-bottom: 20px; font-size: 18px; text-align: center; color: rgba(255,255,255,0.95); }

/* Heart Visual */
.heart-visual {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 24px;
}
.heart-icon {
    font-size: 64px; margin-bottom: 8px;
    animation: heartbeat 1s infinite;
}
@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
}

.heart-val { text-align: center; line-height: 1; }
.heart-val span { font-size: 40px; font-weight: 800; }
.heart-val small { display: block; font-size: 12px; opacity: 0.8; text-transform: uppercase; margin-top: 4px; }

/* Progress Bar */
.progress-bar-container { margin-bottom: 24px; }
.pb-track { height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.pb-fill { height: 100%; width: 0%; background: #fff; transition: width 0.3s, background-color 0.3s; }
.pb-labels { display: flex; justify-content: space-between; font-size: 10px; opacity: 0.7; }

/* Money Visual */
.money-big { text-align: center; margin-bottom: 24px; }
.money-big span { font-size: 48px; font-weight: 800; line-height: 1; }
.money-big small { font-size: 24px; font-weight: 600; opacity: 0.8; }

.invest-box {
    background: rgba(255,255,255,0.15); border-radius: 12px; padding: 16px;
    backdrop-filter: blur(4px); text-align: center;
}
.invest-title { font-size: 12px; text-transform: uppercase; opacity: 0.8; margin-bottom: 8px; }
.invest-val { font-size: 24px; font-weight: 800; margin-bottom: 8px; color: #FEF3C7; }

/* ИСПРАВЛЕНО: Белый цвет текста описания */
.invest-desc { 
    font-size: 13px; 
    line-height: 1.5; 
    opacity: 0.95; 
    margin: 0; 
    color: #ffffff !important; /* Перебиваем глобальный .card p */
}
.invest-desc strong { color: #fff; text-decoration: underline; text-decoration-style: dotted; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 24px 0; }

/* ИСПРАВЛЕНО: Белый цвет подсказки */
.tip-box {
    font-size: 13px; line-height: 1.5; 
    color: #ffffff !important; /* Белый */
    background: rgba(0, 0, 0, 0.3); 
    padding: 16px; border-radius: 12px;
}
.tip-box p { margin: 0; color: #ffffff !important; }

/* --- НОВЫЕ ИНФОРМАЦИОННЫЕ БЛОКИ (Адаптация под Coffee/Brown) --- */

.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; }
.red-icon svg { color: #EF4444; }
.brown-icon svg { color: #92400E; } /* Coffee Brown */

/* Маленькие подзаголовки */
.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 20px rgba(0,0,0,0.03);
    border-radius: 24px; 
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}
.formula-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }

/* Вертикальный хедер (бейдж сверху) */
.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-blue {
    background: #2563EB; color: #fff;
    padding: 6px 12px; border-radius: 99px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block;
}
.badge-green {
    background: #10B981; color: #fff;
    padding: 6px 12px; border-radius: 99px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block;
}

.formula-card p {
    font-size: 14px; color: var(--text-secondary);
    margin: 0; line-height: 1.5; font-weight: 500;
}

.math-expression {
    background: #FFFBEB; /* Coffee Light */
    border: 1px solid #FEF3C7;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--accent-coffee); /* Coffee Accent */
    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 (Новый стиль под Coffee) */
.faq-section .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 12px;
    overflow: hidden; transition: all 0.2s ease;
}

.faq-section .faq-item[open] {
    border-color: var(--accent-coffee); 
    box-shadow: 0 4px 20px rgba(180, 83, 9, 0.15); /* Coffee Shadow */
}

summary.faq-question {
    padding: 16px 20px; cursor: pointer;
    font-weight: 600; color: var(--text-primary);
    list-style: none; position: relative;
    display: flex; justify-content: space-between;
    align-items: center; transition: background 0.2s;
}

summary.faq-question:hover { background-color: #F9FAFB; }

.faq-section .faq-item[open] summary.faq-question {
    color: var(--accent-coffee);
    background: #FFFBEB;
}

.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: var(--accent-coffee);
}

.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; }
    .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; }
}