/* ===================================================================
   LEGAL MODALS + COOKIE BANNER — AuraIALabs
   =================================================================== */

/* ---------- Overlay ---------- */
.legal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.legal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ---------- Modal Box ---------- */
.legal-modal {
    background: linear-gradient(135deg, rgba(12, 8, 28, 0.98) 0%, rgba(20, 10, 40, 0.98) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(168, 85, 247, 0.08);
    width: 100%;
    max-width: 780px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.legal-overlay.is-open .legal-modal {
    transform: translateY(0) scale(1);
}

/* ---------- Header ---------- */
.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
    background: rgba(168, 85, 247, 0.06);
    flex-shrink: 0;
}

.legal-modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.legal-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    line-height: 1;
}

.legal-modal-close:hover {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
    transform: rotate(90deg);
}

/* ---------- Body ---------- */
.legal-modal-body {
    overflow-y: auto;
    padding: 2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}

.legal-modal-body::-webkit-scrollbar {
    width: 5px;
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.4);
    border-radius: 99px;
}

/* ---------- Content ---------- */
.legal-content {
    color: rgba(255, 255, 255, 0.78);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.8;
}

.legal-content .legal-updated {
    font-size: 0.78rem;
    color: rgba(168, 85, 247, 0.8);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.legal-content h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 1.75rem 0 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content p {
    margin-bottom: 0.75rem;
}

.legal-content ul {
    list-style: none;
    margin: 0.5rem 0 0.75rem;
    padding: 0;
}

.legal-content ul li {
    padding: 0.2rem 0 0.2rem 1.2rem;
    position: relative;
}

.legal-content ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #a855f7;
    font-weight: bold;
}

.legal-content strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.legal-content a {
    color: #a855f7;
    text-decoration: underline;
}

.legal-content a:hover {
    color: #c084fc;
}

.legal-content .legal-highlight {
    background: rgba(168, 85, 247, 0.08);
    border-left: 3px solid #a855f7;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.cookie-types-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

.cookie-type-card {
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.cookie-type-card h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: #c084fc;
    margin-bottom: 0.25rem;
}

.cookie-type-card p {
    font-size: 0.78rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================================================
   COOKIE BANNER
   =================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 8500;
    padding: 1.25rem 1.5rem;
    background: rgba(8, 5, 20, 0.97);
    border-top: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.cookie-banner-text {
    flex: 1;
    min-width: 260px;
}

.cookie-banner-text h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.cookie-banner-text p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-text p a {
    color: #a855f7;
    text-decoration: underline;
    cursor: pointer;
}

.cookie-banner-text p a:hover {
    color: #c084fc;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.65rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn-accept {
    padding: 0.55rem 1.25rem;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-accept:hover {
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.5);
    transform: translateY(-1px);
}

.cookie-btn-reject {
    padding: 0.55rem 1.1rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-reject:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.cookie-btn-settings {
    padding: 0.55rem 1.1rem;
    background: transparent;
    color: rgba(168, 85, 247, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-settings:hover {
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.6);
}

@media (max-width: 640px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-btn-accept,
    .cookie-btn-reject,
    .cookie-btn-settings {
        flex: 1;
        text-align: center;
    }

    .legal-modal-header {
        padding: 1.2rem 1.25rem;
    }

    .legal-modal-body {
        padding: 1.25rem;
    }

    .cookie-types-grid {
        grid-template-columns: 1fr;
    }
}