/* WP Besin Kalori & Recipe Builder Design System */

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #0f172a;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --protein-color: #8b5cf6;
    --carbs-color: #10b981;
    --fat-color: #f59e0b;
    --calories-color: #ef4444;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --shadow-subtle: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 30px -10px rgba(37, 99, 235, 0.12);
}

.besin-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    padding: 20px 15px;
}

/* Header & Meta */
.besin-header-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-subtle);
    position: relative;
    overflow: hidden;
}

.besin-header-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.besin-badge-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.besin-badge {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.besin-badge.state-cig { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; }
.besin-badge.state-haslanmis { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.besin-badge.state-kizarmis { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }

.diet-tag {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.season-tag {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

.scientific-badge {
    font-style: italic;
    background: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.density-score-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
}

.besin-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .besin-title {
        font-size: 1.6rem;
    }
    .besin-header-card {
        padding: 20px;
    }
}

.besin-svo-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0;
}

dfn {
    font-style: normal;
    border-bottom: 2px dotted var(--accent-color);
    cursor: help;
    font-weight: 700;
}

/* PSEO Facts List */
.pseo-facts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.pseo-fact-item {
    background: #ffffff;
    border: 1px solid #f3e8ff;
    padding: 16px 20px;
    border-radius: 12px;
}

/* Bölüm başlığı (1. Genel Besin Tanımı: gibi) — sadece bu block olmalı */
.pseo-fact-item > strong {
    color: #581c87;
    font-size: 0.92rem;
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.1px;
}

/* Paragraf içindeki strong/em tagları — ASLA block olmamalı */
.pseo-fact-item p strong,
.pseo-fact-item p em,
.pseo-fact-item p b {
    display: inline !important;
    color: inherit;
}

.pseo-fact-item p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.75;
    color: var(--text-main);
}

/* Contextual Tree Widget */
.contextual-tree-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.tree-nodes-list {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.88rem;
}

.tree-node {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 8px;
    color: var(--text-muted);
}

.tree-node.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #eff6ff;
}

.tree-sep {
    color: var(--text-muted);
    font-weight: 700;
}

/* Entity Knowledge Box */
.entity-knowledge-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-top: 24px;
}

.entity-knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.entity-info-item label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
}

.entity-info-item span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Expert Reviewer E-E-A-T Bar */
.eeat-reviewer-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
    color: #94a3b8;
    flex-wrap: wrap;
}

.eeat-reviewer-bar strong {
    color: #ffffff;
}

/* Variations Selector Bar */
.besin-variations-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 12px;
    flex-wrap: wrap;
}

.besin-variations-bar label {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.var-pill {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    background: #ffffff;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    transition: all 0.2s ease;
}

.var-pill:hover, .var-pill.active {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

/* Grid Layout for Single Calculator */
.besin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .besin-grid {
        grid-template-columns: 1fr;
    }
}

.besin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    overflow-x: auto;
}

.besin-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Macro Energy Ratio Bar */
.energy-ratio-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.energy-bar-outer {
    height: 14px;
    background: #e2e8f0;
    border-radius: 7px;
    display: flex;
    overflow: hidden;
    margin: 8px 0;
}

.energy-seg {
    height: 100%;
}

.energy-seg.p { background: var(--protein-color); }
.energy-seg.c { background: var(--carbs-color); }
.energy-seg.f { background: var(--fat-color); }

/* Cooking Delta Matrix */
.delta-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.delta-table td, .delta-table th {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.delta-table th {
    background: #f8fafc;
    font-weight: 700;
}

/* Semantic Co-occurrence Concept Cloud */
.semantic-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.concept-chip {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
}

/* Form Controls */
.besin-form-group {
    margin-bottom: 18px;
}

.besin-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.besin-input, .besin-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-main);
    background: #f8fafc;
    min-height: 44px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.besin-input:focus, .besin-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

/* Macro Stat Cards */
.macro-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid var(--border-color);
}

.stat-box.kcal { border-left-color: var(--calories-color); }
.stat-box.protein { border-left-color: var(--protein-color); }
.stat-box.carbs { border-left-color: var(--carbs-color); }
.stat-box.fat { border-left-color: var(--fat-color); }

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 4px;
}

/* Pure SVG Donut Chart */
.donut-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
}

.donut-svg {
    transform: rotate(-90deg);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Table Styling */
.besin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.besin-table th, .besin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.besin-table th {
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Glycemic Index Meter Widget */
.gi-card-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
}

.gi-score {
    font-size: 1.8rem;
    font-weight: 800;
    color: #15803d;
}

/* Medical E-E-A-T Warning Box */
.medical-alert-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 24px;
    color: #991b1b;
}

.medical-alert-box strong {
    font-size: 1rem;
    display: block;
    margin-bottom: 4px;
}

/* Micro Nutrients RDI Bars */
.rdi-row {
    margin-bottom: 12px;
}

