/**
 * Smart Culinary Ecosystem - Single Recipe Styles
 *
 * Стили для детальной страницы рецепта.
 * 
 * Версия 7.8.0 (FAQ STYLES): 
 * - NEW: Добавлены стили для аккордеона FAQ.
 * - UI: Стилизация кнопок инструментов (Планировщик, Шейп-шифтер) вынесена из inline.
 * - UI: Улучшена адаптивность блока "Похожие рецепты".
 * - UX: Добавлены стили для интерактивных элементов (чекбоксы, таймеры).
 *
 * TABLE OF CONTENTS:
 * 1. Recipe Header
 * 2. Layout Grid
 * 3. Sidebar Elements (Toolbar, Author, Meta, Image)
 * 4. Ingredients Section & Tools
 * 5. Nutrition & Details
 * 6. Main Content (Instructions)
 * 7. Interactive Elements
 * 8. Modal Windows (Shape Shifter & Meal Planner)
 * 9. Comments & Reviews
 * 10. Cook Mode
 * 11. Print Styles
 * 12. Utilities & Tooltips
 * 13. Toast Notifications
 * 14. Related Recipes
 * 15. FAQ Accordion
 * 16. Blog Typography (Standard Posts)
 */

/* =========================================
   1. Recipe Header
   ========================================= */
.sce-single-recipe .recipe-header { 
    margin-bottom: 30px; 
    border-bottom: 1px solid var(--color-border); 
    padding-bottom: 20px; 
}

.recipe-breadcrumbs { 
    font-size: 0.85rem; 
    color: var(--color-text-muted); 
    margin: 15px 0 15px 0; 
}

.recipe-breadcrumbs a { 
    color: var(--color-text-muted); 
    text-decoration: none; 
    transition: color 0.2s;
}

.recipe-breadcrumbs a:hover {
    color: var(--color-primary);
}

.recipe-breadcrumbs .sep { 
    margin: 0 5px; 
    color: #CBD5E1; 
}

.recipe-breadcrumbs .current { 
    color: var(--color-text-main); 
}

/* UPDATED ENTRY TITLE */
.sce-single-recipe .entry-title { 
    font-size: 2.8rem;
    margin-bottom: 20px; 
    line-height: 1.15; 
    color: var(--color-text-main);
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

@media (max-width: 768px) {
    .sce-single-recipe .entry-title { 
        font-size: 2rem; 
    }
}

.sce-single-recipe .entry-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    margin-top: 15px;
    border-radius: 2px;
}

/* =========================================
   2. Layout Grid
   ========================================= */
.recipe-body-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 40px; 
}

/* ВАЖНО: Сайдбар всегда flex-колонка с gap, чтобы блоки не слипались на мобильных */
.recipe-sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

@media (min-width: 900px) {
    .recipe-body-grid { 
        grid-template-columns: 320px 1fr; 
        align-items: start; 
    }
    .recipe-sidebar { 
        position: sticky; 
        top: 90px; 
    }
}

/* =========================================
   3. Sidebar Elements
   ========================================= */

/* --- A. Sidebar Toolbar --- */
.recipe-toolbar-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0; /* Gap handles spacing */
}

.cook-mode-wrapper {
    margin-bottom: 15px;
}

.cook-mode-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    margin: 5px 0 0;
}

.recipe-actions-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.action-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* --- B. Sidebar Author (Compact) --- */
.recipe-author-block.sidebar-style {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
}

.author-avatar-link img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.author-avatar-link:hover img {
    transform: scale(1.1);
}

.author-info {
    line-height: 1.3;
}

.author-link-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.author-info a {
    color: var(--color-text-main);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.author-rank {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: block;
}

.verified-badge {
    color: #10B981;
}

/* --- C. Sidebar Meta Bar (Grid/List) --- */
.recipe-meta-bar.sidebar-style { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 0;
}

.recipe-meta-bar.sidebar-style .meta-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    gap: 5px; 
    background: #fff; 
    padding: 10px; 
    border-radius: 8px; 
    font-size: 0.85rem; 
    color: var(--color-text-main); 
    border: 1px solid var(--color-border);
    transition: all 0.2s;
    text-decoration: none;
    height: 100%;
}

