/* Legal Modal Styling */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    padding: 20px;
    box-sizing: border-box;
}

.legal-modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.legal-modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.legal-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
}

.legal-modal-close:hover {
    opacity: 0.75;
}

.legal-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.legal-modal-body h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 500;
}

.legal-modal-body h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    font-weight: 500;
}

.legal-modal-body p, .legal-modal-body li {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-modal-body ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-modal-body a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-modal-body a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .legal-modal-content {
    background-color: #333;
    color: #f0f0f0;
}

[data-theme="dark"] .legal-modal-header {
    border-bottom-color: #444;
}

[data-theme="dark"] .legal-modal-header h2 {
    color: var(--primary-color-dark);
}

[data-theme="dark"] .legal-modal-close {
    color: #fff;
}

[data-theme="dark"] .legal-modal-body h3 {
    color: var(--secondary-color-dark);
}

[data-theme="dark"] .legal-modal-body a {
    color: var(--primary-color-dark);
}

[data-theme="dark"] .legal-modal-body a:hover {
    color: var(--secondary-color-dark);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .legal-modal-content {
        max-width: 95%;
    }
    
    .legal-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .legal-modal-body h3 {
        font-size: 1.3rem;
    }
    
    .legal-modal-body h4 {
        font-size: 1.1rem;
    }
}
