/* ============================================================
   legal.css — Shared styles for Terms, Privacy, Shipping
   Brand: #2b2928 charcoal | #fceb04 yellow
   ============================================================ */

.legal-page {
    background: #f5f4f1;
    min-height: calc(100vh - 140px);
    padding: 40px 0 80px;
}

/* ── Layout ─────────────────────────────────────────────── */
.legal-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Sidebar TOC ────────────────────────────────────────── */
.legal-toc {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.legal-toc-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e7e4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    padding: 18px;
}

.legal-toc-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #aaa;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0eeeb;
}

.legal-toc nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-toc-link {
    display: block;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
    border-left: 2px solid transparent;
}

.legal-toc-link:hover {
    background: #f5f4f1;
    color: #2b2928;
    border-left-color: #ddd;
}

.legal-toc-link.active {
    background: #fefce8;
    color: #2b2928;
    border-left-color: #fceb04;
    font-weight: 700;
}

.legal-toc-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0eeeb;
    font-size: 0.75rem;
    color: #aaa;
}

.legal-toc-meta p { margin: 0 0 2px; }
.legal-toc-meta strong { color: #555; font-size: 0.8rem; }

/* Help card in shipping sidebar */
.legal-toc-help {
    padding: 16px 18px;
}

.legal-help-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #2b2928;
    text-decoration: none;
    background: #f5f4f1;
    margin-top: 8px;
    transition: background 0.15s;
}

.legal-help-link:hover {
    background: #eceae6;
}

.legal-help-wa {
    background: #edfff5;
    color: #1a6b38;
}

.legal-help-wa:hover {
    background: #d5f5e3;
}

/* ── Main Content ───────────────────────────────────────── */
.legal-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Doc Header ─────────────────────────────────────────── */
.legal-doc-header {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e7e4;
    padding: 28px 32px;
    margin-bottom: 20px;
    border-left: 4px solid #fceb04;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.legal-doc-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #2b2928;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}

.legal-doc-intro {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.7;
    margin: 0 0 14px;
}

.legal-doc-intro a { color: #2b2928; }

.legal-updated-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    background: #f5f4f1;
    border-radius: 4px;
    padding: 4px 10px;
}

/* ── Sections ───────────────────────────────────────────── */
.legal-section {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e7e4;
    padding: 28px 32px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    scroll-margin-top: 90px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 800;
    color: #2b2928;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0eeeb;
}

.legal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #2b2928;
    color: #fceb04;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

.legal-section p {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.75;
    margin: 0 0 12px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

/* ── Lists ──────────────────────────────────────────────── */
.legal-list {
    margin: 8px 0 12px;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-list li {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background: #fceb04;
    border-radius: 50%;
    border: 1.5px solid #2b2928;
}

/* ── Links ──────────────────────────────────────────────── */
.legal-link {
    color: #2b2928;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid #fceb04;
    transition: border-color 0.15s, color 0.15s;
}

.legal-link:hover {
    color: #555;
    border-bottom-color: transparent;
}

/* ── Highlight Boxes (privacy data categories) ──────────── */
.legal-highlight-box {
    background: #fafaf8;
    border: 1px solid #e8e7e4;
    border-left: 3px solid #fceb04;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.legal-highlight-box:last-of-type {
    margin-bottom: 0;
}

.legal-highlight-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #2b2928;
    margin: 0 0 6px !important;
}

.legal-highlight-box p:last-child {
    font-size: 0.88rem;
    color: #555;
    margin: 0 !important;
}

/* ── Contact Block ──────────────────────────────────────── */
.legal-contact-block {
    background: #f9f8f5;
    border-radius: 6px;
    border-left: 3px solid #fceb04;
    padding: 16px 18px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal-contact-block strong {
    font-size: 0.9rem;
    font-weight: 800;
    color: #2b2928;
}

.legal-contact-block span,
.legal-contact-block a {
    font-size: 0.85rem;
    color: #555;
}

.legal-contact-block a {
    color: #2b2928;
    font-weight: 600;
    text-decoration: none;
}

.legal-contact-block a:hover {
    text-decoration: underline;
}

/* ── Table (shipping timeframes) ────────────────────────── */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.88rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8e7e4;
}

.legal-table thead tr {
    background: #2b2928;
    color: #fff;
}

.legal-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-table th:last-child {
    color: #fceb04;
}

.legal-table tbody tr {
    border-bottom: 1px solid #f0eeeb;
    transition: background 0.15s;
}

.legal-table tbody tr:last-child {
    border-bottom: none;
}

.legal-table tbody tr:hover {
    background: #fafaf8;
}

.legal-table td {
    padding: 11px 16px;
    color: #444;
}

.legal-table td:last-child {
    font-weight: 700;
    color: #2b2928;
}

/* ── Zone Grid (shipping) ───────────────────────────────── */
.legal-zone-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.legal-zone-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fafaf8;
    border: 1px solid #e8e7e4;
    border-radius: 7px;
    padding: 14px;
}

.legal-zone-icon {
    width: 36px;
    height: 36px;
    background: #fceb04;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2b2928;
    flex-shrink: 0;
}

.legal-zone-card > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.legal-zone-card strong {
    font-size: 0.85rem;
    font-weight: 800;
    color: #2b2928;
    display: block;
}

.legal-zone-card span {
    font-size: 0.78rem;
    color: #888;
    display: block;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
    }

    .legal-toc-card nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2px 12px;
    }

    .legal-zone-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .legal-page { padding: 20px 0 60px; }

    .legal-doc-header,
    .legal-section { padding: 20px; }

    .legal-doc-title { font-size: 1.35rem; }

    .legal-toc-card nav {
        grid-template-columns: 1fr;
    }

    .legal-zone-grid {
        grid-template-columns: 1fr;
    }

    .legal-table { font-size: 0.82rem; }
    .legal-table th, .legal-table td { padding: 10px 12px; }
}