.recipe-meta-bar.sidebar-style .meta-item:hover {
    background: #F8FAFC;
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

.recipe-meta-bar.sidebar-style .meta-item.clickable {
    cursor: pointer;
}

.recipe-meta-bar.sidebar-style .dashicons { 
    font-size: 20px; 
    width: 20px; 
    height: 20px; 
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.recipe-meta-bar.sidebar-style .meta-item:hover .dashicons {
    color: var(--color-primary);
}

/* --- D. Sidebar Featured Image --- */
.sidebar-featured-image {
    width: 100%;
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.sidebar-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.sidebar-featured-image:hover img {
    transform: scale(1.03);
}

/* =========================================
   4. Ingredients Section & Tools
   ========================================= */
.recipe-section { 
    background: var(--color-bg-surface); 
    border-radius: var(--border-radius); 
    padding: 25px; 
    box-shadow: var(--shadow-sm); 
    margin-bottom: 0; 
    border: 1px solid #F1F5F9; 
}

.section-title { 
    font-size: 1.25rem; 
    margin-bottom: 20px; 
    padding-bottom: 10px; 
    border-bottom: 2px solid #F1F5F9; 
    color: var(--color-text-main);
    display: flex;
    align-items: center;
}

/* Portion Control */
.portion-control { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
    padding: 10px 15px; 
    background: #F8FAFC; 
    border-radius: 8px; 
    border: 1px solid var(--color-border);
}

.portion-control .label { 
    font-weight: 700; 
    font-size: 0.9rem; 
    color: var(--color-text-main);
}

.portion-stepper { 
    display: flex; 
    align-items: center; 
    background: white; 
    border-radius: 6px; 
    border: 1px solid #CBD5E1; 
    overflow: hidden; 
}

.portion-stepper button { 
    background: white; 
    color: var(--color-text-main); 
    border: none; 
    width: 32px; 
    height: 32px; 
    font-size: 18px; 
    font-weight: bold; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0; 
    transition: background 0.2s;
}

.portion-stepper button:hover { 
    background: #F1F5F9; 
    color: var(--color-primary); 
}

.portion-stepper input { 
    width: 40px; 
    text-align: center; 
    border: none; 
    border-left: 1px solid #F1F5F9; 
    border-right: 1px solid #F1F5F9; 
    font-weight: 700; 
    font-size: 0.9rem; 
    color: var(--color-text-main); 
    padding: 0; 
    -moz-appearance: textfield; 
}
.portion-stepper input::-webkit-outer-spin-button, 
.portion-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Tool Buttons (Shape Shifter & Planner) */
#sce-shape-shifter-trigger,
#sce-planner-trigger {
    width: 100%;
    margin-bottom: 10px;
    font-size: 0.9rem;
    justify-content: center;
}
#sce-planner-trigger {
    margin-bottom: 20px;
    background-color: #EFF6FF;
    color: #1E40AF;
    border-color: #BFDBFE;
}
#sce-planner-trigger:hover {
    background-color: #DBEAFE;
}

/* Ingredients List */
.sce-ingredients-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.ingredient-item { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 10px 0; 
    border-bottom: 1px solid #F1F5F9; 
    font-size: 0.95rem; 
    transition: var(--transition-base); 
    cursor: pointer; 
    user-select: none;
}

.ingredient-item:hover {
    background-color: #F8FAFC;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 4px;
}

.ingredient-item:last-child { border-bottom: none; }

.ing-data { 
    display: flex; 
    align-items: center; 
    flex-wrap: wrap; 
    flex-grow: 1; 
    align-items: baseline;
}

.ingredient-item .ing-amount { 
    font-weight: 700; 
    color: var(--color-primary); 
    margin-right: 4px; 
}

.ingredient-item .ing-amount sup { font-size: 0.7em; }
.ingredient-item .ing-amount sub { font-size: 0.7em; }
.ingredient-item .ing-unit { margin-right: 8px; color: var(--color-text-muted); font-weight: 500; }
.ingredient-item .ing-notes { margin-left: 5px; font-size: 0.85rem; color: #94A3B8; font-style: italic; }

.ingredient-item.checked { opacity: 0.6; }
.ingredient-item.checked .ing-name,
.ingredient-item.checked .ing-amount,
.ingredient-item.checked .ing-unit { text-decoration: line-through; color: var(--color-text-muted); }

/* Group Titles & Icons */
.ing-group-title {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--color-text-main);
    font-weight: 800;
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 5px;
    display: block;
}

.ing-group-title:first-of-type {
    margin-top: 0;
}

.ing-department-icon {
    font-size: 1rem;
    margin-right: 10px;
    display: inline-block;
    width: 1.5em;
    text-align: center;
    flex-shrink: 0;
    order: -1;
}

.ing-data .sce-add-to-cart {
    order: -2; 
}

/* =========================================
   5. Nutrition & Details
   ========================================= */
