/* Canonical blocking loader shared by Admin, Consultor and Front Office. */
.admin-loading-modal .modal-dialog {
    width: min(30rem, calc(100vw - 1.5rem));
    margin-inline: auto;
}

.admin-loading-modal .modal-content,
.admin-loading-modal__panel {
    overflow: hidden;
    color: #53637f;
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 28px !important;
    background: #fff;
    box-shadow: 0 28px 76px rgba(52, 71, 103, .2), inset 0 1px 0 rgba(255, 255, 255, .96);
    backdrop-filter: blur(28px) saturate(170%);
    -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.modal-content:has(> .admin-loading-modal__panel) {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.admin-loading-modal__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #f1dfc7;
    background: radial-gradient(circle at 100% 0, rgba(244, 183, 91, .25), transparent 42%), linear-gradient(135deg, #fff, #fff5e8);
}

.admin-loading-modal__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 3.15rem;
    height: 3.15rem;
    flex: 0 0 3.15rem;
    color: #bd6b05;
    border: 1px solid #ffd695;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff1ce, #ffe0a7);
    box-shadow: 0 8px 17px rgba(189, 107, 5, .13), inset 0 1px 0 #fff;
}

.admin-loading-modal__icon i {
    font-size: 1rem;
    animation: admin-loading-modal-spin 1s linear infinite;
}

.admin-loading-modal__header small {
    display: block;
    margin-bottom: .18rem;
    color: #b26308;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.admin-loading-modal__header h2 {
    margin: 0;
    color: #243a5f;
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.25;
}

.admin-loading-modal__body {
    display: grid;
    gap: .9rem;
    padding: 1.1rem 1.15rem 1.2rem;
    background: #fff;
}

.admin-loading-modal__body p {
    margin: 0;
    color: #65748c;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.6;
}

.admin-loading-modal__progress {
    position: relative;
    height: .4rem;
    overflow: hidden;
    border: 1px solid #f2dfc4;
    border-radius: 999px;
    background: #fff7ec;
}

.admin-loading-modal__progress span {
    position: absolute;
    inset: -1px auto -1px 0;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f8b64a, #ed8d1f);
    box-shadow: 0 3px 9px rgba(226, 129, 18, .2);
    animation: admin-loading-modal-progress 1.45s ease-in-out infinite;
}

@keyframes admin-loading-modal-spin {
    to { transform: rotate(360deg); }
}

@keyframes admin-loading-modal-progress {
    0% { transform: translateX(-115%); }
    100% { transform: translateX(340%); }
}

@media (max-width: 767.98px) {
    .admin-loading-modal .modal-dialog,
    #modalConsulta .modal-dialog:has(.admin-loading-modal__panel) {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 30rem !important;
        min-width: 0 !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        height: auto !important;
        margin: 0 auto !important;
        padding: max(.5rem, env(safe-area-inset-top)) .5rem max(.5rem, env(safe-area-inset-bottom));
        display: flex;
        align-items: center !important;
    }

    .admin-loading-modal .modal-content,
    #modalConsulta .modal-content:has(> .admin-loading-modal__panel) {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: calc(100dvh - 1rem);
        flex: 0 1 auto;
    }
}

@media (max-width: 575.98px) {
    .admin-loading-modal .modal-dialog,
    #modalConsulta .modal-dialog:has(.admin-loading-modal__panel) {
        max-width: 26rem !important;
    }

    .admin-loading-modal .modal-content,
    .admin-loading-modal__panel {
        border-radius: 22px !important;
    }

    .admin-loading-modal__header {
        gap: .7rem;
        padding: .9rem;
    }

    .admin-loading-modal__icon {
        width: 2.85rem;
        height: 2.85rem;
        flex-basis: 2.85rem;
        border-radius: 15px;
    }

    .admin-loading-modal__body {
        padding: 1rem .9rem 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-loading-modal__icon i,
    .admin-loading-modal__progress span {
        animation: none;
    }

    .admin-loading-modal__progress span {
        width: 100%;
        opacity: .58;
    }
}
