/* ==========================================
   ПЕРЕМЕННЫЕ — ЯРКАЯ ПАЛИТРА
   ========================================== */
:root {
    --mirmylapro-teal: #0d9488;
    --mirmylapro-teal-light: #2dd4bf;
    --mirmylapro-teal-dark: #0f766e;
    --mirmylapro-gold: #f59e0b;
    --mirmylapro-gold-light: #fbbf24;
    --mirmylapro-rose: #f43f5e;
    --mirmylapro-green: #22c55e;
    --mirmylapro-red: #ef4444;
    --mirmylapro-yellow: #eab308;
    --mirmylapro-bg: #fefce8;
    --mirmylapro-card-bg: #ffffff;
    --mirmylapro-shadow: rgba(13, 148, 136, 0.08);
    --mirmylapro-shadow-hover: rgba(13, 148, 136, 0.18);
    --mirmylapro-radius: 16px;
    --mirmylapro-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   ОБЩИЙ ФОН И ТЕКСТ
   ========================================== */
#mirmylapro-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 25px;
    background: linear-gradient(145deg, #fefce8 0%, #f0fdfa 100%);
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(13, 148, 136, 0.10);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#mirmylapro-app h2 {
    color: var(--mirmylapro-teal-dark);
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 0.2em;
    text-shadow: 0 2px 4px rgba(13, 148, 136, 0.10);
    font-family: 'Playfair Display', Georgia, serif;
}

#mirmylapro-app p {
    color: #475569;
    text-align: center;
}

/* ==========================================
   ГРУППЫ (секции)
   ========================================== */
.mirmylapro-group {
    margin: 20px 0;
}
.mirmylapro-group h3 {
    color: var(--mirmylapro-teal-dark);
    font-size: 1.4em;
    font-family: 'Playfair Display', Georgia, serif;
    border-bottom: 3px solid var(--mirmylapro-gold-light);
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.mirmylapro-group h4 {
    color: #1e293b;
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 10px;
}

/* ==========================================
   КАРТОЧКИ ВЫБОРА — ЯРКАЯ ПОДСВЕТКА
   ========================================== */
.mirmylapro-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.mirmylapro-card {
    border: 2px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    background: #ffffff;
    transition: all var(--mirmylapro-transition);
    flex: 1 1 auto;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mirmylapro-card:hover {
    transform: translateY(-3px);
    border-color: var(--mirmylapro-teal-light);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.15);
}

.mirmylapro-card.active {
    background: linear-gradient(135deg, var(--mirmylapro-teal), var(--mirmylapro-teal-dark));
    color: #ffffff;
    border-color: var(--mirmylapro-teal-dark);
    box-shadow: 0 6px 28px rgba(13, 148, 136, 0.45);
    transform: translateY(-3px);
    outline: 2px solid rgba(13, 148, 136, 0.2);
    outline-offset: 2px;
}

.mirmylapro-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2c7a7b;
    cursor: pointer;
    flex-shrink: 0;
}

.mirmylapro-card.active input[type="checkbox"] {
    accent-color: #ffffff;
}

/* ==========================================
   ЧЕКБОКСЫ — ЯРКИЕ И НАГЛЯДНЫЕ
   ========================================== */
.mirmylapro-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: #1e293b;
    transition: all var(--mirmylapro-transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    user-select: none;
}

.mirmylapro-checkbox-label:hover {
    border-color: var(--mirmylapro-teal-light);
    transform: translateY(-2px);
}

.mirmylapro-checkbox-label.active {
    background: #ecfdf5;
    border-color: var(--mirmylapro-teal);
    color: var(--mirmylapro-teal-dark);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.mirmylapro-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2c7a7b;
    cursor: pointer;
    flex-shrink: 0;
}

/* Специально для "Мягкое и безопасное мыло" */
#safe_composition_label.active {
    background: #fef3c7;
    border-color: var(--mirmylapro-gold);
    color: #92400e;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

/* ==========================================
   АККОРДЕОН ДЛЯ ДОБАВОК
   ========================================== */
