/* circle-filled: arco giratório sobre uma trilha circular discreta. */
/* Bloqueia o loader também se outra folha antiga alterar seu display. */
body .swal2-popup:not(.swal2-loading) .swal2-loader {
    display: none !important;
}

.circle-filled,
.ts-dropdown .spinner {
    display: inline-block;
}

.circle-filled,
body .swal2-loader,
.ts-dropdown .spinner {
    /* O SweetAlert controla display: o loader só aparece durante showLoading(). */
    position: relative;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    vertical-align: -0.15em;
    box-sizing: border-box;
}

.circle-filled::before,
.circle-filled::after,
body .swal2-loader::before,
body .swal2-loader::after,
.ts-dropdown .spinner::before,
.ts-dropdown .spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    box-sizing: border-box;
    border: 0.14em solid currentColor;
    border-radius: 50%;
}

.circle-filled::before,
body .swal2-loader::before,
.ts-dropdown .spinner::before {
    opacity: 0.25;
}

.circle-filled::after,
body .swal2-loader::after,
.ts-dropdown .spinner::after {
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
    animation: circle-filled-rotate 1s linear infinite;
}

body .swal2-loader {
    width: 1em;
    height: 1em;
    font-size: 2.2em;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--primary-blue, #284296);
    animation: none;
}

.ts-dropdown .spinner {
    width: 1em;
    height: 1em;
    font-size: 24px;
    color: var(--text-muted, #64748b);
}

/* Selects nativos não renderizam elementos dentro de <option>. */
select:has(> option[data-loading]) {
    padding-right: 40px;
    appearance: none;
    background-image: url('/IMG/circle-filled.svg');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}

@keyframes circle-filled-rotate {
    to { transform: rotate(360deg); }
}

/* Leitura de comprovantes: mensagem curta e indicador centralizado no celular. */
div.swal2-popup.leitura-comprovante-modal {
    width: min(22rem, calc(100vw - 2rem)) !important;
    padding: 28px 24px 24px !important;
    text-align: center;
}

div.swal2-popup.leitura-comprovante-modal .swal2-title {
    padding: 0;
    font-size: 20px !important;
    font-weight: 600;
    line-height: 1.3 !important;
}

div.swal2-popup.leitura-comprovante-modal .swal2-html-container {
    margin: 10px 0 0;
    padding: 0;
    color: var(--text-muted, #64748b);
    font-size: 14px !important;
    line-height: 1.5;
}

div.leitura-comprovante-modal .swal2-actions {
    display: flex !important;
    width: 100%;
    margin: 22px 0 0;
    padding: 0;
    justify-content: center;
}

body .leitura-comprovante-modal .swal2-loader {
    margin: 0 auto;
    font-size: 30px;
}

@media (prefers-reduced-motion: reduce) {
    .circle-filled::after,
    body .swal2-loader::after,
    .ts-dropdown .spinner::after {
        animation: none;
    }
}
