/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* Shell layout is driven by MudBlazor; global error UI styles live in app.css. */
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
/* O aviso de conexão caída. Cada parágrafo só aparece no estado dele: quem põe a classe de estado
   no #components-reconnect-modal é o blazor.web.js (ver o comentário no .razor). As cores vêm das
   variáveis do MudBlazor, para o aviso seguir o tema claro ou escuro do painel. */

.components-reconnect-first-attempt-visible[b-00c86pnqb8],
.components-reconnect-repeated-attempt-visible[b-00c86pnqb8],
.components-reconnect-failed-visible[b-00c86pnqb8],
.components-pause-visible[b-00c86pnqb8],
.components-resume-failed-visible[b-00c86pnqb8],
.components-rejoining-animation[b-00c86pnqb8] {
    display: none;
}

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

/* "Tentando de novo" substitui o "Reconectando": os dois estados chegam juntos (show + retrying). */
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-first-attempt-visible[b-00c86pnqb8] {
    display: none;
}

#components-reconnect-modal[b-00c86pnqb8] {
    background-color: var(--mud-palette-surface, #fff);
    color: var(--mud-palette-text-primary, #1a1d29);
    width: min(20rem, calc(100vw - 2rem));
    box-sizing: border-box;
    margin: 20vh auto;
    padding: 2rem 1.5rem;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    font-family: var(--mud-typography-default-family, Roboto, sans-serif);
}

#components-reconnect-modal[open][b-00c86pnqb8] {
    animation: components-reconnect-modal-fadeIn-b-00c86pnqb8 0.3s ease-in-out both;
}

/* O showModal() foca o próprio <dialog>, e o navegador desenhava um contorno preto em volta do
   cartão. O foco visível que importa é o dos botões, que continua. */
#components-reconnect-modal:focus[b-00c86pnqb8] {
    outline: none;
}

#components-reconnect-modal[b-00c86pnqb8]::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
}

@keyframes components-reconnect-modal-fadeIn-b-00c86pnqb8 {
    0% {
        opacity: 0;
        transform: translateY(16px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#components-reconnect-modal p[b-00c86pnqb8] {
    margin: 0;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* 44 px de altura: é botão de celular antes de tudo. */
#components-reconnect-modal button[b-00c86pnqb8] {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 24px;
    background-color: var(--mud-palette-primary, #4f7cff);
    color: var(--mud-palette-primary-text, #fff);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

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

.components-rejoining-animation[b-00c86pnqb8] {
    position: relative;
    width: 80px;
    height: 80px;
}

.components-rejoining-animation div[b-00c86pnqb8] {
    position: absolute;
    border: 3px solid var(--mud-palette-primary, #4f7cff);
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation-b-00c86pnqb8 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2)[b-00c86pnqb8] {
    animation-delay: -0.5s;
}

@keyframes components-rejoining-animation-b-00c86pnqb8 {
    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: 0;
        left: 0;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}
