/**
 * BettyBloom Legal Pages — Terms, Privacy, Medical Disclaimer
 * Shared styling across all three documents.
 */

:root {
    --legal-primary: #e91e8c;
    --legal-purple: #9c27b0;
    --legal-bg: #faf8fc;
    --legal-surface: #ffffff;
    --legal-text: #1a1a2e;
    --legal-text-secondary: #4a4a5a;
    --legal-muted: #9a9aaa;
    --legal-border: #ececf0;
    --legal-radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--legal-bg);
    color: var(--legal-text);
    line-height: 1.65;
    min-height: 100vh;
    padding-bottom: 60px;
    -webkit-font-smoothing: antialiased;
}

.legal-shell {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

/* Topbar */
.legal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fce4ec 50%, #f8e8ff 100%);
    border: 2px solid var(--legal-primary);
    border-radius: 18px;
    margin-bottom: 22px;
    box-shadow: 0 4px 18px rgba(233, 30, 140, 0.08);
}

.legal-topbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--legal-text);
}

.legal-topbar .brand-icon { font-size: 22px; }

.legal-topbar .brand-name {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-topbar .back-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--legal-primary);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    transition: background 0.15s;
}

.legal-topbar .back-link:hover { background: #ffffff; }

/* Hero */
.legal-hero {
    text-align: center;
    padding: 12px 16px 24px;
}

.legal-hero .hero-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 12px rgba(233, 30, 140, 0.2));
}

.legal-hero h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.6px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-hero .meta {
    font-size: 12.5px;
    color: var(--legal-muted);
    font-weight: 600;
}

/* Content card */
.legal-card {
    background: var(--legal-surface);
    border: 2px solid var(--legal-border);
    border-radius: var(--legal-radius);
    padding: 26px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 18px;
}

.legal-card.intro {
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
    border-color: #f8bbd0;
    text-align: center;
    font-size: 15px;
    color: #880e4f;
    font-weight: 600;
    line-height: 1.6;
}

/* Section headings */
.legal-card h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--legal-text);
    margin: 4px 0 12px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-card h2 .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-purple));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.legal-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--legal-text);
    margin: 18px 0 8px;
}

/* Paragraphs */
.legal-card p {
    font-size: 14.5px;
    color: var(--legal-text-secondary);
    margin-bottom: 14px;
    line-height: 1.7;
}

.legal-card p:last-child { margin-bottom: 0; }

.legal-card strong { color: var(--legal-text); font-weight: 700; }
.legal-card em { font-style: italic; color: #666; }

/* Lists */
.legal-card ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 14px;
}

.legal-card ul li {
    font-size: 14.5px;
    color: var(--legal-text-secondary);
    padding: 6px 0 6px 26px;
    position: relative;
    line-height: 1.6;
}

.legal-card ul li::before {
    content: '•';
    position: absolute;
    left: 8px;
    top: 6px;
    color: var(--legal-primary);
    font-weight: 900;
    font-size: 16px;
}

.legal-card ul.checkmarks li::before {
    content: '✓';
    color: #16a34a;
    font-weight: 900;
    left: 6px;
}

/* Tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 10px 0 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--legal-border);
}

.legal-table th {
    background: linear-gradient(135deg, #fce4ec, #f3e5f5);
    color: #6a1b9a;
    text-align: left;
    padding: 10px 12px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f8bbd0;
}

.legal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f7;
    color: var(--legal-text-secondary);
    vertical-align: top;
}

.legal-table tr:last-child td { border-bottom: none; }
.legal-table tbody tr:nth-child(even) td { background: #fbf8fd; }

/* Callout boxes */
.legal-callout {
    padding: 16px 18px;
    border-radius: 14px;
    border: 2px solid;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.65;
}

.legal-callout.warning {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border-color: #f59e0b;
    color: #78350f;
}

.legal-callout.important {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    border-color: var(--legal-primary);
    color: #880e4f;
}

