/* =============================================================================
   LEGAL MODALS - PRIVACY POLICY & TERMS OF SERVICE
   ============================================================================= */

/* Base Modal Styles */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    padding: 20px;
}

.legal-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.legal-modal-content {
    background: #ffffff;
    border-radius: 0;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    border: 3px solid var(--vixel-primary, #1a4c3e);
    transform: translateY(50px) scale(0.9);
    transition: all 0.3s ease-out;
    position: relative;
}

.legal-modal.show .legal-modal-content {
    transform: translateY(0) scale(1);
}

/* Close Button - Unified with Cookie Modal */
.legal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 2px solid var(--vixel-primary, #1a4c3e);
    background: white;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--vixel-primary, #1a4c3e);
    transition: all 0.3s ease;
    z-index: 10;
}

.legal-close:hover {
    background: var(--vixel-primary, #1a4c3e);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(26, 76, 62, 0.3);
}

/* Modal Header - Unified with Cookie Modal */
.legal-modal-header {
    padding: 28px 28px 0;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, 
        rgba(26, 76, 62, 0.03),
        rgba(139, 38, 53, 0.03));
    border-bottom: 1px solid rgba(26, 76, 62, 0.1);
}

/* Logo Style - Same as Cookie Modal */
.legal-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: #f8f9fa;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid #e9ecef;
}

.legal-logo img {
    width: 60px;
    height: auto;
    filter: none;
}

.legal-logo::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--vixel-primary, #1a4c3e), var(--vixel-accent, #d4af37));
    border-radius: 0;
    z-index: -1;
}

.legal-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 0;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--vixel-accent, #d4af37);
}

/* Titles - Unified with Cookie Modal */
.legal-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.2;
}

.legal-modal-subtitle {
    color: #4a4a4a;
    font-size: 0.95rem;
    margin-bottom: 0;
    font-weight: 500;
}

/* Modal Body - Unified with Cookie Modal */
.legal-modal-body {
    padding: 20px 24px;
    line-height: 1.6;
    color: #333;
}

.legal-modal-body h2 {
    color: var(--vixel-primary, #1a4c3e);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--vixel-accent, #d4af37);
}

.legal-modal-body h2:first-child {
    margin-top: 0;
}

.legal-modal-body h3 {
    color: var(--vixel-secondary, #8b2635);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 24px 0 12px;
}

.legal-modal-body p {
    margin-bottom: 16px;
    text-align: justify;
}

.legal-modal-body ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-modal-body li {
    margin-bottom: 8px;
}

.legal-modal-body strong {
    color: var(--vixel-primary, #1a4c3e);
    font-weight: 600;
}

/* Contact Information Box */
.legal-contact-box {
    background: linear-gradient(135deg, 
        rgba(26, 76, 62, 0.05),
        rgba(139, 38, 53, 0.05));
    border: 2px solid var(--vixel-accent, #d4af37);
    border-radius: 0;
    padding: 20px;
    margin: 24px 0;
}

.legal-contact-box h4 {
    color: var(--vixel-primary, #1a4c3e);
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.legal-contact-box p {
    margin: 4px 0;
    font-size: 0.95rem;
}

/* Data Types Table */
.legal-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.legal-data-table th,
.legal-data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
}

.legal-data-table th {
    background: var(--vixel-primary, #1a4c3e);
    color: white;
    font-weight: 600;
}

.legal-data-table tr:nth-child(even) {
    background: rgba(26, 76, 62, 0.05);
}

/* Rights List */
.legal-rights-list {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--vixel-accent, #d4af37);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0;
}

.legal-rights-list h4 {
    color: var(--vixel-secondary, #8b2635);
    margin: 0 0 12px;
    font-size: 1.1rem;
}

/* Modal Footer */
.legal-modal-footer {
    background: linear-gradient(135deg, 
        rgba(26, 76, 62, 0.03),
        rgba(139, 38, 53, 0.03));
    padding: 24px 28px;
    border-top: 2px solid var(--vixel-primary, #1a4c3e);
    text-align: right;
    border-radius: 0;
}

.legal-modal-footer .btn {
    border-radius: 0;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 2px solid var(--vixel-primary, #1a4c3e);
    background: var(--vixel-primary, #1a4c3e);
    color: white;
    box-shadow: 0 3px 10px rgba(26, 76, 62, 0.4);
}

.legal-modal-footer .btn:hover {
    background: var(--vixel-secondary, #8b2635);
    border-color: var(--vixel-secondary, #8b2635);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 38, 53, 0.5);
}

.legal-modal-footer .btn-primary {
    background: linear-gradient(135deg, 
        var(--vixel-primary, #1a4c3e), 
        var(--vixel-secondary, #8b2635));
    border: 2px solid transparent;
}

.legal-modal-footer .btn-primary:hover {
    background: var(--vixel-accent, #d4af37);
    color: #000;
    border-color: var(--vixel-primary, #1a4c3e);
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-modal {
        padding: 10px;
    }
    
    .legal-modal-content {
        max-height: 95vh;
    }
    
    .legal-modal-header {
        padding: 20px;
    }
    
    .legal-modal-title {
        font-size: 1.5rem;
    }
    
    .legal-modal-body {
        padding: 20px 16px;
    }
    
    .legal-modal-body h2 {
        font-size: 1.2rem;
    }
    
    .legal-data-table {
        font-size: 0.8rem;
    }
    
    .legal-data-table th,
    .legal-data-table td {
        padding: 8px;
    }
}

@media (max-width: 576px) {
    .legal-modal-header {
        padding: 16px;
    }
    
    .legal-modal-title {
        font-size: 1.3rem;
    }
    
    .legal-modal-body {
        padding: 16px 12px;
    }
    
    .legal-contact-box {
        padding: 16px;
    }
}

/* Scrollbar Styling */
.legal-modal-content::-webkit-scrollbar {
    width: 8px;
}

.legal-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.legal-modal-content::-webkit-scrollbar-thumb {
    background: var(--vixel-primary, #1a4c3e);
    border-radius: 0;
}

.legal-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--vixel-secondary, #8b2635);
}