/* ============================================================
   Return My Cart – Legal document styles
   (Terms, Privacy, Worker Guidelines, Store Agreement)
   ============================================================ */

.legal-doc {
    color: #e2e8f0;
    line-height: 1.7;
    font-size: 0.95rem;
    font-family: inherit;
}

/* Page title */
.legal-doc h1 {
    font-size: 1.875rem !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    margin: 0 0 0.2rem !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

/* Meta line (effective date) */
.legal-doc .legal-meta {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
    display: block;
}

/* Section headings */
.legal-doc h2 {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #f1f5f9 !important;
    margin: 2rem 0 0.5rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #334155 !important;
    letter-spacing: -0.005em !important;
    line-height: 1.35 !important;
}

.legal-doc h3 {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    margin: 1.25rem 0 0.4rem !important;
}

/* Body text */
.legal-doc p {
    margin: 0.65rem 0 !important;
    color: #cbd5e1;
}

/* Lists */
.legal-doc ul,
.legal-doc ol:not(.legal-toc ol) {
    margin: 0.5rem 0 0.9rem 1.5rem !important;
    padding: 0 !important;
}

.legal-doc ul {
    list-style: disc !important;
}

.legal-doc ol:not(.legal-toc ol) {
    list-style: decimal !important;
}

.legal-doc li {
    margin: 0.35rem 0 !important;
    color: #cbd5e1;
}

/* Inline links */
.legal-doc > * a,
.legal-doc p a,
.legal-doc li a {
    color: #38bdf8 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

.legal-doc > * a:hover,
.legal-doc p a:hover,
.legal-doc li a:hover {
    color: #7dd3fc !important;
}

/* Bold / strong */
.legal-doc strong {
    font-weight: 600 !important;
    color: #f1f5f9 !important;
}

/* ---- Table of contents ---- */
.legal-toc {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.65rem !important;
    padding: 0.9rem 1.1rem !important;
    margin: 0.5rem 0 1.75rem !important;
    font-size: 0.875rem !important;
}

.legal-toc .toc-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.6rem;
}

.legal-toc ol {
    list-style: decimal !important;
    margin: 0 0 0 1.25rem !important;
    padding: 0 !important;
    columns: 2;
    column-gap: 1.5rem;
}

@media (max-width: 600px) {
    .legal-toc ol {
        columns: 1;
    }
}

.legal-toc li {
    margin: 0.2rem 0 !important;
    color: #94a3b8 !important;
    break-inside: avoid;
}

.legal-toc a {
    color: #94a3b8 !important;
    text-decoration: none !important;
}

.legal-toc a:hover {
    color: #38bdf8 !important;
    text-decoration: underline !important;
}

/* ---- Callout / highlight box ---- */
.legal-callout {
    background: #1c1a09;
    border-left: 4px solid #ca8a04;
    padding: 0.8rem 1rem;
    border-radius: 0 0.4rem 0.4rem 0;
    font-size: 0.875rem;
    margin: 0.25rem 0 1.5rem;
    color: #fde68a;
    line-height: 1.55;
}

.legal-callout strong {
    color: #fef08a !important;
}

/* ---- Light mode overrides ---- */
html:not(.dark) .legal-doc {
    color: #1e293b;
}

html:not(.dark) .legal-doc h1 {
    color: #0f172a !important;
}

html:not(.dark) .legal-doc h2 {
    color: #0f172a !important;
    border-top-color: #e2e8f0 !important;
}

html:not(.dark) .legal-doc h3 {
    color: #1e293b !important;
}

html:not(.dark) .legal-doc p,
html:not(.dark) .legal-doc li {
    color: #334155;
}

html:not(.dark) .legal-doc strong {
    color: #0f172a !important;
}

html:not(.dark) .legal-doc .legal-meta {
    color: #64748b;
}

html:not(.dark) .legal-doc > * a,
html:not(.dark) .legal-doc p a,
html:not(.dark) .legal-doc li a {
    color: #0284c7 !important;
}

html:not(.dark) .legal-doc > * a:hover,
html:not(.dark) .legal-doc p a:hover,
html:not(.dark) .legal-doc li a:hover {
    color: #0369a1 !important;
}

html:not(.dark) .legal-toc {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html:not(.dark) .legal-toc .toc-label {
    color: #475569;
}

html:not(.dark) .legal-toc li,
html:not(.dark) .legal-toc a {
    color: #475569 !important;
}

html:not(.dark) .legal-toc a:hover {
    color: #0284c7 !important;
}

html:not(.dark) .legal-callout {
    background: #fefce8;
    border-left-color: #eab308;
    color: #713f12;
}

html:not(.dark) .legal-callout strong {
    color: #713f12 !important;
}
