/* Foxomate Sphere — global loading overlay */
.foxo-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.foxo-loader.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.foxo-loader__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 34px 22px;
    border-radius: 20px;
    background: linear-gradient(165deg, #ffffff 0%, #f3f8ff 55%, #e8f2fc 100%);
    border: 1px solid rgba(66, 130, 194, 0.35);
    box-shadow:
        0 22px 50px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    min-width: 168px;
    max-width: min(360px, calc(100vw - 48px));
    animation: foxoPanelPop 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.foxo-loader__panel--wide {
    min-width: 280px;
}

.foxo-loader__ring {
    position: relative;
    width: 58px;
    height: 58px;
}

.foxo-loader__ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(66, 130, 194, 0.18);
    border-top-color: #4282c2;
    animation: foxoSpin 0.85s linear infinite;
}

.foxo-loader__ring::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #6ba3d9, #4282c2 58%, #2d5f95 100%);
    box-shadow: 0 0 18px rgba(66, 130, 194, 0.55);
    animation: foxoPulse 1.2s ease-in-out infinite;
}

.foxo-loader__orbit {
    position: absolute;
    inset: -4px;
    animation: foxoSpin 1.6s linear infinite reverse;
}

.foxo-loader__dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: #4282c2;
    box-shadow: 0 0 10px rgba(66, 130, 194, 0.75);
}

.foxo-loader__dot:nth-child(1) { transform: rotate(0deg) translateY(-34px); }
.foxo-loader__dot:nth-child(2) { transform: rotate(120deg) translateY(-34px); opacity: 0.85; }
.foxo-loader__dot:nth-child(3) { transform: rotate(240deg) translateY(-34px); opacity: 0.7; }

.foxo-loader__label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    color: #1e3a5f;
    background: linear-gradient(90deg, #2d5f95, #4282c2, #2d5f95);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: foxoShimmer 1.8s linear infinite;
}

.foxo-loader__hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
    color: #475569;
    max-width: 300px;
}

.foxo-loader__hint[hidden] {
    display: none;
}

@keyframes foxoSpin {
    to { transform: rotate(360deg); }
}

@keyframes foxoPulse {
    0%, 100% { transform: scale(0.92); opacity: 0.88; }
    50% { transform: scale(1); opacity: 1; }
}

@keyframes foxoPanelPop {
    from { opacity: 0; transform: scale(0.9) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes foxoShimmer {
    to { background-position: 200% center; }
}

@media (prefers-reduced-motion: reduce) {
    .foxo-loader__ring::before,
    .foxo-loader__ring::after,
    .foxo-loader__orbit,
    .foxo-loader__label,
    .foxo-loader__panel {
        animation: none;
    }
}
