/* =========================================
   Supplement Facts Table v2 - Frontend
   Exact match to reference image + Dark Mode
   ========================================= */

/* === WRAPPER === */
.sft-wrap {
    margin: 30px 0;
    max-width: 750px;
}

.sft-facts {
    background: #1a1a1a;
    border: 2px solid #555;
    font-family: Arial, Helvetica, sans-serif;
    color: #e0e0e0;
    line-height: 1.4;
}

/* === RTL Support === */
.sft-rtl {
    direction: rtl;
    text-align: right;
}

.sft-ltr {
    direction: ltr;
    text-align: left;
}

/* === SERVING INFO === */
.sft-serving {
    padding: 14px 18px 10px;
    background: #222;
    border-bottom: 1px solid #444;
}

.sft-serving-line {
    font-size: 14px;
    line-height: 1.7;
    color: #ddd;
}

.sft-serving-label {
    font-weight: 700;
    color: #fff;
}

.sft-serving-value {
    color: #ddd;
}

/* === TABLE === */
.sft-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
}

/* --- Header --- */
.sft-table thead tr {
    background: #2a2a2a;
    border-top: 3px solid #666;
    border-bottom: 3px solid #666;
}

.sft-table thead th {
    padding: 12px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ccc;
    vertical-align: bottom;
}

.sft-th-name {
    text-align: inherit;
    width: 55%;
}

.sft-th-amount {
    text-align: center !important;
    width: 28%;
}

.sft-th-dv {
    text-align: center !important;
    width: 17%;
}

/* RTL header alignment */
.sft-rtl .sft-th-name {
    text-align: right;
}

/* --- Blend Row --- */
.sft-row-blend {
    border-bottom: 2px solid #555;
}

.sft-row-blend td {
    padding: 14px 18px;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sft-cell-blend-name {
    text-align: inherit;
}

.sft-blend-tm {
    font-size: 10px;
    vertical-align: super;
    margin-right: 1px;
    font-weight: 400;
}

.sft-rtl .sft-blend-tm {
    margin-right: 0;
    margin-left: 1px;
}

.sft-cell-blend-amount {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.sft-cell-blend-dv {
    text-align: center;
}

/* --- Ingredient Rows --- */
.sft-row-ingredient td {
    padding: 10px 18px;
    font-size: 13.5px;
    border-bottom: 1px solid #333;
    vertical-align: top;
}

.sft-row-ingredient:last-child td {
    border-bottom: none;
}

.sft-cell-name {
    text-align: inherit;
    color: #ddd;
    padding-left: 28px;
    line-height: 1.5;
}

.sft-rtl .sft-cell-name {
    padding-left: 18px;
    padding-right: 28px;
}

.sft-cell-name em {
    font-style: italic;
    color: #aaa;
}

.sft-sub-info {
    font-size: 12px;
    color: #888;
    display: inline;
}

.sft-cell-amount {
    text-align: center;
    color: #bbb;
    font-variant-numeric: tabular-nums;
    vertical-align: top;
}

.sft-cell-dv {
    text-align: center;
    color: #999;
    font-weight: 600;
    vertical-align: top;
}

/* === DV NOTE === */
.sft-dv-note {
    padding: 8px 18px 10px;
    font-size: 11.5px;
    color: #888;
    text-align: right;
    border-top: 1px solid #333;
}

.sft-rtl .sft-dv-note {
    text-align: left;
}

/* === THICK SEPARATOR === */
.sft-thick-line {
    height: 4px;
    background: #666;
    margin: 0;
}

/* === OTHER INGREDIENTS === */
.sft-other {
    padding: 16px 18px;
    border-bottom: 1px solid #333;
    font-size: 13px;
    line-height: 1.8;
    color: #ccc;
}

.sft-other-label {
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    color: #ddd;
    display: block;
    margin-bottom: 4px;
}

.sft-other-text {
    color: #aaa;
    display: block;
}

/* === NOTES === */
.sft-notes-section {
    padding: 12px 18px 16px;
}

.sft-note-line {
    font-size: 12px;
    color: #777;
    line-height: 1.6;
    margin: 5px 0;
    font-style: italic;
}

/* =========================================
   Light Theme Override
   ========================================= */

/* If the body/page has a light background */
body:not([data-theme="dark"]):not(.dark-mode):not(.dark) .sft-facts {
    /* Keep dark - the supplement table is always dark per reference image */
    /* If you want light mode too, uncomment below */
}

/*
   Uncomment this block if you need a light-mode variant:

.sft-light .sft-facts {
    background: #fafafa;
    border-color: #222;
    color: #222;
}
.sft-light .sft-serving { background: #f0f0f0; border-bottom-color: #ccc; }
.sft-light .sft-serving-label { color: #000; }
.sft-light .sft-serving-line { color: #333; }
.sft-light .sft-table thead tr { background: #eee; border-color: #222; }
.sft-light .sft-table thead th { color: #444; }
.sft-light .sft-row-blend td { color: #000; border-bottom-color: #222; }
.sft-light .sft-row-ingredient td { border-bottom-color: #ddd; }
.sft-light .sft-cell-name { color: #222; }
.sft-light .sft-cell-name em { color: #555; }
.sft-light .sft-sub-info { color: #777; }
.sft-light .sft-cell-amount { color: #444; }
.sft-light .sft-cell-dv { color: #666; }
.sft-light .sft-dv-note { color: #888; border-top-color: #ddd; }
.sft-light .sft-thick-line { background: #222; }
.sft-light .sft-other { border-bottom-color: #ddd; color: #333; }
.sft-light .sft-other-label { color: #000; }
.sft-light .sft-other-text { color: #555; }
.sft-light .sft-note-line { color: #777; }
*/

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 600px) {
    .sft-wrap {
        margin: 20px 0;
    }

    .sft-serving {
        padding: 12px 14px 8px;
    }

    .sft-serving-line {
        font-size: 13px;
    }

    .sft-table thead th {
        padding: 10px 10px;
        font-size: 10px;
    }

    .sft-row-blend td {
        padding: 12px 10px;
        font-size: 12px;
    }

    .sft-row-ingredient td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .sft-cell-name {
        padding-left: 16px !important;
    }

    .sft-rtl .sft-cell-name {
        padding-left: 10px !important;
        padding-right: 16px !important;
    }

    .sft-th-name {
        width: 48%;
    }

    .sft-th-amount {
        width: 32%;
    }

    .sft-th-dv {
        width: 20%;
    }

    .sft-other,
    .sft-dv-note,
    .sft-notes-section {
        padding-left: 14px;
        padding-right: 14px;
    }
}
