/* ============================================================
   templates.css — Styles for plugin templates and shortcode output
   Replaces the per-element inline styles previously embedded throughout
   templates/*.php and the shortcode handlers in sourdough-calculators.php.
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   1. SINGLE CALCULATOR TEMPLATE
   templates/single-sourdough_calc.php
   ────────────────────────────────────────────────────────────── */

.sc-single-calc-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Lato', sans-serif;
    color: #444;
}

.sc-single-calc-header {
    text-align: center;
    margin-bottom: 40px;
}
.sc-single-calc-eyebrow {
    font-size: 14px;
    font-weight: 700;
    color: #3D6B4F;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.sc-single-calc-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    color: #222;
    margin-bottom: 20px;
}
.sc-single-calc-excerpt {
    font-size: 18px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
    color: #555;
}

.sc-single-calc-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.sc-single-calc-cta {
    background: #FAF7F2;
    border-left: 4px solid #3D6B4F;
    padding: 30px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
    text-align: center;
}
.sc-single-calc-cta-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    color: #222;
    margin-bottom: 15px;
}
.sc-single-calc-cta-text {
    font-size: 16px;
    margin-bottom: 20px;
}
.sc-single-calc-cta-btn {
    display: inline-block;
    background: #3D6B4F;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background 0.15s;
}
.sc-single-calc-cta-btn:hover {
    background: #2A4C38;
    color: #fff;
}

.sc-single-calc-faqs {
    margin-top: 40px;
    border-top: 2px solid #E8E0D5;
    padding-top: 40px;
}
.sc-single-calc-faqs h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    color: #222;
    margin-bottom: 20px;
}
.sc-single-calc-faq-item { margin-bottom: 25px; }
.sc-single-calc-faq-q {
    font-size: 18px;
    color: #3D6B4F;
    margin-bottom: 10px;
    font-weight: 700;
}
.sc-single-calc-faq-a {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

/* Related calculators block (already partially styled in calculator.css; keep that) */
.sc-related {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #E8E0D5;
}
.sc-related h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    color: #222;
    margin-bottom: 8px;
}
.sc-related-intro {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}
.sc-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.sc-related-card {
    display: block;
    background: #FAF7F2;
    border: 1px solid #E8E0D5;
    border-radius: 10px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.sc-related-card-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: #3D6B4F;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.sc-related-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    line-height: 1.25;
    color: #222;
    margin-bottom: 8px;
}
.sc-related-card-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.45;
}
.sc-related-card-cta {
    font-size: 12px;
    font-weight: 700;
    color: #3D6B4F;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 12px;
}

/* ──────────────────────────────────────────────────────────────
   2. ARCHIVE TEMPLATES
   templates/archive-sourdough_calc.php
   templates/archive-sourdough_recipe.php
   ────────────────────────────────────────────────────────────── */

.sc-archive-header {
    text-align: center;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}
.sc-archive-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    color: #3D6B4F;
    margin-bottom: 20px;
}
.sc-archive-intro {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
}
.sc-archive-back-link {
    color: #3D6B4F;
    text-decoration: none;
}

.sc-search-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}
.sc-search-field {
    flex-grow: 1;
    padding: 15px 20px;
    border: 1px solid #E8E0D5;
    border-right: none;
    font-size: 16px;
    border-radius: 8px 0 0 8px;
    outline: none;
}
.sc-search-submit {
    background: #3D6B4F;
    color: white;
    border: none;
    padding: 0 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.sc-search-submit:hover { background: #2A4C38; }

.sc-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.sc-archive-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sc-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}
.sc-archive-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.sc-archive-card--column a {
    display: flex;
    flex-direction: column;
}

.sc-archive-thumb {
    height: 220px;
    background: #FAF7F2;
    overflow: hidden;
    position: relative;
}
.sc-archive-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.sc-archive-card:hover .sc-archive-thumb img {
    transform: scale(1.04);
}
.sc-archive-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3D6B4F;
    opacity: 0.5;
}

.sc-archive-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.sc-archive-content-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: #3D6B4F;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}
.sc-archive-content-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    margin: 0 0 15px;
    color: #222;
    line-height: 1.3;
}
.sc-archive-content-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 20px;
    flex-grow: 1;
}
.sc-archive-content-cta {
    font-weight: 700;
    color: #3D6B4F;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sc-archive-content-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.sc-archive-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #FAF7F2;
    border-radius: 8px;
}

