/* ==========================================================================
   SCITW Legal & Compliance Pages Stylesheet
   Privacy Policy, Terms of Service, User Data Deletion Instructions
   100% External CSS - Mobile, Tablet, Desktop Responsive
   ========================================================================== */

/* ── HERO BANNER ── */
.legal-hero {
    background: linear-gradient(135deg, #090a0f 0%, #161924 60%, #1e2230 100%);
    position: relative;
    padding: clamp(2.5rem, 5vw, 4.5rem) 1rem;
    border-bottom: 2px solid var(--border-soft);
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(227, 30, 36, 0.18) 0%, rgba(227, 30, 36, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.legal-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    background: rgba(227, 30, 36, 0.12);
    color: #ff3b40;
    border: 1px solid rgba(227, 30, 36, 0.3);
    margin-bottom: 1rem;
}

.legal-hero-title {
    font-size: clamp(1.85rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.legal-hero-title span {
    color: var(--red);
}

.legal-hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #cbd5e1;
    max-width: 750px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.6;
}

.legal-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: clamp(0.78rem, 1.5vw, 0.88rem);
    color: #94a3b8;
}

.legal-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legal-meta-item i {
    color: var(--red);
}

.legal-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.legal-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.legal-btn-outline:hover,
.legal-btn-outline:focus-visible {
    background: rgba(227, 30, 36, 0.2);
    border-color: var(--red);
    color: #ffffff;
}

.legal-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.6rem 1.35rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--red-gradient);
    border: 1px solid var(--red);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(227, 30, 36, 0.35);
    transition: all 0.25s ease;
    cursor: pointer;
}

.legal-btn-primary:hover,
.legal-btn-primary:focus-visible {
    filter: brightness(1.1);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.45);
}

/* ── MAIN CONTENT CONTAINER & GRID ── */
.legal-page-section {
    padding: clamp(2rem, 4vw, 4rem) 0;
    background: var(--black);
    min-height: 60vh;
}

.legal-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── SIDEBAR TABLE OF CONTENTS ── */
.legal-toc-wrapper {
    position: sticky;
    top: 90px;
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    box-shadow: var(--card-shadow);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.legal-toc-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-toc-title i {
    color: var(--red);
}

.legal-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.legal-toc-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 44px;
}

.legal-toc-link span.toc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--card3);
    color: var(--muted);
    flex-shrink: 0;
}

.legal-toc-link:hover {
    background: var(--red-soft);
    color: var(--red);
}

.legal-toc-link.active {
    background: var(--red-soft);
    color: var(--red);
    font-weight: 700;
    border-left: 3px solid var(--red);
}

.legal-toc-link.active span.toc-num {
    background: var(--red);
    color: #ffffff;
}

/* ── LEGAL CONTENT CARDS ── */
.legal-content-body {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.legal-card {
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    box-shadow: var(--card-shadow);
    scroll-margin-top: 100px;
    transition: border-color 0.25s ease;
}

.legal-card:hover {
    border-color: var(--red-border);
}

.legal-section-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-soft);
}

.legal-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--red-soft);
    color: var(--red);
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.legal-section-title {
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 800;
    color: var(--text-bright);
    margin: 0;
    line-height: 1.3;
}

.legal-text {
    font-size: clamp(0.9rem, 1.5vw, 0.98rem);
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 1rem;
}

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

.legal-list {
    margin: 0.75rem 0 1rem 0;
    padding-left: 1.25rem;
    color: var(--text);
    font-size: clamp(0.9rem, 1.5vw, 0.98rem);
    line-height: 1.75;
}

.legal-list li {
    margin-bottom: 0.5rem;
}

.legal-list li strong {
    color: var(--text-bright);
}

/* ── CALLOUT HIGHLIGHT BOXES (META & WHATSAPP) ── */
.meta-compliance-box {
    background: linear-gradient(135deg, rgba(227, 30, 36, 0.07) 0%, rgba(24, 119, 242, 0.05) 100%);
    border: 1.5px solid var(--red-border);
    border-radius: 14px;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    margin: 1.25rem 0;
}

.meta-compliance-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: var(--text-bright);
}

.meta-compliance-head i.fa-whatsapp {
    color: #25d366;
    font-size: 1.3rem;
}