.mirmylapro-accordion {
    border: 1px solid #ecfdf5;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.mirmylapro-accordion-header {
    cursor: pointer;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #ecfdf5;
    transition: background 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.mirmylapro-accordion-header:hover {
    background: #ecfdf5;
}

.mirmylapro-accordion-header span {
    font-weight: 600;
    color: #065f46;
    font-size: 1em;
}

.mirmylapro-accordion-header #additive-count {
    font-weight: 400;
    color: #64748b;
    font-size: 0.85em;
    margin-left: 6px;
}

.mirmylapro-accordion-header #additive-arrow {
    font-size: 1.2em;
    color: #64748b;
    transition: transform 0.3s ease;
}

.mirmylapro-accordion-body {
    padding: 15px 16px;
    display: none;
}

/* Поиск по добавкам */
#additive-search {
    width: 100%;
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-size: 0.9em;
    transition: border-color 0.3s ease;
    outline: none;
}

#additive-search:focus {
    border-color: var(--mirmylapro-teal);
}

/* Кнопка сброса добавок */
#reset-additives-btn {
    padding: 6px 18px;
    background: #fee2e2;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    color: #991b1b;
    transition: all 0.3s ease;
    font-size: 0.85em;
}

#reset-additives-btn:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* ==========================================
   КНОПКИ — ЯРКИЕ И ОБЪЁМНЫЕ
   ========================================== */
#mirmylapro-submit {
    background: linear-gradient(135deg, var(--mirmylapro-teal), var(--mirmylapro-teal-dark));
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 1.2em;
    font-weight: 700;
    border-radius: 60px;
    cursor: pointer;
    display: block;
    margin: 30px auto 15px;
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.35);
    transition: all var(--mirmylapro-transition);
    letter-spacing: 0.5px;
}

#mirmylapro-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(13, 148, 136, 0.45);
}

#mirmylapro-more-btn {
    background: linear-gradient(135deg, var(--mirmylapro-gold), #d97706);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 60px;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.30);
    transition: all var(--mirmylapro-transition);
    display: none;
    margin: 20px auto;
}

#mirmylapro-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(245, 158, 11, 0.40);
}

/* ==========================================
   КНОПКА "ОБНОВИТЬ ЭТОТ РЕЦЕПТ"
   ========================================== */
.mirmylapro-update-recipe-btn {
    background: #f1f5f9;
    border: none;
    border-radius: 50px;
    padding: 6px 18px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
}

.mirmylapro-update-recipe-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.mirmylapro-update-recipe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   КАРТОЧКИ РЕЦЕПТОВ — ТЕНИ И ГРАДИЕНТЫ
   ========================================== */
.mirmylapro-recipe-card {
    background: #ffffff;
    border: 1px solid #ecfdf5;
    border-radius: var(--mirmylapro-radius);
    padding: 24px 22px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px var(--mirmylapro-shadow);
    transition: all var(--mirmylapro-transition);
    animation: fadeSlideUp 0.5s ease forwards;
    opacity: 0;
}

.mirmylapro-recipe-card:nth-child(2) { animation-delay: 0.1s; }
.mirmylapro-recipe-card:nth-child(3) { animation-delay: 0.2s; }
.mirmylapro-recipe-card:nth-child(4) { animation-delay: 0.3s; }

.mirmylapro-recipe-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px var(--mirmylapro-shadow-hover);
    border-color: var(--mirmylapro-teal-light);
}

.mirmylapro-recipe-card h4 {
    color: var(--mirmylapro-teal-dark);
    font-size: 1.3em;
    border-bottom: 3px solid var(--mirmylapro-gold-light);
    padding-bottom: 10px;
    margin-top: 0;
    font-family: 'Playfair Display', Georgia, serif;
}

.mirmylapro-recipe-card .recipe-meta {
    font-size: 0.85em;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==========================================
   БЛОК СВОЙСТВ — ЯРКАЯ ПАЛИТРА
   ========================================== */
.properties-block {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #ecfdf5;
}

.property-legend {
    width: 100%;
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 0.8em;
    color: #64748b;
}
.property-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}
.dot.green { background: var(--mirmylapro-green); }
.dot.yellow { background: var(--mirmylapro-yellow); }
.dot.red { background: var(--mirmylapro-red); }