.sc-archive-narrative {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    border-top: 1px solid #E8E0D5;
}
.sc-archive-narrative h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    color: #222;
    margin-bottom: 20px;
}
.sc-archive-narrative p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.recipe-pagination { text-align: center; margin-bottom: 40px; }
.recipe-pagination .nav-links { display: inline-flex; gap: 10px; }
.recipe-pagination a, .recipe-pagination span {
    padding: 10px 15px;
    background: #FAF7F2;
    color: #3D6B4F;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}
.recipe-pagination .current { background: #3D6B4F; color: white; }

/* ──────────────────────────────────────────────────────────────
   3. [sourdough_recipes] GRID SHORTCODE
   ────────────────────────────────────────────────────────────── */

.sourdough-recipe-shortcode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* ──────────────────────────────────────────────────────────────
   4. [sourdough_diagnostic_hub] DIAGNOSTIC HUB
   ────────────────────────────────────────────────────────────── */

.sd-hub {
    font-family: 'Lato', sans-serif;
    max-width: 1200px;
    margin: 40px auto;
}
.sd-hub-header { text-align: center; margin-bottom: 50px; }
.sd-hub-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    color: #222;
    margin-bottom: 15px;
}
.sd-hub-header p {
    font-size: 18px;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
.sd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.sd-card {
    background: #FAF7F2;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #E8E0D5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sd-card details { flex: 1; display: flex; flex-direction: column; }
.sd-card details summary {
    list-style: none;
    padding: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 24px;
    color: #222;
    background: #FAF7F2;
    transition: background 0.2s;
    height: 100%;
}
.sd-card details summary::-webkit-details-marker { display: none; }
.sd-card details summary:hover { background: #f0e9dd; }
.sd-card details summary::after {
    content: '+';
    font-size: 28px;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    color: #3D6B4F;
    transition: transform 0.3s;
}
.sd-card details[open] summary::after { transform: rotate(45deg); }

.sd-card-summary-title { display: flex; align-items: center; }

.sd-card-content {
    padding: 25px;
    border-top: 1px solid #E8E0D5;
    background: #fff;
    flex: 1;
}
.sd-card-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}
.sd-card-content ul { padding-left: 20px; margin-bottom: 20px; color: #444; }
.sd-card-content li { margin-bottom: 8px; font-size: 15px; }

.sd-btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.sd-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.sd-btn-primary { background: #3D6B4F; color: #fff; }
.sd-btn-primary:hover { background: #2A4A36; color: #fff; }
.sd-btn-secondary { background: #FDEEED; color: #7A2A28; }
.sd-btn-secondary:hover { background: #fadbd8; }

.sd-number {
    font-size: 18px;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: #8F9E94;
    margin-right: 15px;
    letter-spacing: 1px;
}

/* ──────────────────────────────────────────────────────────────
   5. [sc_table] TABLE SHORTCODE
   ────────────────────────────────────────────────────────────── */

.sc-table-wrap {
    background: #fff;
    border: 1px solid #E8E0D5;
    border-radius: 8px;
    overflow: hidden;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    font-family: 'Lato', sans-serif;
}
.sc-table-header {
    background: #FAF7F2;
    padding: 20px 25px;
    border-bottom: 2px solid #E8E0D5;
}
.sc-table-header h3 {
    margin: 0 0 10px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    color: #222;
}
.sc-table-header p {
    margin: 0;
    font-size: 15px;
    color: #555;
}
.sc-table-scroll { overflow-x: auto; }
.sc-table-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 15px;
}
.sc-table-table thead tr { background: #fdfbf7; }
.sc-table-table th {
    padding: 15px 25px;
    color: #3D6B4F;
    font-weight: 700;
    border-bottom: 2px solid #E8E0D5;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}
.sc-table-table tbody tr {
    border-bottom: 1px solid #f0e9dd;
    transition: background 0.15s;
}
.sc-table-table tbody tr:nth-child(odd)  { background: #fff; }
.sc-table-table tbody tr:nth-child(even) { background: #fafafa; }
.sc-table-table tbody tr:hover { background: #f4f1ea; }
.sc-table-table td {
    padding: 18px 25px;
    color: #444;
    line-height: 1.5;
}

/* ──────────────────────────────────────────────────────────────
   6. [sc_faq] FAQ SHORTCODE
   ────────────────────────────────────────────────────────────── */

.sc-faq-wrap { margin: 40px 0; font-family: 'Lato', sans-serif; }
.sc-faq-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    color: #222;
    margin-bottom: 25px;
    border-bottom: 2px solid #E8E0D5;
    padding-bottom: 10px;
}
.sc-faq-item {
    border: 1px solid #E8E0D5;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fff;
    overflow: hidden;
}
.sc-faq-item details summary {
    list-style: none;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    color: #222;
    background: #FAF7F2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}
.sc-faq-item details summary::-webkit-details-marker { display: none; }
.sc-faq-item details summary:hover { background: #f0e9dd; }
.sc-faq-item details summary::after {
    content: '+';
    font-size: 28px;
    font-weight: 300;
    color: #3D6B4F;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 12px;
}
.sc-faq-item details[open] summary::after { transform: rotate(45deg); }
.sc-faq-item details[open] summary { border-bottom: 1px solid #E8E0D5; }
.sc-faq-content {
    padding: 25px;
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

/* ──────────────────────────────────────────────────────────────
   7. ADMIN-ONLY ERROR MESSAGES (visible only to logged-in editors)
   ────────────────────────────────────────────────────────────── */

.sc-error {
    color: #c0392b;
    padding: 10px;
    background: #fee;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
}
