/* ==========================================================================
   2GATHER.WIN - LEGAL AGREEMENT & DATA PROTECTION MODAL STYLES
   Version: 1.0
   Fully externalized, responsive, dark-mode & cyberpunk vault aesthetics
   ========================================================================== */

/* Modal Backdrop & Outer Layout */
.legal-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(4, 7, 13, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: opacity 0.25s ease;
}

.legal-modal-container {
    background: #090D16;
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: 1rem;
    width: 100%;
    max-width: 58rem;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.15), 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: legalModalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes legalModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.legal-modal-header {
    background: linear-gradient(180deg, #0E1424 0%, #090D16 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.legal-header-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-header-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #22d3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.legal-header-title {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 0.025em;
    line-height: 1.25;
}

.legal-header-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.15rem;
}

.legal-header-close-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.legal-header-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Toolbar & Meta Info Bar */
.legal-meta-strip {
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.65rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.legal-meta-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.legal-badge-pill {
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: #38bdf8;
    font-weight: 600;
}

.legal-badge-green {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.legal-search-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    padding: 0.35rem 0.75rem;
    color: #FFFFFF;
    font-size: 0.75rem;
    outline: none;
    width: 220px;
    transition: all 0.2s;
}

.legal-search-input:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Modal Body / Scroll Area */
.legal-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.legal-modal-body::-webkit-scrollbar {
    width: 6px;
}
.legal-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}
.legal-modal-body::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.3);
    border-radius: 3px;
}
.legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.6);
}

/* Legal Document Styles */
.legal-doc-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: #cbd5e1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.825rem;
    line-height: 1.65;
}

/* Articles */
.legal-article {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.legal-article:hover {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(15, 23, 42, 0.65);
}

.legal-article-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.legal-article-num {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 800;
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.legal-article-title {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.02em;
}

.legal-p {
    margin-bottom: 0.75rem;
    color: #cbd5e1;
}

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

.legal-list {
    margin: 0.5rem 0 0.75rem 1.25rem;
    list-style-type: disc;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.legal-list-numbered {
    margin: 0.5rem 0 0.75rem 1.25rem;
    list-style-type: decimal;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.legal-list li, .legal-list-numbered li {
    padding-left: 0.25rem;
}

.legal-term {
    color: #38bdf8;
    font-weight: 600;
}

.legal-highlight-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    margin: 0.75rem 0;
    color: #fef3c7;
    font-size: 0.8rem;
}

.legal-cyber-box {
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    margin: 0.75rem 0;
    color: #e0f2fe;
    font-size: 0.8rem;
}

.legal-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.legal-checkbox-item span.icon {
    color: #10b981;
    font-weight: bold;
}

/* Footer Controls */
.legal-modal-footer {
    background: #090D16;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.legal-footer-status {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-footer-btns {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.legal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.legal-btn-primary {
    background: #10b981;
    color: #022c22;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
    transition: all 0.2s;
}

.legal-btn-primary:hover {
    background: #059669;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    color: #ffffff;
}
