/* Legal Modal Styles */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.legal-modal.active {
    opacity: 1;
    visibility: visible;
}

.legal-modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.legal-modal.active .legal-modal-content {
    transform: translateY(0);
}

.legal-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9fafb;
}

.legal-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.legal-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #6b7280;
    transition: color 0.2s ease;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-modal-close:hover {
    color: #111827;
}

.legal-modal-body {
    padding: 32px;
    overflow-y: auto;
    color: #374151;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    font-size: 1rem;
}

.legal-modal-body h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-top: 24px;
    margin-bottom: 12px;
}

.legal-modal-body h2:first-child {
    margin-top: 0;
}

.legal-modal-body p {
    margin-bottom: 16px;
}

.legal-modal-body ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-modal-body li {
    margin-bottom: 8px;
}

.legal-modal-footer {
    padding: 16px 32px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    background-color: #f9fafb;
}

.legal-btn-close {
    background-color: #111827;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.legal-btn-close:hover {
    background-color: #374151;
}

/* Dark Mode Support for Modal (if needed based on theme) */
@media (prefers-color-scheme: dark) {
    /* Optional: Uncomment if you want the modal to be dark themed by default or based on system pref */
    /*
    .legal-modal-content {
        background-color: #1f2937;
    }
    .legal-modal-header, .legal-modal-footer {
        background-color: #111827;
        border-color: #374151;
    }
    .legal-modal-title {
        color: #f9fafb;
    }
    .legal-modal-body {
        color: #d1d5db;
    }
    .legal-modal-body h2 {
        color: #f3f4f6;
    }
    */
}

