/* Base */
body {
    margin: 0;
    background: url('/images/bg.png') no-repeat center center fixed;
    background-size: cover;
    font-family: "Inter", "Segoe UI", sans-serif;
}

/* ================================================================
   FORZAR DIRECCIÓN LTR (IZQUIERDA A DERECHA) EN INPUTS Y MÁSCARAS
   ================================================================ */
input,
textarea,
.mud-input-slot,
.mud-input-control input,
.mud-input-root,
.mud-input-root-outlined {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate !important;
}

.login-link.mud-link {
    color: #0F4C45 !important;
}

    .login-link.mud-link:hover {
        text-decoration: underline;
    }

/* ================================================================
   BLAZOR RECONNECT MODAL 
   ================================================================ */
#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    overflow: hidden;
    background-color: #fff;
    opacity: 0.9;
    text-align: center;
    font-weight: bold;
    border: none;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
}

    #components-reconnect-modal.components-reconnect-show,
    #components-reconnect-modal[open],
    #components-reconnect-modal.components-reconnect-failed {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible {
    display: none;
}

dialog[open].components-reconnect-show .components-reconnect-first-attempt-visible {
    display: block;
}

dialog[open].components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

dialog[open].components-reconnect-failed #components-reconnect-button {
    display: block;
}

dialog[open].components-reconnect-repeated-attempt .components-reconnect-repeated-attempt-visible {
    display: block;
}

dialog[open].components-pause .components-pause-visible {
    display: block;
}

dialog[open].components-pause #components-resume-button,
dialog[open].components-resume-failed #components-resume-button {
    display: block;
}

dialog[open].components-resume-failed .components-resume-failed-visible {
    display: block;
}

.components-rejoining-animation {
    display: flex;
    gap: 8px;
}

    .components-rejoining-animation div {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: var(--mud-palette-primary, #594AE2);
        animation: rejoining-bounce 1.4s infinite ease-in-out both;
    }

        .components-rejoining-animation div:nth-child(1) {
            animation-delay: -0.32s;
        }

        .components-rejoining-animation div:nth-child(2) {
            animation-delay: -0.16s;
        }

@keyframes rejoining-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

#components-reconnect-button,
#components-resume-button {
    display: none;
    cursor: pointer;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: var(--mud-palette-primary, #594AE2);
    color: #fff;
    font-size: 14px;
}
/* Estructura para el Modal de Reconexión de Blazor con tu diseño */
#components-reconnect-modal.modal-reconexion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro igual a DarkBackground */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* Oculta la pantalla cuando la conexión está activa */
#components-reconnect-modal.components-reconnect-hide {
    display: none !important;
}

/* Contenedor relativo de 15vmin */
.modal-reconexion-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15vmin;
    height: 15vmin;
}

/* Círculo giratorio nativo idéntico al de MudProgressCircular */
.spinner-custom {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(7, 67, 68, 0.2);
    border-top: 3px solid #074344;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Logo centrado al 50% */
.logo-custom {
    position: absolute;
    width: 50%;
    height: 50%;
    object-fit: contain;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}