.rdi-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.rdi-bar-outer {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.rdi-bar-inner {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
}

/* Food Exchange Matrix Table */
.exchange-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.exchange-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.exchange-table tr:nth-child(even) {
    background: #f8fafc;
}

/* Yield Converter Box */
.yield-box {
    background: #fffbebf0;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

/* Contextual Bridge Links */
.contextual-bridge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.bridge-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.bridge-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* FAQ Accordions */
.faq-accordion {
    margin-top: 24px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-item summary {
    padding: 18px 24px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    background: #f8fafc;
    color: var(--text-main);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--accent-color);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-answer {
    padding: 20px 24px;
    color: var(--text-main);
    line-height: 1.6;
    border-top: 1px solid var(--border-color);
}

/* Recipe Builder Styles */
.rb-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-subtle);
}

.rb-inputs-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .rb-inputs-row {
        grid-template-columns: 1fr;
    }
}

.btn-add {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    min-height: 44px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-add:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.rb-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 10px;
}

.rb-item-info strong {
    display: block;
    color: var(--text-main);
}

.rb-item-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rb-item-macros {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.rb-item-macros .m-p { color: var(--protein-color); }
.rb-item-macros .m-c { color: var(--carbs-color); }
.rb-item-macros .m-f { color: var(--fat-color); }

.rb-remove-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ef4444;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
}

/* SEO Optimization & Inline Style Reduction Utility Classes */
.besin-ai-box {
    margin-top: 16px;
    padding: 14px 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
}
.besin-ai-title {
    color: #1d4ed8;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}
.besin-ai-text {
    margin: 0;
    font-size: 0.95rem;
    color: #1e3a8a;
    line-height: 1.6;
}
.besin-rank-protein {
    background: #e0e7ff;
    color: #3730a3;
}
.besin-rank-fiber {
    background: #dcfce7;
    color: #166534;
}
.besin-mini-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 10px;
}
.besin-mini-title {
    font-size: 0.88rem;
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}
.besin-mini-text {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 600;
    display: block;
    line-height: 1.5;
}
.besin-grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.besin-grid-3col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.besin-grid-4col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.besin-guide-card {
    margin-top: 32px;
}
.besin-guide-body {
    line-height: 1.8;
    color: var(--text-main);
    font-size: 0.98rem;
}
.besin-guide-p {
    margin-bottom: 14px;
}
.besin-guide-p:last-child {
    margin-bottom: 0;
}

/* Card & Box Variant Utility Classes */
.besin-card-purple {
    margin-top: 24px;
    background: #faf5ff;
    border-color: #e9d5ff;
}
.besin-title-purple {
    color: #6b21a8;
    margin-top: 0;
}
.besin-card-green {
    margin-top: 24px;
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.besin-title-green {
    color: #166534;
    margin-top: 0;
}
.besin-card-gray {
    margin-top: 24px;
    background: #fafafa;
}
.besin-box-positive {
    background: #ffffff;
    border: 1px solid #86efac;
    border-left: 4px solid #22c55e;
    padding: 14px;
    border-radius: 10px;
}
.besin-box-negative {
    background: #ffffff;
    border: 1px solid #fca5a5;
    border-left: 4px solid #ef4444;
    padding: 14px;
    border-radius: 10px;
}
.besin-box-clinical {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: 10px;
}
.besin-box-satiety {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    border-radius: 10px;
    padding: 10px 12px;
}
.besin-box-tef {
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
    border-left: 4px solid #9333ea;
    border-radius: 10px;
    padding: 10px 12px;
}
.besin-recipe-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
    margin-top: 32px;
}



.rb-empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    background: #f8fafc;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

/* Extra Clean Utility Classes to eliminate inline styles */
.besin-tree-title { margin: 0 0 10px 0; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.besin-sub-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.besin-sub-green { background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 4px solid #10b981; border-radius: 10px; padding: 12px 14px; }
.besin-sub-yellow { background: #fefce8; border: 1px solid #fde68a; border-left: 4px solid #f59e0b; border-radius: 10px; padding: 12px 14px; }
.besin-label-green { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: #15803d; letter-spacing: 0.5px; }
.besin-label-yellow { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: #92400e; letter-spacing: 0.5px; }
.besin-val-green { font-size: 1.3rem; font-weight: 800; color: #166534; margin-top: 4px; }
.besin-val-yellow { font-size: 1.3rem; font-weight: 800; color: #b45309; margin-top: 4px; }
.besin-sec-title { font-size: 1.1rem; font-weight: 800; }
.besin-sec-margin { margin-top: 32px; }
.besin-sec-card-margin { margin-top: 24px; }
.besin-dfn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 12px; }
.besin-dfn-term { background: #ffffff; border: 1px solid var(--border-color); padding: 14px; border-radius: 10px; }
.besin-dfn-term-title { color: var(--accent-color); font-size: 0.95rem; display: block; margin-bottom: 4px; font-weight: 700; }
.besin-dfn-term-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; display: block; }

