/* calc/assets/css/calculators/shuba.css */

/* --- Shuba Theme --- */
:root {
    --shuba-bg: #FDF2F8;
    --shuba-primary: #831843; /* Pink 900 */
    --shuba-accent: #DB2777;  /* Pink 600 */
    --shuba-light: #FBCFE8;
    
    /* Layer Colors */
    --col-beet: #9D174D;
    --col-carrot: #F97316;
    --col-potato: #FDE047; /* Creamy yellow */
    --col-herring: #9CA3AF; /* Greyish */
    --col-onion: #F3F4F6;
    --col-egg: #FEF3C7;
    --col-mayo: #FFFBEB; /* Creamy Mayo */
    --col-apple: #BEF264;
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }

/* Grid Layout */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1fr 1fr; } }

/* Inputs */
.calc-inputs { padding: 24px; }

.input-section-title { 
    font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; 
    color: var(--text-secondary); 
    margin-bottom: 24px; font-weight: 800;
    border-bottom: 1px solid #F3F4F6; padding-bottom: 8px;
    margin-top: 12px;
}
.input-section-title.second-title { margin-top: 40px; }

/* --- Mode Switcher --- */
.mode-tabs {
    display: flex; background: #F3F4F6; border-radius: 12px; padding: 4px;
    margin-bottom: 24px;
}
.mode-tab {
    flex: 1; text-align: center; cursor: pointer; position: relative;
}
.mode-tab input { display: none; }
.mode-tab span {
    display: block; padding: 10px; font-size: 14px; font-weight: 600;
    color: var(--text-secondary); border-radius: 10px; transition: all 0.2s;
}
.mode-tab input:checked + span {
    background: #fff; color: var(--shuba-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.mode-group.hidden { display: none; }

/* Standard Inputs */
.input-group { margin-bottom: 24px; }
.label-row { display: flex; justify-content: space-between; margin-bottom: 12px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.range-val { font-weight: 700; color: var(--shuba-accent); }

/* Range Slider */
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(--shuba-accent); cursor: pointer; margin-top: -8px;
    border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
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: 11px; color: var(--text-secondary); }

/* Select */
.input-wrapper { position: relative; }
.input-wrapper select {
    width: 100%; padding: 14px; padding-right: 40px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: border 0.2s; appearance: none; background: #fff;
}
.input-wrapper select:focus { border-color: var(--shuba-accent); box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.1); }
.select-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-secondary); display: flex; }

/* Radio Cards */
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card input { display: none; }
.rc-content {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border: 2px solid #E5E7EB; border-radius: 12px; padding: 12px 8px;
    cursor: pointer; transition: all 0.2s; color: var(--text-secondary); text-align: center;
}
.rc-icon { font-size: 24px; line-height: 1; margin-bottom: 4px; }
.rc-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.rc-desc { font-size: 11px; opacity: 0.7; }

.radio-card input:checked + .rc-content {
    border-color: var(--shuba-accent); background: #FCE7F3; color: var(--shuba-primary);
}

/* Toggle Switch */
.switch-group { margin-top: 10px; }
.switch-label { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.switch-text { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.switch-toggle {
    position: relative; width: 44px; height: 24px; background: #E5E7EB;
    border-radius: 99px; transition: 0.3s;
}
.switch-toggle::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 20px; height: 20px; background: #fff; border-radius: 50%;
    transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
input[type=checkbox] { display: none; }
input:checked + .switch-toggle { background: var(--shuba-accent); }
input:checked + .switch-toggle::after { transform: translateX(20px); }


/* --- VISUALIZER --- */
.salad-visualizer {
    background: #fff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px; padding: 24px; margin-bottom: 24px;
    overflow: hidden;
}

.visualizer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.badge-shuba { background: #FCE7F3; color: var(--shuba-accent); padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.total-weight { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.salad-bowl-container {
    display: flex; gap: 16px; align-items: flex-end; justify-content: center;
}

.salad-bowl {
    width: 200px; height: 240px; 
    border-bottom-left-radius: 40px; border-bottom-right-radius: 40px;
    border: 3px solid rgba(131, 24, 67, 0.2); /* Темная граница */
    border-top: none;
    background: rgba(255,255,255,0.4); /* Чуть белее */
    box-shadow: 0 10px 30px rgba(131, 24, 67, 0.1), inset 0 -5px 15px rgba(0,0,0,0.03); /* Тень */
    position: relative; overflow: hidden;
    display: flex; align-items: flex-end;
}
/* Стеклянный блик */
.salad-bowl::after {
    content: ''; position: absolute; top: 0; left: 10%; width: 20%; height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), transparent);
    pointer-events: none; z-index: 10;
}

.salad-stack {
    width: 100%; display: flex; flex-direction: column-reverse; /* Снизу вверх */
    width: 100%;
}

