/* ==========================================================================
   17. CUSTOM LEGAL PAGE LAYOUT (Premium App Aesthetic)
   ========================================================================== */
.fp-legal-page {
    background-color: #f3f4f6;
    /* Matched to main search page background */
    min-height: calc(100vh - 140px);
    padding: 60px 24px;
}

.fp-legal-layout {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
}

/* Sidebar Navigation (Desktop) */
.fp-legal-sidebar {
    position: sticky;
    top: 100px;
}

.fp-legal-sidebar-inner {
    background: #ffffff;
    border-radius: var(--fp-radius-md);
    border: 1px solid #f3f4f6;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fp-legal-nav {
    display: flex;
    flex-direction: column;
}

.fp-legal-nav a {
    padding: 12px 24px;
    font-size: var(--fp-text-base);
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.fp-legal-nav a:hover {
    color: #111827;
    background: #f9fafb;
}

.fp-legal-nav a.active {
    color: #111;
    font-weight: 800;
    background: #f3f4f6;
    border-left-color: var(--fp-primary);
}

/* Main Legal Content Container */
.fp-legal-content {
    background: #ffffff;
    border-radius: var(--fp-radius-lg);
    border: 1px solid #f3f4f6;
    padding: 48px 56px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Global Support CTA Block - Ultra Premium Dark Mode */
.fp-legal-cta {
    margin-top: 60px;
    background: #111827;
    /* Deep sleek black */
    border-radius: var(--fp-radius-lg);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 10px 25px -5px rgba(17, 24, 39, 0.4);
    position: relative;
    overflow: hidden;
}

/* Subtle glow effect for premium feel */
.fp-legal-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 50%);
    pointer-events: none;
}

.fp-legal-cta-body {
    position: relative;
    z-index: 1;
}

.fp-legal-cta-body h3 {
    font-size: var(--fp-text-xl);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.fp-legal-cta-body p {
    font-size: var(--fp-text-md);
    color: #9ca3af;
    margin: 0;
    line-height: 1.6;
}

/* High contrast white button for CTA */
.fp-btn-white {
    position: relative;
    z-index: 1;
    display: inline-block;
    background: #ffffff;
    color: #111;
    padding: 14px 28px;
    border-radius: var(--fp-radius-md);
    font-weight: 700;
    font-size: var(--fp-text-base);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fp-btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Mobile Adjustments for Legal Custom Layout - App Style */
@media (max-width: 850px) {
    .fp-legal-page {
        padding: 24px 16px;
    }

    .fp-legal-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .fp-legal-sidebar {
        position: static;
        margin: 0 -16px;
        /* Bleed edge-to-edge on mobile */
    }

    .fp-legal-sidebar-inner {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 12px 16px;
        background: #ffffff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    }

    /* Turn sidebar into horizontal scrolling pill tabs on mobile */
    .fp-legal-nav {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 4px;
        /* Room for scrollbar if any */
    }

    .fp-legal-nav::-webkit-scrollbar {
        display: none;
    }

    .fp-legal-nav a {
        padding: 8px 16px;
        white-space: nowrap;
        background: #f3f4f6;
        border-radius: var(--fp-radius-20);
        border-left: none;
        font-size: var(--fp-text-base);
        color: #4b5563;
    }

    .fp-legal-nav a.active {
        background: #111;
        color: #fff;
    }

    .fp-legal-content {
        padding: 32px 20px;
        border-radius: var(--fp-radius-md);
    }

    .fp-legal-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px;
    }

    .fp-btn-white {
        width: 100%;
        text-align: center;
    }
}