.property-block {
    flex: 1 1 calc(33% - 10px);
    min-width: 180px;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 6px solid #ccc;
    background: #fafafa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: all var(--mirmylapro-transition);
}

/* ЯРКИЕ ЦВЕТА */
.property-block.green {
    border-left-color: var(--mirmylapro-green);
    background: #ecfdf5;
}
.property-block.yellow {
    border-left-color: var(--mirmylapro-yellow);
    background: #fefce8;
}
.property-block.red {
    border-left-color: var(--mirmylapro-red);
    background: #fef2f2;
}

.prop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    margin-bottom: 4px;
}
.prop-name {
    font-weight: 600;
    color: #1e293b;
}
.prop-status {
    font-size: 0.75em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: #e2e8f0;
    color: #475569;
}
.property-block.green .prop-status { background: #d1fae5; color: #065f46; }
.property-block.yellow .prop-status { background: #fef3c7; color: #92400e; }
.property-block.red .prop-status { background: #fee2e2; color: #991b1b; }

.prop-content {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}
.prop-value {
    font-size: 1.2em;
    font-weight: 700;
    color: #1e293b;
}
.prop-range {
    font-size: 0.8em;
    color: #64748b;
}
.property-bar-wrapper {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}
.property-bar {
    height: 100%;
    border-radius: 3px;
    background: #cbd5e1;
}
.property-block.green .property-bar { background: var(--mirmylapro-green); }
.property-block.yellow .property-bar { background: var(--mirmylapro-yellow); }
.property-block.red .property-bar { background: var(--mirmylapro-red); }

/* ==========================================
   БЛОК ДОБАВОК — КОМПАКТНЫЙ
   ========================================== */
.mirmylapro-additives-block {
    margin: 15px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--mirmylapro-teal);
}

.additives-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.additive-item {
    flex: 1 1 calc(33% - 20px);
    min-width: 200px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.additive-item.compatible {
    border-left: 4px solid var(--mirmylapro-green);
    background: #f0fdf4;
}

.additive-item.incompatible {
    border-left: 4px solid var(--mirmylapro-red);
    background: #fff5f5;
    opacity: 0.8;
}

.additive-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    flex-wrap: wrap;
}

.add-icon {
    font-size: 1.1em;
}

.add-name {
    font-weight: 700;
    color: #1e293b;
}

.add-type {
    background: #e2e8f0;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
}

.compat-label {
    font-size: 0.8em;
    font-weight: 700;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
}

.additive-item.compatible .compat-label { background: #d1fae5; color: #065f46; }
.additive-item.incompatible .compat-label { background: #fee2e2; color: #991b1b; }

.add-desc {
    font-size: 0.85em;
    color: #555;
    line-height: 1.3;
}

.add-meta {
    font-size: 0.8em;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 5px;
}

.add-warning {
    font-size: 0.8em;
    color: var(--mirmylapro-red);
    font-weight: bold;
}

/* ==========================================
   ПРЕДУПРЕЖДЕНИЯ
   ========================================== */
.aggressive-warning {
    background: #fef2f2;
    border-left: 6px solid var(--mirmylapro-red);
    color: #991b1b;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
    margin: 10px 0;
}

.aggressive-ok {
    background: #f0fdf4;
    border-left: 6px solid var(--mirmylapro-green);
    color: #166534;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.12);
    margin: 10px 0;
}

/* ==========================================
   КНОПКИ ДЕЙСТВИЙ В КАРТОЧКАХ
   ========================================== */
.mirmylapro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mirmylapro-action-btn {
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    background: #f1f5f9;
    color: #1e293b;
    transition: all var(--mirmylapro-transition);
    cursor: pointer;
}

.mirmylapro-action-btn:hover {
    background: var(--mirmylapro-teal);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.25);
}

.mirmylapro-archive-btn {
    background: #fee2e2;
    color: #991b1b;
}
.mirmylapro-archive-btn:hover {
    background: var(--mirmylapro-red);
    color: #fff;
}

.mirmylapro-restore-btn {
    background: #d1fae5;
    color: #065f46;
}
.mirmylapro-restore-btn:hover {
    background: var(--mirmylapro-green);
    color: #fff;
}

.mirmylapro-toggle-recipe {
    background: #e8f5e9;
    color: #1b5e20;
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--mirmylapro-transition);
}
.mirmylapro-toggle-recipe:hover {
    background: #c8e6c9;
    transform: translateY(-2px);
}

.mirmylapro-pdf-btn {
    background: #e3f2fd;
    color: #0d47a1;
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--mirmylapro-transition);
}
.mirmylapro-pdf-btn:hover {
    background: #bbdefb;
    transform: translateY(-2px);
}

.mirmylapro-save-recipe {
    background: linear-gradient(135deg, var(--mirmylapro-teal), var(--mirmylapro-teal-dark));
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--mirmylapro-transition);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.20);
}
.mirmylapro-save-recipe:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.30);
}

