/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
/* --- State visibility (toggled by the framework via classes on the dialog) --- */
.components-reconnect-first-attempt-visible[b-2k1m8wkmem],
.components-reconnect-repeated-attempt-visible[b-2k1m8wkmem],
.components-reconnect-failed-visible[b-2k1m8wkmem],
.components-pause-visible[b-2k1m8wkmem],
.components-resume-failed-visible[b-2k1m8wkmem],
.components-rejoining-animation[b-2k1m8wkmem] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-2k1m8wkmem],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-2k1m8wkmem],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-2k1m8wkmem],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-2k1m8wkmem],
#components-reconnect-modal.components-reconnect-retrying[b-2k1m8wkmem],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-2k1m8wkmem],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-2k1m8wkmem],
#components-reconnect-modal.components-reconnect-failed[b-2k1m8wkmem],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-2k1m8wkmem] {
    display: block;
}

/* --- No box: just the spinning Poké Ball (and status text/button) on the dimmed backdrop --- */
#components-reconnect-modal[b-2k1m8wkmem] {
    color: #fff;
    width: fit-content;
    max-width: calc(100vw - 2rem);
    margin: 20vh auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-2k1m8wkmem 0.5s both;
}

#components-reconnect-modal[open][b-2k1m8wkmem] {
    animation: components-reconnect-modal-slideUp-b-2k1m8wkmem 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-2k1m8wkmem 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

#components-reconnect-modal[b-2k1m8wkmem]::backdrop {
    background-color: rgba(27, 20, 48, 0.55);
    animation: components-reconnect-modal-fadeInOpacity-b-2k1m8wkmem 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-2k1m8wkmem {
    0%   { transform: translateY(30px) scale(0.95); }
    100% { transform: translateY(0); }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-2k1m8wkmem {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-2k1m8wkmem {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

.components-reconnect-container[b-2k1m8wkmem] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-2k1m8wkmem] {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

#components-reconnect-modal button[b-2k1m8wkmem] {
    border: 0;
    background-color: var(--brand, #E3350D);
    color: var(--brand-ink, #FFFFFF);
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease;
}

#components-reconnect-modal button:hover[b-2k1m8wkmem] {
    filter: brightness(0.92);
}

#components-reconnect-modal button:active[b-2k1m8wkmem] {
    filter: brightness(0.85);
}

/* --- Spinning Poké Ball (fixed colors so it always reads as a Poké Ball) --- */
.components-rejoining-animation[b-2k1m8wkmem] {
    width: 72px;
    height: 72px;
    margin: 0 auto;
}

.pokeball-spinner[b-2k1m8wkmem] {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 4px solid #15131c;
    background: linear-gradient(#E3350D 0 calc(50% - 3px), #15131c calc(50% - 3px) calc(50% + 3px), #FAFAFA calc(50% + 3px) 100%);
    box-shadow: inset -6px -6px 12px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.25);
    animation: pokeball-spin-b-2k1m8wkmem 1s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.pokeball-button[b-2k1m8wkmem] {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #FAFAFA;
    border: 4px solid #15131c;
    box-sizing: border-box;
}

/* The inner dot of the centre button */
.pokeball-button[b-2k1m8wkmem]::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1px solid rgba(21, 19, 28, 0.35);
}

@keyframes pokeball-spin-b-2k1m8wkmem {
    0%   { transform: rotate(0deg); }
    /* brief hold at the top, then a full revolution — reads like a thrown ball settling */
    15%  { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .pokeball-spinner[b-2k1m8wkmem] { animation-duration: 2.4s; }
    #components-reconnect-modal[b-2k1m8wkmem],
    #components-reconnect-modal[open][b-2k1m8wkmem] { animation: none; opacity: 1; }
}
