/* =========================================================
   ORC DIGYO - DOCUMENTOS LEGAIS
   Termos de Uso + Política de Privacidade
   ========================================================= */

body.legal-modal-open {
    overflow: hidden;
}

.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.legal-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.legal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .74);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.legal-modal-panel {
    position: relative;
    z-index: 1;
    width: min(920px, 96vw);
    height: min(820px, 88dvh);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
    transform: translateY(14px) scale(.985);
    transition: transform .24s ease;
}

.legal-modal.open .legal-modal-panel {
    transform: translateY(0) scale(1);
}

.legal-modal-header {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 28px;
    border-bottom: 1px solid #e9edf4;
    background: #fff;
}

.legal-modal-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.legal-modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #121827;
    font-size: 1.18rem;
    line-height: 1.3;
}

.legal-modal-header h2 i {
    color: #7c3aed;
    font-size: 1rem;
}

.legal-modal-close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    font-size: 1rem;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.legal-modal-close:hover {
    color: #475569;
    background: #f3f5f9;
}

.legal-modal-close:focus-visible,
.legal-modal-confirm:focus-visible {
    outline: 2px solid rgba(124, 58, 237, .4);
    outline-offset: 2px;
}

.legal-modal-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px;
    color: #5b677a;
    font-size: .9rem;
    line-height: 1.72;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, .14) transparent;
}

.legal-modal-body::-webkit-scrollbar {
    width: 2px;
}

.legal-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, .12);
    border-radius: 999px;
}

.legal-document-heading {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e6eaf0;
    text-align: center;
}

.legal-document-heading h3 {
    margin: 0 0 5px;
    color: #151b2b;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .01em;
}

.legal-document-heading p {
    margin: 0;
    color: #94a3b8;
    font-size: .76rem;
}

.legal-highlight {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: 14px;
}

.legal-highlight > i {
    margin-top: 3px;
    font-size: 1rem;
}

.legal-highlight strong {
    display: block;
    margin-bottom: 3px;
    font-size: .78rem;
    font-weight: 800;
}

.legal-highlight p {
    margin: 0;
}

.legal-highlight-success {
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    color: #0f766e;
}

.legal-highlight-success > i {
    color: #059669;
}

.legal-section {
    margin: 0 0 22px;
}

.legal-section h4 {
    margin: 0 0 8px;
    color: #172033;
    font-size: .82rem;
    font-weight: 800;
}

.legal-section p {
    margin: 0 0 10px;
}

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

.legal-update {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid #e8ecf2;
    color: #94a3b8;
    font-size: .72rem;
    font-weight: 600;
}

.legal-modal-footer {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 22px;
    border-top: 1px solid #e9edf4;
    background: #fbfcfe;
}

.legal-modal-footer span {
    color: #9aa6b8;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.legal-modal-confirm {
    min-width: 190px;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(124, 58, 237, .2);
    transition: transform .2s ease, box-shadow .2s ease;
}

.legal-modal-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(124, 58, 237, .26);
}

/* Rodapé legal discreto */
.landing-footer .legal-footer-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-left: 8px;
}

.landing-footer .legal-footer-links::before {
    content: '•';
    color: currentColor;
    opacity: .35;
    margin-right: 1px;
}

.landing-footer .legal-footer-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: none;
    opacity: .58;
    cursor: pointer;
    transition: opacity .2s ease;
}

.landing-footer .legal-footer-link:hover,
.landing-footer .legal-footer-link:focus-visible {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.landing-footer .legal-footer-separator {
    opacity: .28;
}

@media (max-width: 720px) {
    .legal-modal {
        padding: 10px;
        align-items: flex-end;
    }

    .legal-modal-panel {
        width: 100%;
        height: min(92dvh, 900px);
        border-radius: 18px 18px 10px 10px;
    }

    .legal-modal-header {
        min-height: 84px;
        padding: 18px 18px;
    }

    .legal-modal-header h2 {
        font-size: 1rem;
    }

    .legal-modal-body {
        padding: 22px 18px;
        font-size: .86rem;
    }

    .legal-highlight {
        padding: 16px;
    }

    .legal-modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 16px 16px;
    }

    .legal-modal-footer span {
        display: none;
    }

    .legal-modal-confirm {
        width: 100%;
        min-width: 0;
    }

    .landing-footer .legal-footer-links {
        display: flex;
        margin: 7px 0 0;
    }

    .landing-footer .legal-footer-links::before {
        display: none;
    }
}