.mirmylapro-favorite-btn-small {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all var(--mirmylapro-transition);
    width: 100%;
}
.mirmylapro-favorite-btn-small:hover {
    background: #ecfdf5;
    border-color: var(--mirmylapro-teal);
    transform: translateY(-2px);
}

/* ==========================================
   РАДАРНАЯ ДИАГРАММА
   ========================================== */
.radar-container {
    background: #fafafa;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 0 0 2px #ecfdf5, 0 8px 24px rgba(0,0,0,0.04);
    width: 250px;
    height: 250px;
    margin: 10px auto;
    position: relative;
}

/* ==========================================
   МОДАЛЬНЫЕ ОКНА
   ========================================== */
.mirmylapro-modal-content {
    background: #fefce8;
    border: 2px solid var(--mirmylapro-teal-light);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   ЛИЧНЫЙ КАБИНЕТ — ВКЛАДКИ
   ========================================== */
.mirmylapro-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecfdf5;
    padding-bottom: 15px;
}

.mirmylapro-tab {
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--mirmylapro-transition);
}
.mirmylapro-tab:hover {
    background: #ecfdf5;
    color: var(--mirmylapro-teal);
    transform: translateY(-2px);
}
.mirmylapro-tab.active {
    background: var(--mirmylapro-teal);
    color: #ffffff;
    border-color: var(--mirmylapro-teal);
}

/* ==========================================
   БЛОК ОТПРАВКИ НА ПОЧТУ
   ========================================== */
#mirmylapro-send-block {
    display: none;
    margin-top: 30px;
    padding: 20px;
    border: 2px solid var(--mirmylapro-teal-light);
    border-radius: 16px;
    background: #f0fdfa;
}

#mirmylapro-send-email-btn {
    background: var(--mirmylapro-teal);
    color: #fff;
    padding: 10px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--mirmylapro-transition);
}
#mirmylapro-send-email-btn:hover {
    background: var(--mirmylapro-teal-dark);
    transform: translateY(-2px);
}

/* ==========================================
   ГАЛЕРЕЯ ФОТО
   ========================================== */
.mirmylapro-recipe-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.mirmylapro-recipe-gallery .gallery-item {
    flex: 0 0 calc(33.33% - 10px);
    min-width: 150px;
}

.mirmylapro-recipe-gallery .gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.mirmylapro-recipe-gallery .gallery-item img:hover {
    transform: scale(1.02);
}

/* ==========================================
   БЛОК "ПОХОЖИЕ РЕЦЕПТЫ"
   ========================================== */
