/* ============================================
   LEGAL & ABOUT MODAL
   ============================================ */

.legal-modal {
    max-width: 800px !important;
    width: 98% !important;
    height: 90vh;
    max-height: 900px;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalFadeUp 0.3s ease-out;
    background: var(--popup-bg) !important;
    backdrop-filter: blur(16px);
    border: 1px solid var(--popup-border) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    margin: 10px auto;
}

.legal-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--divider-border);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.legal-tabs {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.legal-tab-btn {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border-bottom: 2px solid transparent;
}

.legal-tab-btn:hover {
    color: var(--text-color);
}

.legal-tab-btn.active {
    color: var(--accent-color);
    font-weight: 700;
    border-bottom-color: var(--accent-color);
}

.legal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-header-actions .modal-close {
    position: static !important;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted) !important;
}

.legal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar for legal content */
.legal-content::-webkit-scrollbar {
    width: 8px;
}

.legal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

/* About Section Styling */
.about-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.version-badges {
    display: flex;
    gap: 12px;
}

.version-badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
}

.info-block {
    background: var(--input-bg);
    border: 1px solid var(--divider-border);
    border-radius: 12px;
    padding: 20px;
    line-height: 1.7;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.info-block p {
    margin: 0 0 16px 0;
}

.info-block p:last-child {
    margin-bottom: 0;
}

.info-block a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.info-block a:hover {
    text-decoration: underline;
    color: var(--accent-light);
}

.spellvector-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* ============================================
   COOKIE CONSENT BANNER
   Bottom-left card, cohesive with app design
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9998;
    width: 360px;
    max-width: calc(100vw - 3rem);
    background: var(--popup-bg);
    border: 1px solid var(--popup-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@keyframes cookieSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-banner-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

.cookie-banner-icon {
    color: var(--accent-light);
    display: flex;
    align-items: center;
}

.cookie-banner-body {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.625rem;
}

.cookie-banner-actions .btn {
    flex: 1;
    font-size: 0.8125rem;
    padding: 6px 10px;
    text-align: center;
}

@media (max-width: 480px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .legal-modal {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .legal-header {
        padding: 12px 16px;
    }

    .legal-tabs {
        gap: 1rem;
    }

    .legal-tab-btn {
        font-size: 0.9rem;
    }

    .legal-content {
        padding: 16px;
    }

    .info-block {
        padding: 16px;
        font-size: 0.9rem;
    }
}