/* Layers Styles */
.s-layer {
    width: 100%; transition: height 0.4s ease;
    position: relative;
}
/* Textures */
.type-herring { background: #9CA3AF; background-image: radial-gradient(#6B7280 15%, transparent 16%); background-size: 6px 6px; }
.type-potato { background: #FEF3C7; border-bottom: 1px solid #FDE68A; }
.type-onion { background: #F3F4F6; opacity: 0.9; }
.type-carrot { background: #F97316; background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.2) 5px, rgba(255,255,255,0.2) 10px); }
.type-beet { background: #9D174D; background-image: radial-gradient(circle at 50% 0, #831843, transparent); }
.type-egg { background: #FFFBEB; border-top: 2px dotted #FCD34D; }
.type-apple { background: #BEF264; opacity: 0.8; }

/* ИСПРАВЛЕНО: Майонез теперь виден */
.type-mayo { 
    background: #FFFBEB; /* Creamy */
    margin: 1px 0; 
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.type-mayo_top { 
    background: #FFFBEB; border-radius: 10px 10px 0 0; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    position: relative;
    border-bottom: 2px solid #F3F4F6;
}
/* Зелень на шапке */
.type-mayo_top::before {
    content: '🌿'; font-size: 14px; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
}

/* Labels Counter */
.layer-labels {
    display: flex; flex-direction: column-reverse; gap: 2px;
    height: 100%; padding-bottom: 10px;
    font-size: 10px; color: var(--text-secondary); font-weight: 600;
    justify-content: flex-end;
}
.l-tag { display: flex; align-items: center; height: 20px; white-space: nowrap; }
.l-tag::before { content: '— '; margin-right: 4px; opacity: 0.5; }


/* Shopping List */
.result-card.card--beet {
    background: #fff; border: 1px solid rgba(131, 24, 67, 0.1); padding: 20px; border-radius: 20px;
    box-shadow: var(--shadow-soft);
}
.result-card h3 { font-size: 16px; margin: 0 0 16px 0; color: var(--shuba-primary); }

.shopping-grid { display: flex; flex-direction: column; gap: 12px; }
.shop-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #E5E7EB; padding-bottom: 4px; }
.s-name { font-size: 14px; color: var(--text-secondary); }
.s-val { font-size: 15px; font-weight: 700; color: var(--text-primary); }

.shop-note { font-size: 11px; color: var(--text-secondary); margin-top: -8px; margin-bottom: 4px; opacity: 0.8; }

.highlight-row { background: #FDF2F8; padding: 8px; border-radius: 8px; border: none; margin-top: 4px; }
.highlight-row .s-name { color: var(--shuba-primary); font-weight: 600; }
.highlight-row .s-val { color: var(--shuba-accent); }

.cal-footer { margin-top: 16px; font-size: 12px; text-align: center; color: var(--text-secondary); background: #F9FAFB; padding: 8px; border-radius: 8px; }


/* --- INFO & FAQ --- */
.info-wrapper { padding: 60px 0 60px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.06); width: 100%; }
.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; }
.beet-icon svg { color: #9D174D; }
.pink-icon svg { color: #DB2777; }
.blue-icon svg { color: #2563EB; }
.orange-icon svg { color: #EA580C; }

.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: var(--shadow-soft); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; }
.formula-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.formula-header { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.badge-beet { background: #9D174D; color: #fff; padding: 4px 10px; border-radius: 99px; font-size: 10px; text-transform: uppercase; font-weight: 700; align-self: flex-start; }
.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }

.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); }
.calc-description ul { padding-left: 20px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description li { margin-bottom: 8px; }

/* TABLE STYLES (New) */
.cooking-table-section { margin-bottom: 48px; }
.small-heading { margin-bottom: 24px; font-size: 20px; }
.table-wrapper { overflow-x: auto; border-radius: 12px; border: 1px solid #E5E7EB; }
.data-table-simple { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.data-table-simple th { background: #F9FAFB; padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid #E5E7EB; }
.data-table-simple td { padding: 12px 16px; border-bottom: 1px solid #F3F4F6; color: var(--text-primary); }
.data-table-simple tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-fuel-style .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-fuel-style .faq-item[open] { border-color: var(--shuba-accent); box-shadow: 0 4px 20px rgba(219, 39, 119, 0.1); }
.faq-fuel-style 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; }
.faq-fuel-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-fuel-style .faq-item[open] summary.faq-question { color: var(--shuba-accent); background: #FCE7F3; }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); font-weight: 400; line-height: 1; }
.faq-question .icon-plus { display: none; }
.faq-fuel-style .faq-item[open] summary.faq-question::after { content: '−'; color: var(--shuba-accent); }
.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; border-top: 1px solid #F3F4F6; }

@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { 
        justify-content: center !important; text-align: center !important; 
        flex-direction: row !important; width: 100%; gap: 12px;
    }
    .header-icon { margin: 0; }
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { align-items: center; width: 100%; }
    .badge-beet { align-self: center; }
    .info-wrapper { margin-top: 40px; padding-top: 40px; }
}