/* Branded look for every SweetAlert2 loading popup (Swal.showLoading) and the button loading state.
   Shared by _Layout and the stand-alone Login page. */
.swal2-container:has(.swal2-loading) {
    background: rgba(44, 62, 80, .45) !important;
    backdrop-filter: blur(4px);
}

.swal2-popup.swal2-loading {
    width: auto;
    min-width: 280px;
    max-width: 90vw;
    padding: 30px 36px 26px;
    border-radius: 20px;
    border-top: 4px solid #C0392B;
    box-shadow: 0 28px 70px rgba(44, 62, 80, .32);
}

/* Spinner above the text */
.swal2-popup.swal2-loading .swal2-actions {
    order: -1;
    grid-row: 1;
    margin: 0 auto 14px;
}

.swal2-popup.swal2-loading .swal2-title {
    font-size: 18px;
    font-weight: 700;
    color: #2C3E50;
    padding-top: 0;
}

.swal2-popup.swal2-loading .swal2-title:empty { display: none; }

.swal2-popup.swal2-loading .swal2-html-container {
    font-size: 14px;
    color: #6B7280;
    margin-top: 6px;
}

/* Two-tone ring with a pulsing core */
.swal2-popup.swal2-loading .swal2-loader {
    position: relative;
    width: 58px;
    height: 58px;
    margin: 0;
    border: 4px solid #F3E5D8;
    border-top-color: #C0392B;
    border-right-color: #B87333;
    border-radius: 50%;
    animation: brand-spin .9s cubic-bezier(.6, .2, .4, .8) infinite;
}

.swal2-popup.swal2-loading .swal2-loader::after {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C0392B, #B87333);
    animation: brand-pulse 1.2s ease-in-out infinite;
}

@keyframes brand-spin { to { transform: rotate(360deg); } }
@keyframes brand-pulse {
    0%, 100% { transform: scale(.55); opacity: .55; }
    50% { transform: scale(1); opacity: 1; }
}

/* Button loading state: <button class="is-loading"> shows a small ring before its label */
button.is-loading {
    pointer-events: none;
    opacity: .9;
}

button.is-loading::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-inline-end: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: brand-spin .7s linear infinite;
}

button.is-loading > i { display: none; }
