/* calc/assets/css/calculators/olivier.css */

:root {
    --accent-green: #65A30D; /* Lime 600 */
    --accent-green-light: #ECFCCB; /* Lime 100 */
    --gradient-olivier-card: linear-gradient(135deg, #84CC16 0%, #4D7C0F 100%);
    --text-on-green: #ffffff;
    
    /* Цвета наполнения тазика */
    --salad-base: #F7FEE7;
    --salad-border: rgba(255,255,255,0.9);
}

.calc-header { margin-bottom: 28px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }

/* Grid */
.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; } }

/* Tabs */
.mode-switcher-tabs {
    display: flex; background: #F3F4F6; padding: 4px; border-radius: 12px; margin-bottom: 24px;
}
.mode-tab {
    flex: 1; padding: 12px; border: none; background: transparent;
    color: var(--text-secondary); font-weight: 600; font-size: 15px;
    border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.mode-tab.active { background: #fff; color: var(--accent-green); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

/* Inputs */
.input-block-title {
    font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-secondary); margin-bottom: 12px; font-weight: 700;
}

.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 15px; 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; padding-right: 40px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: all 0.2s;
    font-family: var(--font-main);
    background: #fff;
}
.input-wrapper input:focus { 
    border-color: var(--accent-green); 
    box-shadow: 0 0 0 3px rgba(101, 163, 13, 0.15); 
}
.suffix { position: absolute; right: 14px; color: var(--text-secondary); pointer-events: none; font-size: 14px; }
.helper-text { font-size: 13px; color: var(--text-secondary); margin-top: 6px; line-height: 1.4; }

/* Segment Control */
.segment-control { display: flex; gap: 8px; }
.segment-item { flex: 1; cursor: pointer; }
.segment-item input { display: none; }
.segment-box {
    border: 1px solid #E5E7EB; border-radius: 12px; padding: 12px 6px;
    text-align: center; background: #fff; transition: all 0.2s;
    display: flex; flex-direction: column; gap: 4px;
}
.segment-box span { font-size: 14px; font-weight: 600; color: var(--text-primary); }

.segment-item input:checked + .segment-box {
    border-color: var(--accent-green); background: var(--accent-green-light);
    color: var(--accent-green);
}
.segment-item input:checked + .segment-box span { color: #3F6212; }

/* Recipe Selector */
.recipe-selector { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.recipe-option { cursor: pointer; }
.recipe-option input { display: none; }
.recipe-card {
    border: 1px solid #E5E7EB; border-radius: 12px; padding: 12px 6px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    transition: all 0.2s; background: #fff;
}
.r-emoji { font-size: 28px; margin-bottom: 6px; }
.recipe-card span { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.recipe-option input:checked + .recipe-card {
    border-color: var(--accent-green); background: var(--accent-green-light);
    box-shadow: 0 4px 12px rgba(101, 163, 13, 0.1);
}
.recipe-option input:checked + .recipe-card span { color: #3F6212; }

/* Range */
.label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.range-val { font-size: 14px; font-weight: 700; color: var(--accent-green); }
.range-wrapper { position: relative; padding-bottom: 20px; }
.range-slider { width: 100%; cursor: pointer; accent-color: var(--accent-green); }
.range-steps { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* --- Result Card --- */
.card--olivier { background: var(--gradient-olivier-card); color: #fff; border: none; position: relative; overflow: hidden; }
.card--olivier h2 { color: rgba(255,255,255,0.95); margin-bottom: 16px; font-size: 16px; text-transform: uppercase; letter-spacing: 0.05em; }

/* === BOWL === */
.bowl-visual { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 24px; justify-content: center; }
.bowl-container { position: relative; width: 100px; height: 130px; }

.bowl-glass {
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.15); 
    border: 3px solid rgba(255,255,255,0.7);
    border-top: none; 
    border-radius: 5px 5px 40px 40px;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bowl-salad {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 0%;
    background: var(--salad-base); 
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 4px solid var(--salad-border);
}

/* Animation Particles */
.particle { position: absolute; border-radius: 50%; opacity: 0.7; }
.p1 { width: 8px; height: 8px; background: #84CC16; top: 20%; left: 20%; animation: float 3s infinite ease-in-out; }
.p2 { width: 6px; height: 6px; background: #F97316; border-radius: 2px; top: 50%; right: 30%; animation: float 4s infinite ease-in-out 1s; }
.p3 { width: 10px; height: 10px; background: #FDA4AF; border-radius: 3px; bottom: 20%; left: 40%; animation: float 3.5s infinite ease-in-out 0.5s; }
.p4 { width: 7px; height: 7px; background: #84CC16; top: 40%; left: 60%; animation: float 5s infinite ease-in-out 2s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.bowl-info { text-align: left; }
.total-weight-box { font-size: 48px; font-weight: 800; line-height: 1; }
.total-weight-box small { font-size: 20px; font-weight: 600; opacity: 0.9; }
.basin-count { font-size: 15px; opacity: 0.95; margin-top: 6px; font-weight: 500; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 24px 0; }

.ingredients-list { display: flex; flex-direction: column; gap: 12px; }
.ing-row { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.15);
}
.ing-row:last-child { border-bottom: none; }
.ing-name { font-size: 15px; font-weight: 500; opacity: 0.95; }
.ing-val { font-size: 16px; font-weight: 700; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 40px 0; }

/* Content & Formulas */
.info-wrapper { padding: 40px 0; margin-top: 40px; 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: 12px; margin-bottom: 20px; font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.header-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.04); flex-shrink: 0; margin-top: -2px; }
.header-icon svg { width: 20px; height: 20px; stroke-width: 2px; }

/* Intro text fix */
.intro-text { 
    font-size: 16px; /* Увеличен */
    color: var(--text-secondary); 
    margin-bottom: 32px; 
    line-height: 1.6; 
}

.green-icon svg { color: var(--accent-green); }
.orange-icon svg { color: #EA580C; }

.formulas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.formula-card { background: #fff; border: 1px solid rgba(0,0,0,0.04); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); border-radius: 20px; padding: 24px; }
.formula-header { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.formula-card h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.formula-card p { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.badge-green { background: #ECFCCB; color: #3F6212; padding: 4px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.badge-dark { background: #1F2937; color: #fff; padding: 4px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.math-expression { background: #F7FEE7; border: 1px solid #ECFCCB; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: #4D7C0F; text-align: center; margin-bottom: 12px; font-size: 15px; }

.calc-description p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 20px; }
.calc-description strong { color: var(--text-primary); }

/* FAQ */
.faq-green-style .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; margin-bottom: 10px; overflow: hidden; transition: all 0.2s ease; }
.faq-green-style .faq-item[open] { border-color: var(--accent-green); box-shadow: 0 4px 16px rgba(101, 163, 13, 0.1); }
.faq-green-style summary.faq-question { padding: 14px 18px; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-green-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-green-style .faq-item[open] summary.faq-question { color: #3F6212; background: #ECFCCB; }
.faq-question::after { content: '+'; font-size: 18px; color: var(--text-secondary); }
.faq-green-style .faq-item[open] summary.faq-question::after { content: '−'; color: #3F6212; }
.faq-answer { padding: 18px; color: var(--text-secondary); line-height: 1.6; font-size: 14px; }

/* 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; flex-direction: column; align-items: center; text-align: center; }
    .header-icon { width: 40px; height: 40px; margin-top: 0; }
    .header-icon svg { width: 20px; height: 20px; }
    
    /* Центрирование интро-текста и формул */
    .intro-text { text-align: center; }
    .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: 30px; padding-top: 30px; }
}