.legal-callout.info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #2196f3;
    color: #0d47a1;
}

.legal-callout strong { color: inherit; font-weight: 800; }

/* Contact card */
.legal-contact {
    background: linear-gradient(135deg, #fce4ec, #f3e5f5);
    border: 2px solid var(--legal-primary);
    border-radius: var(--legal-radius);
    padding: 22px 24px;
    text-align: center;
    margin-top: 20px;
}

.legal-contact h3 {
    font-size: 16px;
    font-weight: 800;
    color: #880e4f;
    margin-bottom: 8px;
}

.legal-contact p {
    font-size: 14px;
    color: #ad1457;
    margin-bottom: 10px;
}

.legal-contact a {
    display: inline-block;
    padding: 12px 22px;
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-purple));
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(233, 30, 140, 0.28);
    margin-top: 4px;
}

.legal-contact a:active { transform: scale(0.97); }

.legal-contact .dpo {
    font-size: 12.5px;
    color: #6a1b9a;
    margin-top: 14px;
    line-height: 1.6;
}

/* Footer */
.legal-footer {
    text-align: center;
    padding: 28px 12px 8px;
    margin-top: 24px;
}

.legal-footer .line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--legal-primary), var(--legal-purple), transparent);
    margin: 0 auto 14px;
    border-radius: 2px;
}

.legal-footer .credit {
    font-size: 12.5px;
    color: rgba(30, 30, 60, 0.65);
    margin-bottom: 6px;
}

.legal-footer .credit strong {
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.legal-footer .copy {
    font-size: 11px;
    color: rgba(30, 30, 60, 0.45);
    letter-spacing: 0.03em;
}

/* Responsive */
@media (max-width: 480px) {
    .legal-shell { padding: 14px 14px 40px; }
    .legal-card { padding: 20px 18px; }
    .legal-hero h1 { font-size: 24px; }
    .legal-table { font-size: 12.5px; }
    .legal-table th, .legal-table td { padding: 8px 10px; }
    .legal-topbar { padding: 12px 14px; }
    .legal-topbar .brand-name { font-size: 14px; }
}

/* Dark theme */
html[data-theme="dark"] body { background: #16161f; color: #e8e8ee; }
html[data-theme="dark"] .legal-topbar {
    background: linear-gradient(135deg, #1f1f2c 0%, #2d1b3d 100%);
    border-color: #4a2a55;
}
html[data-theme="dark"] .legal-topbar .back-link {
    background: rgba(255, 255, 255, 0.08);
    color: #f8bbd0;
}
html[data-theme="dark"] .legal-card {
    background: #22222e;
    border-color: #333344;
}
html[data-theme="dark"] .legal-card p,
html[data-theme="dark"] .legal-card ul li,
html[data-theme="dark"] .legal-card em { color: #b8b8c8; }
html[data-theme="dark"] .legal-card h2,
html[data-theme="dark"] .legal-card h3,
html[data-theme="dark"] .legal-card strong { color: #f0e8f5; }
html[data-theme="dark"] .legal-card.intro {
    background: linear-gradient(135deg, #2d1b3d, #3a1e42);
    border-color: #4a2a55;
    color: #f8bbd0;
}
html[data-theme="dark"] .legal-table {
    border-color: #333344;
}
html[data-theme="dark"] .legal-table th {
    background: linear-gradient(135deg, #2d1b3d, #3a1e42);
    color: #f8bbd0;
    border-bottom-color: #4a2a55;
}
html[data-theme="dark"] .legal-table td {
    color: #b8b8c8;
    border-bottom-color: #2e2e3a;
}
html[data-theme="dark"] .legal-table tbody tr:nth-child(even) td { background: #26262f; }
html[data-theme="dark"] .legal-footer .credit { color: rgba(255, 255, 255, 0.55); }
html[data-theme="dark"] .legal-footer .copy { color: rgba(255, 255, 255, 0.35); }