/* css/legal.css */
.legal-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 20000; /* Acima de tudo */
}

.legal-modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.legal-modal-header {
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.legal-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    margin: 15px 20px 0;
    border-radius: 10px;
}

.legal-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.legal-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.legal-viewer {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #334155;
    background: #fff;
}

/* Estilização interna do HTML carregado */
.legal-document h2 { font-size: 1.2rem; margin-bottom: 15px; color: #1e293b; }
.legal-document p { margin-bottom: 12px; }
.legal-document ul, .legal-document ol { margin-left: 20px; margin-bottom: 15px; }

.legal-modal-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-accept-all {
    width: 100%;
    padding: 15px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-accept-all:hover { transform: scale(1.02); filter: brightness(1.1); }

.legal-footer-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}