/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-16cmy554ay],
.components-reconnect-repeated-attempt-visible[b-16cmy554ay],
.components-reconnect-failed-visible[b-16cmy554ay],
.components-pause-visible[b-16cmy554ay],
.components-resume-failed-visible[b-16cmy554ay],
.components-rejoining-animation[b-16cmy554ay] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-16cmy554ay],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-16cmy554ay],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-16cmy554ay],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-16cmy554ay],
#components-reconnect-modal.components-reconnect-retrying[b-16cmy554ay],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-16cmy554ay],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-16cmy554ay],
#components-reconnect-modal.components-reconnect-failed[b-16cmy554ay],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-16cmy554ay] {
    display: block;
}


/*
    Blazor NO quita «components-reconnect-show» al pasar a «components-reconnect-retrying»: le
    suma la segunda clase. Con la hoja de la plantilla eso enseña los dos mensajes encima uno del
    otro —«Reconectando…» y «No se pudo reconectar»—, que juntos se contradicen.

    Este selector tiene la misma especificidad que el de la plantilla y va después, así que gana:
    mientras se reintenta se queda sólo el mensaje del reintento, que es el que dice algo nuevo.
*/
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-first-attempt-visible[b-16cmy554ay] {
    display: none;
}

#components-reconnect-modal[b-16cmy554ay] {
    background-color: var(--si-paper, #fff);
    color: var(--si-ink, #1b2233);
    font-family: var(--si-font, system-ui, sans-serif);
    /* En un teléfono de 360 px, 20rem fijos se salen de la pantalla. */
    width: min(20rem, calc(100vw - 2.5rem));
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: var(--si-radius-lg, 20px);
    box-shadow: var(--si-shadow-lg, 0 3px 6px 2px rgba(0, 0, 0, 0.3));
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-16cmy554ay 0.5s both;
    &[open]

{
    animation: components-reconnect-modal-slideUp-b-16cmy554ay 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-16cmy554ay 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

}

#components-reconnect-modal[b-16cmy554ay]::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity-b-16cmy554ay 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-16cmy554ay {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-16cmy554ay {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-16cmy554ay {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-16cmy554ay] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-16cmy554ay] {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button[b-16cmy554ay] {
    border: 0;
    background-color: var(--si-navy, #16264f);
    color: #fff;
    /* Área de toque cómoda: este botón se usa con una mano y con prisa. */
    padding: .7rem 1.6rem;
    font: inherit;
    font-weight: 600;
    border-radius: var(--si-radius-pill, 999px);
    cursor: pointer;
}

    #components-reconnect-modal button:hover[b-16cmy554ay] {
        background-color: var(--si-navy-700, #223a72);
    }

    #components-reconnect-modal button:active[b-16cmy554ay] {
        transform: translateY(1px);
    }

.components-rejoining-animation[b-16cmy554ay] {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div[b-16cmy554ay] {
        position: absolute;
        border: 3px solid var(--si-blue, #4f5bd5);
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-16cmy554ay 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-16cmy554ay] {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation-b-16cmy554ay {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}
