/* Ave Fénix · Consulta estable y libre de bloqueos */

html[data-af-consulta-ready="1"],
html[data-af-consulta-ready="1"] body {
    min-height: 100%;
}

body.public-query-body:not(.results-modal-open):not(.swal2-shown) {
    overflow-y: auto !important;
    pointer-events: auto !important;
}

body.public-query-body:not(.results-modal-open) #resultsModal,
body.public-query-body:not(.swal2-shown) > .swal2-container {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.public-query-body .public-topbar,
body.public-query-body .public-query-main,
body.public-query-body .public-footer {
    pointer-events: auto;
}

body.public-query-body .public-topbar {
    z-index: 1500;
}

body.public-query-body .public-footer {
    z-index: 1450;
}

#plataformas-container.consulta-platform-grid {
    overflow: visible !important;
}

#plataformas-container .platform-box {
    appearance: none;
    font: inherit;
    cursor: pointer;
}

#platform-pagination {
    min-height: 40px;
    margin: 8px 0 14px !important;
}

.af-consulta-pagination {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.af-consulta-page-arrow {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d7e0eb;
    border-radius: 11px;
    background: #fff;
    color: #334155;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .09);
    cursor: pointer;
    transition:
        transform .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease;
}

.af-consulta-page-arrow:hover:not(:disabled) {
    color: var(--brand-primary, #dc2626);
    border-color:
        color-mix(
            in srgb,
            var(--brand-primary, #dc2626) 48%,
            #d7e0eb
        );
    box-shadow: 0 9px 22px rgba(15, 23, 42, .14);
    transform: translateY(-1px);
}

.af-consulta-page-arrow:active:not(:disabled) {
    transform: scale(.96);
}

.af-consulta-page-arrow:disabled {
    opacity: .32;
    cursor: not-allowed;
    box-shadow: none;
}

.af-consulta-page-indicator {
    min-width: 190px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.af-consulta-instructions {
    display: grid;
    gap: 9px;
}

.af-consulta-instructions-intro {
    margin: -6px 0 3px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.af-consulta-instruction {
    display: grid;
    grid-template-columns: 30px 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .045);
}

.af-consulta-instruction-number,
.af-consulta-step {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--brand-primary, #dc2626),
            var(--brand-secondary, #991b1b)
        );
    font-size: 11px;
    font-weight: 900;
}

.af-consulta-instruction-icon,
.af-consulta-step-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--brand-primary, #dc2626);
    background:
        color-mix(
            in srgb,
            var(--brand-primary, #dc2626) 9%,
            #fff
        );
    font-size: 13px;
}

.af-consulta-instruction-copy strong,
.af-consulta-step-copy strong {
    display: block;
    color: #172033;
    font-size: 12px;
    line-height: 1.25;
}

.af-consulta-instruction-copy small,
.af-consulta-step-copy small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.af-consulta-results {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.af-consulta-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .045);
}

.af-consulta-result-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.af-consulta-result-copy strong {
    color: #172033;
    font-size: 12px;
}

.af-consulta-result-copy small {
    color: #64748b;
    font-size: 10px;
}

.af-consulta-match {
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    padding: 4px 8px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #166534;
    background: #f0fdf4;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.af-consulta-match.is-alias {
    border-color: #ddd6fe;
    color: #6d28d9;
    background: #f5f3ff;
}

.view-content-btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
    cursor: pointer;
}

.view-content-btn.is-public {
    background: #2563eb;
}

.view-content-btn.is-private {
    background: #eab308;
}

.af-consulta-modal {
    position: fixed;
    z-index: 1800;
    inset:
        var(--public-header-height, 72px)
        0
        var(--public-footer-height, 66px)
        0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(6px);
}

.af-consulta-modal-shell {
    width: min(1050px, calc(100vw - 40px));
    max-height:
        calc(
            100vh
            - var(--public-header-height, 72px)
            - var(--public-footer-height, 66px)
            - 32px
        );
    overflow: auto;
    border-radius: 19px;
    box-shadow: 0 32px 90px rgba(2, 6, 23, .38);
}

.af-consulta-modal-shell > div {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body.results-modal-open {
    overflow: hidden !important;
}

@media (max-width: 760px) {
    .af-consulta-page-indicator {
        min-width: 150px;
        font-size: 10px;
    }

    .af-consulta-result {
        align-items: stretch;
        flex-direction: column;
    }

    .af-consulta-result-actions,
    .view-content-btn {
        width: 100%;
    }

    .af-consulta-modal {
        inset: var(--public-header-height, 64px) 0 0;
        padding: 10px;
    }

    .af-consulta-modal-shell {
        width: 100%;
        max-height:
            calc(
                100vh
                - var(--public-header-height, 64px)
                - 20px
            );
    }
}


/* AFENIXX V18 · modal de correo realmente visible */
body.public-query-body.results-modal-open
#resultsModal.af-consulta-modal {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.public-query-body.results-modal-open
#resultsModal.af-consulta-modal
.af-consulta-modal-shell {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

