/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
/* Caixa de reconexão do Blazor no tema "Vidro & Cidade".
   As classes components-reconnect-* são postas e tiradas do <dialog> pelo próprio
   framework; aqui só decidimos o que cada estado mostra e como ele aparece. */

.components-reconnect-first-attempt-visible[b-ip60bvcfu0],
.components-reconnect-repeated-attempt-visible[b-ip60bvcfu0],
.components-reconnect-failed-visible[b-ip60bvcfu0],
.components-pause-visible[b-ip60bvcfu0],
.components-resume-failed-visible[b-ip60bvcfu0],
.components-rejoining-animation[b-ip60bvcfu0] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-ip60bvcfu0],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-ip60bvcfu0],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-ip60bvcfu0],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-ip60bvcfu0],
#components-reconnect-modal.components-reconnect-retrying[b-ip60bvcfu0],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-ip60bvcfu0],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-ip60bvcfu0],
#components-reconnect-modal.components-reconnect-failed[b-ip60bvcfu0],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-ip60bvcfu0] {
    display: block;
}

/* --- A caixa --- */
#components-reconnect-modal[b-ip60bvcfu0] {
    width: min(22rem, calc(100vw - 2rem));
    margin: auto;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0.9rem;
    color: #e8eef4;
    background: rgba(9, 13, 18, 0.72);
    backdrop-filter: blur(18px) saturate(120%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    overflow: hidden;
    transition: display 0.4s allow-discrete, overlay 0.4s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-ip60bvcfu0 0.4s both;
}

#components-reconnect-modal[open][b-ip60bvcfu0] {
    animation: components-reconnect-modal-slideUp-b-ip60bvcfu0 1.2s cubic-bezier(0.05, 0.89, 0.25, 1.02),
               components-reconnect-modal-fadeInOpacity-b-ip60bvcfu0 0.4s ease-in-out;
    animation-fill-mode: both;
}

/* A fita de luz do topo dos painéis, para a caixa pertencer à mesma interface. */
#components-reconnect-modal[b-ip60bvcfu0]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(47, 168, 222, 0.15) 12%,
        rgba(252, 187, 85, 0.85) 46%,
        rgba(255, 255, 255, 0.95) 58%,
        rgba(47, 168, 222, 0.2) 82%,
        transparent 100%
    );
}

#components-reconnect-modal[b-ip60bvcfu0]::backdrop {
    background-color: rgba(3, 5, 8, 0.72);
    backdrop-filter: blur(3px);
    animation: components-reconnect-modal-fadeInOpacity-b-ip60bvcfu0 0.4s ease-in-out;
    opacity: 1;
}

.components-reconnect-container[b-ip60bvcfu0] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

#components-reconnect-modal p[b-ip60bvcfu0] {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #94a3b1;
}

/* A etiqueta monoespaçada herda o resto de .sup-etiqueta, do arquivo global. */
#components-reconnect-modal p.sup-etiqueta[b-ip60bvcfu0] {
    margin-top: -0.25rem;
}

#components-reconnect-modal .components-reconnect-first-attempt-visible[b-ip60bvcfu0],
#components-reconnect-modal .components-pause-visible[b-ip60bvcfu0] {
    color: #e8eef4;
}

#components-reconnect-modal .components-reconnect-failed-visible[b-ip60bvcfu0],
#components-reconnect-modal .components-resume-failed-visible[b-ip60bvcfu0] {
    color: #f4685f;
}

#components-reconnect-modal button[b-ip60bvcfu0] {
    margin-top: 0.35rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(47, 168, 222, 0.35);
    border-radius: 0.55rem;
    background: rgba(0, 94, 143, 0.55);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#components-reconnect-modal button:hover[b-ip60bvcfu0] {
    background: rgba(0, 94, 143, 0.85);
    border-color: rgba(252, 187, 85, 0.6);
}

#components-reconnect-modal button:active[b-ip60bvcfu0] {
    background: rgba(0, 94, 143, 0.45);
}

#components-reconnect-modal button:focus-visible[b-ip60bvcfu0] {
    outline: 2px solid #fcbb55;
    outline-offset: 2px;
}

/* --- Animação de espera: anéis saindo do centro, nas cores da marca. --- */
.components-rejoining-animation[b-ip60bvcfu0] {
    position: relative;
    width: 72px;
    height: 72px;
}

.components-rejoining-animation div[b-ip60bvcfu0] {
    position: absolute;
    border: 2px solid #2fa8de;
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation-b-ip60bvcfu0 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2)[b-ip60bvcfu0] {
    border-color: #fcbb55;
    animation-delay: -0.75s;
}

@keyframes components-rejoining-animation-b-ip60bvcfu0 {
    0%, 4.9% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0;
        left: 0;
        width: 72px;
        height: 72px;
        opacity: 0;
    }
}

@keyframes components-reconnect-modal-slideUp-b-ip60bvcfu0 {
    0% {
        transform: translateY(24px) scale(0.97);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-ip60bvcfu0 {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-ip60bvcfu0 {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Quem pediu menos movimento fica com a caixa parada e um anel estático. */
@media (prefers-reduced-motion: reduce) {
    #components-reconnect-modal[b-ip60bvcfu0],
    #components-reconnect-modal[open][b-ip60bvcfu0],
    #components-reconnect-modal[b-ip60bvcfu0]::backdrop,
    .components-rejoining-animation div[b-ip60bvcfu0] {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
    }

    #components-reconnect-modal[open][b-ip60bvcfu0] {
        opacity: 1;
    }
}