.mirmylapro-similar-block {
    margin-top: 30px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.mirmylapro-similar-block h3 {
    color: var(--mirmylapro-teal);
}

.mirmylapro-similar-block ul {
    padding-left: 20px;
}

.mirmylapro-similar-block a {
    color: var(--mirmylapro-teal);
}


/* ==========================================
   НОВОЕ (ВЕРСИЯ 2.1.0): UI ПЕРЕЖИРА
   Стили для переключателя Simple/Advanced
   и всех связанных полей.
   ========================================== */

/* ------------------------------------------
   ОБЁРТКА СЕКЦИИ ПЕРЕЖИРА
   ------------------------------------------ */
.mirmylapro-superfat-block {
    margin: 15px 0;
    padding: 18px 20px;
    background: #f8fafc;
    border-radius: 14px;
    border: 2px solid #d1fae5;
    transition: all var(--mirmylapro-transition);
}

.mirmylapro-superfat-block:hover {
    border-color: var(--mirmylapro-teal-light);
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.08);
}

.mirmylapro-superfat-block h4 {
    color: #065f46;
    font-weight: 700;
    font-size: 1.1em;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mirmylapro-superfat-block > p {
    color: #64748b;
    font-size: 0.88em;
    margin-bottom: 14px;
    line-height: 1.5;
    text-align: left;
}

/* ------------------------------------------
   ПЕРЕКЛЮЧАТЕЛЬ РЕЖИМА
   ------------------------------------------ */
.superfat-mode-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px;
    background: #ffffff;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    max-width: 520px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all var(--mirmylapro-transition);
}

.superfat-mode-switch:hover {
    border-color: var(--mirmylapro-teal-light);
}

.superfat-mode-option {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all var(--mirmylapro-transition);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.superfat-mode-option:hover:not(.active) {
    background: #f1f5f9;
    color: var(--mirmylapro-teal-dark);
}

.superfat-mode-option.active {
    background: linear-gradient(135deg, var(--mirmylapro-teal), var(--mirmylapro-teal-dark));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(44, 122, 123, 0.25);
    transform: translateY(-1px);
}

.superfat-mode-option input[type="radio"] {
    display: none;
}

.superfat-mode-option span {
    pointer-events: none;
}

/* ------------------------------------------
   ПОДСКАЗКА ПОД ПЕРЕКЛЮЧАТЕЛЕМ
   ------------------------------------------ */
.superfat-mode-hint {
    font-size: 0.82em;
    color: #64748b;
    margin: 0 0 15px 0;
    line-height: 1.4;
    text-align: left;
    padding-left: 4px;
}

.superfat-mode-hint strong {
    color: var(--mirmylapro-teal-dark);
    font-weight: 600;
}

/* ------------------------------------------
   КОНТЕЙНЕРЫ SIMPLE И ADVANCED
   ------------------------------------------ */
#superfat_simple_container,
#superfat_advanced_container {
    padding: 14px 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all var(--mirmylapro-transition);
}

#superfat_simple_container:hover,
#superfat_advanced_container:hover {
    border-color: var(--mirmylapro-teal-light);
}

#superfat_advanced_container > p {
    font-size: 0.88em;
    color: #475569;
    margin: 0 0 12px 0;
    line-height: 1.5;
    text-align: left;
}

#superfat_advanced_container > p strong {
    color: var(--mirmylapro-teal-dark);
}

/* ------------------------------------------
   СЛАЙДЕР ПЕРЕЖИРА
   ------------------------------------------ */
#superfat_slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(90deg, var(--mirmylapro-teal-light) 0%, var(--mirmylapro-teal) 100%);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    transition: all var(--mirmylapro-transition);
}

#superfat_slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--mirmylapro-teal);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
    transition: all 0.2s ease;
}

#superfat_slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.45);
}

#superfat_slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--mirmylapro-teal);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
    transition: all 0.2s ease;
}

#superfat_slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.45);
}

/* ------------------------------------------
   ЧИСЛОВЫЕ ПОЛЯ
   ------------------------------------------ */
#superfat_input,
#superfat_oil_percent {
    padding: 8px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1em;
    text-align: center;
    transition: all var(--mirmylapro-transition);
    outline: none;
    background: #ffffff;
    color: #1e293b;
    font-weight: 600;
}

#superfat_input:focus,
#superfat_oil_percent:focus {
    border-color: var(--mirmylapro-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
    background: #f0fdfa;
}