/* Nutrition Grid */
.nutrition-section {
    padding: 20px;
    border: 1px solid #E2E8F0;
    border-left: 4px solid var(--color-primary); 
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.nutrition-section .section-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 0;
    border-bottom: none;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nutrition-section .section-title::before {
    content: '\f179'; /* Dashicon chart-pie */
    font-family: 'dashicons';
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 400;
}

.nutrition-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px; 
}

.nutri-item { 
    text-align: center; 
    background: #F8FAFC; 
    padding: 10px 5px; 
    border-radius: 8px; 
    border: 1px solid #F1F5F9; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    transition: transform 0.2s;
}

.nutri-item:hover {
    background: #fff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nutri-item.kcal { 
    grid-column: span 2; 
    background: #ECFDF5; 
    color: #065F46; 
    border-color: #A7F3D0; 
    flex-direction: row;
    align-items: baseline; 
    gap: 8px; 
    padding: 12px;
}

.nutri-item .value { 
    display: block; 
    font-weight: 800; 
    font-size: 1.1rem; 
    line-height: 1.2; 
    color: var(--color-text-main);
}

.nutri-item.kcal .value {
    font-size: 1.3rem;
    color: #059669;
}

.nutri-item .label { 
    font-size: 0.7rem; 
    color: var(--color-text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    margin-top: 2px;
}

.nutri-item.kcal .label {
    color: #065F46;
    margin-top: 0;
}

/* Tags */
.details-section .details-group {
    margin-bottom: 20px;
}
.details-section .details-group:last-child {
    margin-bottom: 0;
}
.details-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-main);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.flavor-tag { background: #FFF7ED; color: #C2410C; border: 1px solid #FFEDD5; }
.flavor-tag:hover { background: #FFEDD5; transform: translateY(-1px); }

.occasion-tag { background: #EFF6FF; color: #1D4ED8; border: 1px solid #DBEAFE; }
.occasion-tag:hover { background: #DBEAFE; transform: translateY(-1px); }

.diet-tag { background: #F0FDF4; color: #15803D; border: 1px solid #DCFCE7; }
.diet-tag:hover { background: #DCFCE7; transform: translateY(-1px); }

.course-tag { background: #F3E8FF; color: #7E22CE; border: 1px solid #E9D5FF; }
.course-tag:hover { background: #E9D5FF; transform: translateY(-1px); }

.simple-tag { background: #F1F5F9; color: #64748B; border: 1px solid #E2E8F0; }
.simple-tag:hover { background: #E2E8F0; color: var(--color-text-main); transform: translateY(-1px); }

/* =========================================
   6. Main Content (Instructions & Author Notes)
   ========================================= */

/* --- Author Notes (Description Block) --- */
.recipe-author-notes {
    background: linear-gradient(to right, #F0FDF4, #fff); /* Soft Green to White */
    border: 1px solid #DCFCE7;
    border-left: 4px solid var(--color-primary); /* Accent line */
    border-radius: 12px;
    padding: 25px 30px;
    margin: 30px 0;
    position: relative;
    box-shadow: 0 4px 6px -2px rgba(16, 185, 129, 0.05); /* Very subtle shadow */
}

/* Decorative Quote Icon */
.recipe-author-notes::before {
    content: '\f105'; /* Dashicon quote */
    font-family: 'dashicons';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 80px;
    color: var(--color-primary);
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.recipe-author-notes .section-title {
    color: var(--color-primary-dark);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: none; /* Removed default border */
    padding-bottom: 0;
    position: relative;
    z-index: 1;
}

.recipe-author-notes .entry-content {
    color: #334155; /* Slate 700 */
    font-size: 1.05rem;
    line-height: 1.7;
    font-style: italic; /* Storytelling feel */
    position: relative;
    z-index: 1;
}

.recipe-author-notes .entry-content p:last-child {
    margin-bottom: 0;
}

/* --- INSTRUCTIONS HEADER --- */
.instructions-header {
    background: #F8FAFC;
    padding: 20px 25px;
    border-radius: 12px;
    border-left: 5px solid var(--color-primary);
    border: 1px solid #E2E8F0;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.instructions-header .section-title {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.4rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
}

.instruction-step { display: flex; gap: 20px; margin-bottom: 30px; }
.step-number { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--color-primary); color: white; font-weight: 700; border-radius: 50%; flex-shrink: 0; font-size: 1rem; box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3); }
.step-content { flex-grow: 1; background: var(--color-bg-surface); padding: 20px; border-radius: var(--border-radius); box-shadow: var(--shadow-sm); border: 1px solid #E2E8F0; position: relative; }
.step-content::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -8px;
    width: 15px;
    height: 15px;
    background: var(--color-bg-surface);
    transform: rotate(45deg);
    border-left: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}

.step-label { display: flex; cursor: pointer; user-select: none; }
.step-check { width: 20px; height: 20px; margin-right: 15px; margin-top: 4px; cursor: pointer; accent-color: var(--color-primary); }
.step-text { font-size: 1.05rem; line-height: 1.6; transition: var(--transition-base); }
.step-check:checked + .step-text { text-decoration: line-through; color: var(--color-text-muted); opacity: 0.6; }
.step-image { margin-bottom: 15px; border-radius: 8px; overflow: hidden; }
.step-image img { width: 100%; height: auto; display: block; }

/* =========================================
   7. Interactive Elements
   ========================================= */
.sce-timer-btn { display: inline-flex; align-items: center; gap: 4px; background-color: #FEF3C7; color: #D97706; border: 1px solid #FCD34D; padding: 2px 8px; border-radius: 12px; font-size: 0.9em; font-weight: 600; cursor: pointer; transition: all 0.2s ease; vertical-align: middle; margin: 0 2px; }
.sce-timer-btn:hover { background-color: #FCD34D; transform: translateY(-1px); }
.sce-timer-btn.running { background-color: #DBEAFE; color: #2563EB; border-color: #93C5FD; animation: sce-pulse-timer 1s infinite; }
.sce-timer-btn.finished { background-color: #D1FAE5; color: #059669; border-color: #6EE7B7; }
@keyframes sce-pulse-timer { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

.sce-add-to-cart { background: transparent; border: 1px solid #E2E8F0; color: #94A3B8; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 12px; cursor: pointer; padding: 0; transition: all 0.2s ease; flex-shrink: 0; }
.sce-add-to-cart:hover { border-color: var(--color-primary); color: var(--color-primary); }
.sce-add-to-cart .dashicons { font-size: 16px; width: 16px; height: 16px; }
.ingredient-item.in-cart .sce-add-to-cart { background-color: var(--color-primary); border-color: var(--color-primary); color: white; }
.ingredient-item.in-cart .ing-data { opacity: 0.7; }

/* =========================================
   8. Modal Windows (Shape Shifter & Meal Planner)
   ========================================= */
.sce-modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.sce-modal-content { background-color: #fff; margin: 5% auto; padding: 30px; border-radius: 16px; width: 95%; max-width: 550px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); position: relative; animation: sce-slide-down 0.3s ease; }
@keyframes sce-slide-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.close-modal { position: absolute; right: 20px; top: 15px; color: #94A3B8; font-size: 28px; cursor: pointer; line-height: 1; transition: color 0.2s; }
.close-modal:hover { color: #1E293B; }

/* --- Shape Shifter Specifics --- */
.shape-shifter-content .modal-header { text-align: center; margin-bottom: 25px; }
.modal-icon { width: 50px; height: 50px; background: #ECFDF5; color: var(--color-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; }
.modal-icon .dashicons { font-size: 24px; width: 24px; height: 24px; }
.shape-shifter-content h3 { margin: 0 0 10px; font-size: 1.5rem; }
.shape-shifter-content .description { color: var(--color-text-muted); font-size: 0.95rem; margin: 0; }

.shape-help { margin-top: 15px; }
.shape-help ul { list-style: none; margin: 10px 0 0; padding: 0; }
.shape-help li { margin-bottom: 5px; position: relative; padding-left: 0; }

.shape-comparison { display: flex; gap: 20px; margin-bottom: 25px; }
@media(max-width: 600px) { .shape-comparison { flex-direction: column; } }

.shape-card { flex: 1; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; transition: border-color 0.2s; }
.shape-card.highlight { border-color: var(--color-primary); background: #F0FDF4; }
.card-header { background: #F8FAFC; padding: 12px 15px; font-weight: 700; border-bottom: 1px solid var(--color-border); color: var(--color-text-main); font-size: 0.9rem; }
.shape-card.highlight .card-header { background: #DCFCE7; color: #065F46; border-color: #86EFAC; }
.card-body { padding: 15px; }

.shape-select-label { display: block; margin-bottom: 5px; font-size: 0.8rem; font-weight: 600; color: #64748B; }
.shape-select { width: 100%; padding: 8px; border: 1px solid var(--color-border); border-radius: 6px; margin-bottom: 15px; font-size: 0.9rem; }
.input-wrapper label { display: block; font-size: 0.8rem; margin-bottom: 4px; color: var(--color-text-main); }
.shape-input { width: 100%; padding: 10px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 1rem; text-align: center; }
.rect-inputs { display: flex; align-items: flex-end; gap: 10px; }
.rect-inputs .sep { padding-bottom: 10px; color: #94A3B8; font-weight: bold; }

.result-message { text-align: center; margin-bottom: 20px; font-size: 1.1rem; font-weight: 700; min-height: 24px; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.button-text { background: none; border: none; color: #94A3B8; cursor: pointer; font-weight: 500; }
.button-text:hover { color: #EF4444; }

/* --- Meal Planner Specifics (NEW) --- */
.planner-content { overflow: hidden; }
.planner-modal-header h3 { margin: 0 0 5px 0; font-size: 1.4rem; color: var(--color-text-main); }
.planner-modal-header p { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }

.planner-recipe-preview { display: flex; align-items: center; gap: 15px; background: #fff; border: 1px solid var(--color-border); padding: 10px; border-radius: 12px; margin-bottom: 25px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.planner-recipe-preview img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; background: #eee; }
.planner-help { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 20px; background: #FFFBEB; border: 1px solid #FCD34D; padding: 10px 15px; border-radius: 8px; }

.meal-type-selector { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.meal-option input { display: none; }
.meal-card { border: 1px solid var(--color-border); border-radius: 8px; padding: 15px 10px; text-align: center; cursor: pointer; transition: all 0.2s ease; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.meal-icon { font-size: 24px; line-height: 1; }
.meal-name { font-size: 0.9rem; font-weight: 600; color: var(--color-text-muted); }
.meal-option input:checked + .meal-card { border-color: var(--color-primary); background: #ECFDF5; box-shadow: 0 0 0 2px var(--color-primary); }
.meal-option input:checked + .meal-card .meal-name { color: var(--color-text-main); }

/* =========================================
   9. Comments & Reviews (REDESIGNED BUBBLE UI)
   ========================================= */

/* --- A. Review Summary Box --- */
.recipe-comments-section { padding-top: 20px; }
.sce-review-summary { background: #F8FAFC; border-radius: 12px; padding: 30px; margin-bottom: 40px; border: 1px solid var(--color-border); }
.summary-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; align-items: center; }
.summary-total { text-align: center; border-right: 1px solid var(--color-border); padding-right: 30px; }
.rating-number { font-size: 3.5rem; font-weight: 800; color: var(--color-text-main); line-height: 1; margin-bottom: 10px; }
.rating-stars { color: #F59E0B; font-size: 1.2rem; margin-bottom: 5px; letter-spacing: -2px; }
.rating-count { color: var(--color-text-muted); font-size: 0.9rem; }
.summary-bars { width: 100%; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.9rem; }
.star-label { width: 45px; flex-shrink: 0; color: var(--color-text-muted); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.star-label .dashicons { font-size: 14px; color: #CBD5E1; }
.bar-container { flex-grow: 1; height: 8px; background: #E2E8F0; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: #F59E0B; border-radius: 4px; }
.count-label { width: 30px; text-align: right; color: var(--color-text-muted); font-size: 0.8rem; }

@media (max-width: 600px) { 
    .summary-grid { grid-template-columns: 1fr; gap: 20px; } 
    .summary-total { border-right: none; border-bottom: 1px solid var(--color-border); padding-right: 0; padding-bottom: 20px; } 
}

/* --- B. Comments Toolbar (Sorting) --- */
.sce-comments-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 15px;
}

.comments-title {
    font-size: 1.4rem;
    margin: 0;
    color: var(--color-text-main);
    font-weight: 700;
}

.sce-sort-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sce-sort-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.sce-sort-select {
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--color-text-main);
    box-shadow: var(--shadow-sm);
}

/* --- C. Comment List (Bubble Design) --- */
.comment-list { list-style: none; padding: 0; margin: 0; }

.sce-comment-item {
    margin-bottom: 24px;
    position: relative;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.sce-comment-inner {
    display: flex;
    gap: 16px;
}

/* Avatar Column */
.sce-comment-left {
    flex-shrink: 0;
}

.sce-avatar-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
}

.sce-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Comment Body (Bubble) */
.sce-comment-body {
    flex-grow: 1;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
    min-width: 0; /* Prevent flex overflow */
}

/* Triangle for bubble effect (Desktop) */
.sce-comment-body::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -6px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    transform: rotate(45deg);
}

/* Header inside bubble */
.sce-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.sce-author-meta-group {
    display: flex;
    flex-direction: column;
}

.sce-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sce-author-name {
    font-weight: 700;
    color: var(--color-text-main);
    text-decoration: none;
    font-size: 1rem;
}

.sce-comment-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 2px;
    text-decoration: none;
}

.sce-comment-date:hover {
    text-decoration: underline;
}

/* Badges */
.sce-badge {
    font-size: 9px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

.badge-author {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.badge-admin {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* Content */
.sce-comment-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 12px;
}

.sce-comment-content p:last-child {
    margin-bottom: 0;
}

/* Footer: Voting & Actions */
.sce-comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F1F5F9;
    padding-top: 10px;
}

/* Voting System */
.sce-vote-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #F8FAFC;
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
}

.sce-vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #94A3B8;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.2s, transform 0.1s;
}

.sce-vote-btn:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.sce-vote-btn.vote-down:hover {
    color: #EF4444;
}

.sce-vote-score {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 15px;
    text-align: center;
    color: var(--color-text-muted);
}

.sce-vote-score.positive { color: #10B981; }
.sce-vote-score.negative { color: #EF4444; }

/* Actions */
.sce-footer-actions {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    align-items: center;
}

.comment-reply-link, .comment-edit-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.85rem;
}

.comment-reply-link:hover {
    color: var(--color-primary);
}

.comment-edit-link:hover {
    color: var(--color-text-main);
}

.sce-sep { color: #E2E8F0; font-size: 0.8rem; }

/* --- Nesting (Replies) --- */
.comment-list .children {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 20px;
    position: relative;
}

/* Vertical Thread Line */
.comment-list .children::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 20px;
    left: -15px; /* Offset to left of children container */
    border-left: 2px solid #E2E8F0;
}

/* Specific styling for nested comments */
.sce-comment-reply .sce-comment-inner {
    margin-left: 0; /* Reset */
}

/* Hide avatar on very deep nesting or mobile to save space */
.sce-comment-reply .sce-comment-left {
    display: none; 
}

/* On Desktop, show nested avatars and improve spacing */
@media (min-width: 768px) {
    .comment-list .children {
        margin-left: 60px; /* Shift children right */
    }
    
    .comment-list .children::before {
        left: -30px; /* Line position relative to new margin */
    }

    .sce-comment-reply .sce-comment-left {
        display: block;
    }
    
    .sce-comment-reply .sce-avatar-wrapper {
        width: 40px; /* Smaller avatar for replies */
        height: 40px;
    }
}

/* Moderation Notice */
.sce-moderation-notice {
    background: #FFFBEB;
    color: #B45309;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #FCD34D;
}

/* --- D. Form Styling --- */
.comment-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.comment-notes {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text-main);
    font-size: 0.95rem;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

/* Inline Reply Form Notification */
.sce-reply-notification { 
    background-color: #F0F9FF; 
    border-left: 4px solid #0EA5E9; 
    padding: 12px 20px; 
    margin-bottom: 20px; 
    border-radius: 4px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    animation: sce-fade-in 0.3s ease; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}
.sce-reply-notification .reply-info { 
    font-size: 0.95rem; 
    color: #0369A1; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.sce-reply-notification strong { 
    font-weight: 700; 
    color: #0C4A6E; 
}

.comment-list .children #respond { 
    margin: 20px 0; 
    padding: 20px; 
    background: #fff; 
    border: 2px solid #E2E8F0; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    animation: sce-slide-down 0.3s ease; 
}

@keyframes sce-slide-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sce-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sce-highlight-pulse { 0% { background-color: #ECFDF5; transform: scale(1.02); } 50% { background-color: #D1FAE5; transform: scale(1); } 100% { background-color: transparent; transform: scale(1); } }

.sce-new-comment-highlight { 
    animation: sce-highlight-pulse 2s ease-out forwards; 
    border-color: var(--color-primary); 
}

#sce-cancel-reply:hover { 
    background: #FEF2F2; 
    color: #DC2626 !important; 
}
#cancel-comment-reply-link { display: none !important; }

/* =========================================
   10. Cook Mode
   ========================================= */
body.cook-mode-active { overflow: hidden; }
.cook-mode-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--color-bg-body, #FAFAF9); z-index: 9999; display: none; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.cook-mode-overlay.active { display: flex; }
.cook-mode-container { display: flex; flex-direction: column; height: 100%; width: 100%; max-width: 800px; margin: 0 auto; position: relative; }
.cook-mode-progress { position: absolute; top: 0; left: 0; height: 4px; background: var(--color-primary); width: 0%; transition: width 0.3s ease; z-index: 10; }
.cook-mode-header { padding: 15px 20px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-border); }
.cook-mode-title { font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-mode-exit-btn { background: none; border: none; color: var(--color-text-muted); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.cook-mode-steps-wrapper { flex-grow: 1; overflow-y: auto; padding: 30px 20px; }
.cook-mode-step-header { font-size: 0.9rem; text-transform: uppercase; font-weight: 700; color: var(--color-primary); margin-bottom: 10px; }
.cook-mode-step-image { margin-bottom: 20px; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.cook-mode-step-image img { width: 100%; height: auto; display: block; }
.cook-mode-step-content { font-size: 1.5rem; line-height: 1.6; }
.cook-mode-footer { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-top: 1px solid var(--color-border); background: #fff; flex-shrink: 0; }
.cook-mode-pagination { font-weight: 600; }
.cook-mode-nav-btn { font-size: 1rem; padding: 8px 16px; background: var(--color-primary); color: white; }
.cook-mode-nav-btn:disabled { background: #E2E8F0; cursor: not-allowed; color: var(--color-text-muted); }

/* =========================================
   11. Print Styles
   ========================================= */
@media print {
    body, .site-main, .sce-container { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #000 !important; font-size: 12pt; }
    a { text-decoration: none; color: #000; }
    a[href]:after { content: " (" attr(href) ")"; font-size: 0.8rem; color: #666; }
    .site-header, .site-footer, .recipe-toolbar, .recipe-toolbar-sidebar, .recipe-breadcrumbs, .recipe-video, .portion-control, .sce-add-to-cart, .step-check, #sce-shape-shifter-trigger, .share-buttons, .sce-fav-btn, #sce-planner-trigger, .method-tabs, .comments-area, .nav-links, .sce-mobile-nav, .sce-modal, #wpadminbar, .button-instruction { display: none !important; }
    .recipe-body-grid { display: block !important; }
    .recipe-sidebar, .recipe-main-content { width: 100% !important; page-break-inside: avoid; }
    .recipe-section { box-shadow: none !important; border: 1px solid #ccc !important; margin-bottom: 20px !important; padding: 15px !important; }
    .recipe-header { border-bottom: 2px solid #000 !important; }
    .entry-title { font-size: 18pt !important; text-align: left; }
    .recipe-author-block, .recipe-meta-bar { page-break-inside: avoid; }
    .author-avatar-link { display: none !important; }
    .sce-ingredients-list { columns: 2; column-gap: 20px; }
    .ingredient-item { border: none !important; page-break-inside: avoid; }
    .method-pane { display: block !important; }
    .instruction-step { page-break-inside: avoid; margin-bottom: 15px !important; }
    .step-image { display: none !important; }
    .step-number { background: #eee !important; color: #000 !important; border: 1px solid #ccc; }
    .step-content { padding: 0 !important; border: none !important; box-shadow: none !important; }
    .sce-timer-btn { border: none !important; background: none !important; padding: 0 !important; color: #000 !important; display: inline !important; }
    .sce-timer-btn .dashicons { display: none; }
    /* Show Image for print */
    .sidebar-featured-image { display: block !important; border: none !important; box-shadow: none !important; margin-bottom: 20px; }
}

/* =========================================
   12. Utilities & Tooltips
   ========================================= */
.sce-has-tooltip { border-bottom: 1px dashed var(--color-text-muted); cursor: help; position: relative; display: inline-block; }
.sce-has-tooltip:hover::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 0.8rem; white-space: nowrap; z-index: 100; margin-bottom: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); opacity: 0; animation: sce-tooltip-fade 0.2s forwards; }
.sce-has-tooltip:hover::before { content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #333; margin-bottom: -4px; z-index: 100; opacity: 0; animation: sce-tooltip-fade 0.2s forwards; }
@keyframes sce-tooltip-fade { to { opacity: 1; } }

/* Favorites & Planner */
.sce-fav-btn { color: #ccc; }
.sce-fav-btn.active { color: #EF4444; }
.sce-fav-btn .dashicons { transition: transform 0.2s ease; }

/* =========================================
   13. Toast Notifications
   ========================================= */
.sce-toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    border-left: 5px solid var(--color-primary);
    max-width: 350px;
    display: none; 
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.close-toast {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
}

.close-toast:hover {
    color: var(--color-text-main);
}

/* =========================================
   14. Related Recipes (NEW)
   ========================================= */
.related-recipes-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.related-recipes-section .section-title {
    margin-bottom: 25px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.related-recipes-section .section-title .dashicons {
    color: var(--color-primary);
}

/* Адаптация сетки для похожих рецептов */
@media (min-width: 600px) {
    .related-recipes-section .sce-recipe-grid {
            grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   15. FAQ Accordion
   ========================================= */
.sce-faq-accordion {
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.sce-faq-item {
    border-bottom: 1px solid #E2E8F0;
}

.sce-faq-item:last-child {
    border-bottom: none;
}

.sce-faq-question {
    padding: 15px 20px;
    font-weight: 600;
    color: var(--color-text-main);
    cursor: pointer;
    list-style: none; /* Remove default triangle */
    position: relative;
    padding-right: 40px;
    transition: background 0.2s;
}

.sce-faq-question::-webkit-details-marker {
    display: none;
}

.sce-faq-question:hover {
    background: #F8FAFC;
    color: var(--color-primary);
}

.sce-faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #CBD5E1;
    font-weight: 300;
    transition: transform 0.2s;
}

.sce-faq-item[open] .sce-faq-question::after {
    transform: translateY(-50%) rotate(45deg);
    color: var(--color-primary);
}

.sce-faq-answer {
    padding: 0 20px 20px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    animation: sce-slide-down 0.2s ease;
}

.sce-faq-answer p:last-child {
    margin-bottom: 0;
}

/* =========================================
   15. Blog Typography (Standard Posts)
   ========================================= */

/* Контейнер статьи внутри карточки */
.sce-single-post-card .entry-content {
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    color: #334155; /* Slate 700 - Мягкий темный для чтения */
    margin-top: 20px;
}

/* Абзацы */
.sce-single-post-card .entry-content p {
    margin-bottom: 1.5em;
}

/* Заголовки H2, H3 внутри статьи */
.sce-single-post-card .entry-content h2 {
    font-size: 1.8rem;
    color: var(--color-text-main);
    margin-top: 2em; /* Большой отступ сверху */
    margin-bottom: 0.8em;
    font-weight: 800;
    letter-spacing: -0.01em;
    position: relative;
}

.sce-single-post-card .entry-content h3 {
    font-size: 1.4rem;
    color: var(--color-text-main);
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    font-weight: 700;
}

/* Списки */
.sce-single-post-card .entry-content ul,
.sce-single-post-card .entry-content ol {
    margin: 1.5em 0;
    padding-left: 1.5em; /* Стандартный отступ */
    background: #F8FAFC; /* Легкий фон */
    border-radius: 12px;
    padding: 20px 20px 20px 40px; /* Внутренние отступы */
    border: 1px solid #F1F5F9;
}

.sce-single-post-card .entry-content li {
    margin-bottom: 0.8em;
    padding-left: 5px;
}

/* Маркеры для UL (Зеленые точки) */
.sce-single-post-card .entry-content ul {
    list-style: none; /* Убираем стандартные */
}

.sce-single-post-card .entry-content ul li {
    position: relative;
}

.sce-single-post-card .entry-content ul li::before {
    content: '•';
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.5em;
    position: absolute;
    left: -20px;
    top: -5px;
}

/* Нумерация для OL (Стильные цифры) */
.sce-single-post-card .entry-content ol {
    counter-reset: sce-counter;
    list-style: none;
}

.sce-single-post-card .entry-content ol li {
    position: relative;
    counter-increment: sce-counter;
}

.sce-single-post-card .entry-content ol li::before {
    content: counter(sce-counter) ".";
    color: var(--color-primary);
    font-weight: 800;
    position: absolute;
    left: -25px;
}

/* Ссылки в тексте */
.sce-single-post-card .entry-content a {
    color: var(--color-primary-dark);
    text-decoration: none;
    border-bottom: 2px solid rgba(16, 185, 129, 0.2); /* Полупрозрачное подчеркивание */
    transition: all 0.2s ease;
    font-weight: 600;
}

.sce-single-post-card .entry-content a:hover {
    background-color: #ECFDF5;
    border-bottom-color: var(--color-primary);
    color: var(--color-primary-dark);
}

/* Жирный текст (Strong) */
.sce-single-post-card .entry-content strong {
    color: #1E293B; /* Slate 900 - Почти черный */
    font-weight: 700;
}

/* Цитаты (Blockquote) - если будут использоваться */
.sce-single-post-card .entry-content blockquote {
    margin: 2em 0;
    padding: 20px 30px;
    background: #FFFBEB; /* Amber 50 */
    border-left: 5px solid #F59E0B; /* Amber 500 */
    border-radius: 8px;
    font-style: italic;
    color: #92400E; /* Amber 800 */
    font-size: 1.05rem;
}