.meta-compliance-head i.fa-facebook,
.meta-compliance-head i.fa-meta {
    color: #1877f2;
    font-size: 1.3rem;
}

.meta-compliance-box p {
    font-size: clamp(0.85rem, 1.5vw, 0.92rem);
    line-height: 1.65;
    color: var(--text);
    margin: 0;
}

.meta-permission-badge-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.meta-permission-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--card);
    border: 1px solid var(--border-soft);
    color: var(--text-bright);
    font-family: monospace;
}

/* ── HIGHLIGHT BADGES ── */
.legal-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--red-soft);
    color: var(--red);
    margin-right: 0.35rem;
}

.legal-pill-wa {
    background: rgba(37, 211, 102, 0.12);
    color: #1ea952;
    border: 1px solid rgba(37, 211, 102, 0.25);
}

/* ── GRIEVANCE / CONTACT CARD ── */
.legal-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.legal-contact-item {
    background: var(--card2);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.legal-contact-item-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.5px;
}

.legal-contact-item-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    word-break: break-word;
}

.legal-contact-item-val a {
    color: var(--red);
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

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

/* ── DATA DELETION SPECIFIC STYLES ── */
.deletion-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.deletion-step-card {
    background: var(--card2);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.deletion-step-card:hover {
    border-color: var(--red-border);
}

.deletion-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.deletion-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--red);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.deletion-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-bright);
    margin: 0;
}

.deletion-step-card p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* Interactive Request Form & Lookup Box */
.deletion-form-card {
    background: var(--card);
    border: 1.5px solid var(--border-soft);
    border-radius: 16px;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--card-shadow);
}

.deletion-form-title {
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 0.35rem;
}

.deletion-form-subtitle {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.form-group-custom {
    margin-bottom: 1.25rem;
}

.form-label-custom {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.45rem;
}

.form-label-custom span.req {
    color: var(--red);
}

.form-control-custom,
.form-select-custom {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-bright);
    background: var(--card2);
    border: 1.5px solid var(--border-soft);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-control-custom:focus,
.form-select-custom:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.15);
}

.form-control-textarea {
    min-height: 90px;
    resize: vertical;
}

/* Confirmation Tracking Box */
.confirmation-result-box {
    display: none;
    background: var(--card2);
    border: 2px dashed #25d366;
    border-radius: 14px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.confirmation-result-box.active {
    display: block;
}

.conf-code-display {
    font-family: monospace;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 800;
    color: #1ea952;
    background: rgba(37, 211, 102, 0.08);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    border: 1px solid rgba(37, 211, 102, 0.3);
    word-break: break-all;
}

.conf-copy-btn {
    min-height: 44px;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--card);
    border: 1px solid var(--border-soft);
    color: var(--text-bright);
    cursor: pointer;
    transition: all 0.2s ease;
}

.conf-copy-btn:hover {
    background: var(--red-soft);
    color: var(--red);
}

.status-badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge-received {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge-completed {
    background: rgba(37, 211, 102, 0.12);
    color: #1ea952;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

/* ── MOBILE / TABLET RESPONSIVE BREAKPOINTS ── */
@media (max-width: 1024px) {
    .legal-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .legal-toc-wrapper {
        position: relative;
        top: 0;
        max-height: none;
    }

    .legal-toc-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.35rem;
    }
}

@media (max-width: 480px) {
    .legal-hero {
        padding: 2.25rem 0.85rem;
    }

    .legal-card {
        padding: 1.15rem;
        border-radius: 12px;
    }

    .legal-actions-row {
        flex-direction: column;
        width: 100%;
    }

    .legal-btn-outline,
    .legal-btn-primary {
        width: 100%;
    }

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

    .deletion-step-card {
        padding: 1.15rem;
    }

    .conf-code-display {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ── PRINT STYLES ── */
@media print {
    .legal-hero {
        background: #ffffff !important;
        color: #000000 !important;
        border-bottom: 2px solid #000000;
    }

    .legal-hero-title, .legal-hero-title span {
        color: #000000 !important;
    }

    .legal-toc-wrapper,
    .legal-actions-row,
    .navbar,
    footer,
    .scroll-progress-container,
    .bg-watermark {
        display: none !important;
    }

    .legal-layout-grid {
        grid-template-columns: 1fr !important;
    }

    .legal-card {
        border: none !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}