/* ------------------------------------------
   СЕЛЕКТ МАСЛА (ADVANCED)
   ------------------------------------------ */
#superfat_oil_select {
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95em;
    background: #ffffff;
    transition: all var(--mirmylapro-transition);
    outline: none;
    color: #1e293b;
    font-weight: 500;
    cursor: pointer;
}

#superfat_oil_select:focus {
    border-color: var(--mirmylapro-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* ------------------------------------------
   КНОПКА "ДОБАВИТЬ" (ADVANCED)
   ------------------------------------------ */
#add_superfat_oil {
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--mirmylapro-teal), var(--mirmylapro-teal-dark));
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--mirmylapro-transition);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.20);
    white-space: nowrap;
}

#add_superfat_oil:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}

#add_superfat_oil:active {
    transform: translateY(0);
}

/* ------------------------------------------
   СПИСОК МАСЕЛ НА ПЕРЕЖИР
   ------------------------------------------ */
#superfat_oil_list,
.superfat-oil-list {
    list-style: none;
    padding-left: 0;
    margin: 12px 0 0 0;
}

.superfat-oil-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
    border: 1px solid #d1fae5;
    border-left: 4px solid var(--mirmylapro-teal);
    border-radius: 10px;
    font-size: 0.92em;
    color: #065f46;
    font-weight: 500;
    transition: all var(--mirmylapro-transition);
    animation: superfatItemFadeIn 0.3s ease;
}

.superfat-oil-item:hover {
    transform: translateX(4px);
    border-left-color: var(--mirmylapro-teal-dark);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.12);
}

@keyframes superfatItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.superfat-oil-item .remove-superfat-oil {
    color: var(--mirmylapro-red);
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1em;
    padding: 2px 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
}

.superfat-oil-item .remove-superfat-oil:hover {
    background: #fee2e2;
    color: #991b1b;
    transform: scale(1.15);
}

/* ------------------------------------------
   СЧЁТЧИК ИТОГОВОГО ПЕРЕЖИРА
   ------------------------------------------ */
#superfat_advanced_total {
    font-weight: 800;
    font-size: 1.4em;
    color: var(--mirmylapro-teal);
    transition: color 0.3s ease;
    font-variant-numeric: tabular-nums;
}

#superfat_advanced_total.empty {
    color: #64748b;
}
#superfat_advanced_total.normal {
    color: var(--mirmylapro-teal);
}
#superfat_advanced_total.over-limit {
    color: #991b1b;
}

#superfat_advanced_container .superfat-total-wrapper {
    margin-top: 12px;
    padding: 12px 16px;
    background: #ecfdf5;
    border-radius: 10px;
    border: 2px dashed var(--mirmylapro-teal);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    transition: all var(--mirmylapro-transition);
}

#superfat_advanced_container .superfat-total-wrapper.over-limit {
    background: #fef2f2;
    border-color: var(--mirmylapro-red);
}

#superfat_advanced_container .superfat-total-wrapper.empty {
    background: #f8fafc;
    border-color: #cbd5e1;
}

#superfat_advanced_container .superfat-total-wrapper.normal {
    background: #ecfdf5;
    border-color: var(--mirmylapro-teal);
}

#superfat_advanced_container .superfat-advanced-hint {
    margin-top: 10px;
    font-size: 0.82em;
    color: #64748b;
    padding: 8px 12px;
    background: #fefce8;
    border-radius: 8px;
    border-left: 3px solid var(--mirmylapro-gold);
    line-height: 1.5;
    text-align: left;
}

#superfat_advanced_container .superfat-advanced-hint strong {
    color: #92400e;
}

/* ==========================================
   ФИНАЛ (ВЕРСИЯ 2.2.0): БЛОК СУПЕРЖИР-МАСЕЛ
   Единая стилизация всех мест, где выводится
   разделение «🌿 Масла на пережир» + «🫒 Остальные масла».
   ========================================== */

/* ------------------------------------------
   ОБЁРТКА БЛОКА СУПЕРЖИРА
   Применяется в:
   • RecommendAjax::render_oil_list()
   • RecipeCardRenderer::render_oil_list()
   • RecipeFormatter::render_superfat_oils_block()
   • mirmyla.js::renderOilsBlocks()
   ------------------------------------------ */
.superfat-oils-block {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
    border: 1px solid #d1fae5;
    border-left: 4px solid var(--mirmylapro-teal);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.06);
    animation: superfatBlockFadeIn 0.4s ease;
    transition: all var(--mirmylapro-transition);
}

@keyframes superfatBlockFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.superfat-oils-block:hover {
    border-left-color: var(--mirmylapro-teal-dark);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.12);
}

/* ------------------------------------------
   ЗАГОЛОВОК БЛОКА СУПЕРЖИРА
   ------------------------------------------ */
.superfat-oils-block > h2,
.superfat-oils-block > h3,
.superfat-oils-block > h4 {
    color: #065f46;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1em;
    margin: 0 0 8px 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* ------------------------------------------
   БЕЙДЖ «ИТОГО X%»
   ------------------------------------------ */
.superfat-oils-block .superfat-total-badge,
.superfat-oils-block [class*="total"] {
    display: inline-block;
    font-size: 0.78em;
    font-weight: 700;
    color: var(--mirmylapro-teal-dark);
    background: #ffffff;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid #d1fae5;
    box-shadow: 0 1px 3px rgba(13, 148, 136, 0.08);
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------
   СПИСОК СУПЕРЖИР-МАСЕЛ
   ------------------------------------------ */
.superfat-oils-block .oil-list.superfat {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.superfat-oils-block .oil-list.superfat li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    padding: 5px 0;
    color: #065f46;
    font-size: 0.93em;
    line-height: 1.4;
    border-bottom: 1px dashed #d1fae5;
    transition: color 0.2s ease, background 0.2s ease;
}

.superfat-oils-block .oil-list.superfat li:last-child {
    border-bottom: none;
}

.superfat-oils-block .oil-list.superfat li:hover {
    color: var(--mirmylapro-teal-dark);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    padding-left: 4px;
}

.superfat-oils-block .oil-list.superfat li strong {
    color: var(--mirmylapro-teal-dark);
    font-weight: 700;
}

/* Иконка «не омыляется» */
.superfat-oils-block .oil-list.superfat li .sf-note,
.superfat-oils-block .oil-list.superfat li em {
    font-size: 0.78em;
    color: #94a3b8;
    font-style: normal;
    margin-left: auto;
}

/* ------------------------------------------
   БЛОК «ОСТАЛЬНЫЕ МАСЛА»
   Применяется для обычного списка после супержира.
   ------------------------------------------ */
.oil-list:not(.superfat) {
    list-style: none;
    padding-left: 0;
    margin: 12px 0;
}

.oil-list:not(.superfat) li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95em;
    color: #1e293b;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.oil-list:not(.superfat) li:hover {
    background: #f8fafc;
    padding-left: 4px;
    border-radius: 4px;
}

.oil-list:not(.superfat) li strong {
    color: var(--mirmylapro-teal-dark);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------
   СВОДКА ПЕРЕЖИРА В МОДАЛКЕ «ПОЛНЫЙ РЕЦЕПТ»
   Применяется в mirmyla.js::renderRecipeHTML().
   ------------------------------------------ */
.full-recipe-superfat {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid var(--mirmylapro-teal);
    margin-bottom: 15px;
    animation: superfatBlockFadeIn 0.4s ease;
}

.full-recipe-superfat h4 {
    margin: 0 0 8px 0;
    color: #065f46;
    font-size: 1em;
    font-weight: 700;
    font-family: 'Playfair Display', Georgia, serif;
}

.full-recipe-superfat p {
    margin: 0 0 8px 0;
    color: #475569;
    line-height: 1.5;
    text-align: left;
    font-size: 0.92em;
}

.full-recipe-superfat p:last-child {
    margin-bottom: 0;
}

.full-recipe-superfat ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 8px 0;
}

.full-recipe-superfat ul li {
    padding: 3px 0;
    color: #065f46;
    font-size: 0.9em;
}

.full-recipe-superfat ul li strong {
    color: var(--mirmylapro-teal-dark);
    font-weight: 700;
}

/* ------------------------------------------
   СВОДКА ПЕРЕЖИРА НА СТРАНИЦЕ РЕЦЕПТА
   Применяется в RecipeFormatter::generate_full_recipe_content().
   ------------------------------------------ */
.recipe-superfat-block {
    margin: 20px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
    border-radius: 12px;
    border-left: 4px solid var(--mirmylapro-teal);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.06);
    animation: superfatBlockFadeIn 0.4s ease;
}

.recipe-superfat-block h3 {
    margin: 0 0 10px 0;
    color: #065f46;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2em;
    border-bottom: none;
    padding-bottom: 0;
}

.recipe-superfat-block p {
    margin: 0 0 10px 0;
    color: #475569;
    line-height: 1.5;
    text-align: left;
}

.recipe-superfat-block ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 10px 0;
}

.recipe-superfat-block ul li {
    padding: 4px 0;
    border-bottom: 1px dashed #d1fae5;
    color: #065f46;
    font-weight: 500;
}

.recipe-superfat-block ul li:last-child {
    border-bottom: none;
}

.recipe-superfat-block ul li strong {
    color: var(--mirmylapro-teal-dark);
    font-weight: 700;
}

.recipe-superfat-block > p:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: #065f46;
}

.recipe-superfat-block > p:last-child span {
    color: var(--mirmylapro-teal);
    font-weight: 800;
    font-size: 1.1em;
}

/* ------------------------------------------
   СЕТКА МАСЕЛ (для описаний обычных масел)
   Применяется в RecipeFormatter::render_regular_oils_block().
   ------------------------------------------ */
.recipe-oils-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* ------------------------------------------
   АДАПТИВНОСТЬ: 768px
   ------------------------------------------ */
@media (max-width: 768px) {
    .superfat-oils-block {
        padding: 10px 12px;
        margin: 10px 0;
    }

    .superfat-oils-block .oil-list.superfat li {
        font-size: 0.9em;
        gap: 4px;
    }

    .superfat-oils-block .oil-list.superfat li .sf-note,
    .superfat-oils-block .oil-list.superfat li em {
        margin-left: 0;
        width: 100%;
        padding-left: 20px;
        margin-top: 2px;
    }

    .recipe-superfat-block {
        padding: 14px 12px;
        margin: 15px 0;
    }

    .recipe-superfat-block h3 {
        font-size: 1.1em;
    }

    .full-recipe-superfat {
        padding: 10px 12px;
    }

    .full-recipe-superfat h4 {
        font-size: 0.95em;
    }

    .recipe-oils-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .superfat-mode-switch {
        flex-direction: column;
        max-width: 100%;
        border-radius: 14px;
    }

    .superfat-mode-option {
        border-radius: 10px;
        padding: 12px 16px;
    }

    #superfat_advanced_container > div:first-child {
        flex-direction: column;
        align-items: stretch !important;
    }

    #superfat_oil_select,
    #superfat_oil_percent,
    #add_superfat_oil {
        width: 100%;
    }
}

/* ------------------------------------------
   АДАПТИВНОСТЬ: 480px
   ------------------------------------------ */
@media (max-width: 480px) {
    .superfat-oils-block .oil-list.superfat li {
        font-size: 0.85em;
        padding: 4px 0;
    }

    .superfat-oils-block {
        padding: 8px 10px;
        border-radius: 8px;
    }

    .recipe-superfat-block {
        padding: 12px 10px;
    }

    .full-recipe-superfat {
        padding: 8px 10px;
    }

    .superfat-mode-option {
        font-size: 0.85em;
        padding: 10px 12px;
    }

    .superfat-oil-item {
        font-size: 0.85em;
        padding: 8px 12px;
    }

    #superfat_advanced_total {
        font-size: 1.2em;
    }

    .superfat-mode-hint,
    #superfat_advanced_container > p {
        font-size: 0.8em;
    }
}
