﻿/* Base */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

html, body, input, button, select, textarea {
    font-family: 'Roboto', sans-serif;
}


/* Fondo fijo global (landscape por defecto) */
.background-image {
    position: fixed;
    inset: 0; /* top/right/bottom/left: 0 */
    width: 100%;
    height: 100vh; /* fallback */
    height: 100dvh; /* viewport dinámico en móvil */
    background-image: url('../images/fondoh.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Contenido por encima */
.main-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 20px;
}

/* 📱 Modo portrait: cambia solo la imagen */
@media (orientation: portrait) {
    .background-image {
        background-image: url('../images/fondov.png'); /* exporta tu PDF a PNG/JPG/WebP */
    }
}

/* (Opcional) Muy alta densidad de píxeles: usa versión 2x si la tienes */
@media (orientation: portrait) and (min-resolution: 2dppx) {
    .background-image {
        /* background-image: image-set(url('../Images/fondov.png') 1x, url('../Images/fondov@2x.png') 2x); */
    }
}

/* 🔳 Superposición clara para las páginas secundarias */
.light-bg .background-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.5); /* Blanco semitransparente */
    backdrop-filter: brightness(1.2); /* Aclara suavemente */
    z-index: -1;
}

/* Asegura que el contenedor del fondo permite la pseudo-capa */
.background-image {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}


.center-wrapper {
    display: flex;
    justify-content: center; /* Centra horizontalmente el bloque */
    align-items: center; /* Centra verticalmente */
    min-height: 100vh; /* Ocupa toda la altura de la ventana */
    text-align: left; /* Contenido interno alineado a la izquierda */
    color: #2e2e2e;
}

/* Cuadro translúcido principal */
.margenes {
    padding: 20px 25px;
    background-color: #ffffffcc; /* Blanco semitransparente */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0;
    min-width: 320px;
    max-width: 520px;
    width: 100%;
    box-sizing: border-box; /* Evita desbordes al usar padding */
}

/* 🔹 Versión adaptativa para móviles */
@media (max-width: 600px) {
    .margenes {
        width: 90%; /* Ocupa casi todo el ancho en móvil */
        padding: 15px 20px; /* Menos padding para pantallas pequeñas */
        border-radius: 10px; /* Ligeramente más compacto */
    }
}


/* Texto principal */
.title-text {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

/* Botón */
.btn-identificarse {
    font-size: 1.2rem;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background-color: #0078d7;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .btn-identificarse:hover {
        background-color: #005fa3;
    }

/* TextBox que combina con el botón Identificarse */
/* 🔹 Asegura que los fieldset gestionen bien el contenido interno */
fieldset {
    width: 100%; /* se adapta al contenedor padre (.margenes) */
    border: 2px solid #0078d7;
    border-radius: 10px;
    padding: 15px 20px 20px 20px;
    margin: 15px 0;
    background-color: #ffffffcc;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

    /* 🔹 Etiqueta del fieldset */
    fieldset legend {
        font-size: 1rem;
        font-weight: 600;
        color: #0078d7;
        padding: 0 8px;
    }

/* 🔹 TextBox adaptables dentro del fieldset */
.input-identificarse {
    width: 100%; /* ocupa todo el ancho disponible */
    box-sizing: border-box; /* incluye padding y borde en el cálculo total */
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    padding: 10px 12px;
    border: 2px solid #0078d7;
    border-radius: 8px;
    background-color: #ffffff;
    color: #222;
    transition: all 0.25s ease;
}

    /* 🔹 Estado de foco (cuando el usuario escribe) */
    .input-identificarse:focus {
        border-color: #005fa3;
        box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.25);
        outline: none;
    }

    /* 🔹 Placeholder más discreto */
    .input-identificarse::placeholder {
        color: #888;
        font-style: italic;
    }

/* 🔹 Adaptación a móviles */
@media (max-width: 600px) {
    fieldset {
        padding: 10px 15px;
    }
}


/* Estilo general para los fieldset */
fieldset {
    width: 400px; /* ancho fijo */
    border: 2px solid #0078d7; /* mismo azul que el botón */
    border-radius: 10px; /* bordes redondeados */
    padding: 5px 5px 5px 5px; /* espacio interno */
    margin: 15px 0; /* separación exterior */
    background-color: #ffffffcc; /* fondo blanco semitransparente */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

    /* Estilo de la leyenda (título del fieldset) */
    fieldset legend {
        font-size: 1rem;
        font-weight: 500;
        color: #2E2E2E;
        margin-left: 4px;
    }

    /* Opcional: efecto al pasar el ratón */
    fieldset:hover {
        border-color: #005fa3;
        box-shadow: 0 0 6px rgba(0, 95, 163, 0.3);
    }




/* Contenedor general del formulario */
.form-registro {
    background-color: #ffffffcc;
    border-radius: 12px;
    padding: 30px 40px;
    width: 340px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    /* Título */
    .form-registro h2 {
        text-align: center;
        color: #0078d7;
        font-weight: 500;
        margin-bottom: 25px;
    }

/* Cada fila del formulario */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

    /* Etiquetas */
    .form-group label {
        font-weight: 500;
        margin-bottom: 5px;
        color: #333;
    }

/* Alineación del botón */
.form-buttons {
    text-align: center;
    margin-top: 20px;
}

/* Adaptación móvil */
@media (max-width: 480px) {
    .form-registro {
        width: 90%;
        padding: 20px;
    }
}

/* 🔹 Contenedor específico del vídeo */
.video-container {
    text-align: center; /* Centra el título y el vídeo */
    max-width: 960px; /* Máximo ancho del vídeo */
    width: 100%;
}

/* 🔹 Vídeo adaptativo (responsive) */
.ivs-player {
    width: 100%; /* Ocupa todo el ancho del contenedor */
    height: auto; /* Mantiene proporción */
    aspect-ratio: 16 / 9; /* Fuerza proporción de vídeo */
    background: black; /* Fondo en caso de carga lenta */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 🔹 Ajuste para móviles */
@media (max-width: 600px) {
    .video-container {
        padding: 10px;
        max-width: 100%;
    }
}

/* Contenedor del vídeo ya usa .video-container con max-width:960px; */
/* El panel hereda el mismo ancho al estar dentro del mismo contenedor */

.ask-panel {
    margin-top: 14px;
    width: 100%;
}

.ask-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #2e2e2e;
}

.ask-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.ask-input {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    padding: 12px 14px;
    border: 2px solid #0078d7;
    border-radius: 10px;
    background: #fff;
    color: #222;
    transition: box-shadow .2s ease, border-color .2s ease;
}

    .ask-input:focus {
        outline: none;
        border-color: #005fa3;
        box-shadow: 0 0 0 3px rgba(0,120,215,.2);
    }

.ask-send {
    flex: 0 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: #0078d7;
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease, transform .05s ease-in;
}

    .ask-send:hover {
        background: #005fa3;
    }

    .ask-send:active {
        transform: scale(0.98);
    }

    .ask-send svg {
        fill: currentColor;
    }

.ask-hint {
    display: block;
    margin-top: 6px;
    color: #666;
}

/* Móvil */
@media (max-width: 600px) {
    .ask-row {
        gap: 6px;
    }

    .ask-send {
        flex-basis: 46px;
    }
}

/* 🔹 Estilo general de los mensajes de validación */
.validator {
    display: inline-block;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #c62828; /* rojo suave */
    background-color: #ffebeecc; /* fondo rosado translúcido */
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    padding: 4px 8px;
    margin-top: 4px;
    margin-bottom: 6px;
    animation: fadeIn 0.3s ease;
}

/* 🔹 Asterisco de campos requeridos */
.required {
    color: #c62828;
    font-weight: bold;
    margin-left: 3px;
}

/* 🔹 Para validadores de resumen (ValidationSummary) */
.validation-summary-errors {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px 0;
    font-family: 'Roboto', sans-serif;
}

/* 🔹 Animación de aparición */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.textbox-error {
    display: inline-block;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #c62828;
    background-color: #ffebeecc;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    padding: 4px 8px;
    margin-top: 4px;
    margin-bottom: 6px;
    animation: fadeIn 0.3s ease;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

    /* Cuando no hay texto, se oculta por completo */
    .textbox-error:empty {
        opacity: 0;
        visibility: hidden;
        padding: 0;
        border: none;
        margin: 0;
        background: none;
    }


.connected-users {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1em;
    color: #333;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.badge-online {
    background-color: #28a745;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

    .badge-online.updated {
        background-color: #218838;
    }


.mensaje-exito-titulo {
    font-family: 'Roboto', sans-serif;
    font-size: 1.4rem;
    color: #2e7d32; /* verde suave de confirmación */
    margin-bottom: 10px;
}

.mensaje-exito-texto {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-identificarse {
    background-color: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .btn-identificarse:hover {
        background-color: #1565c0;
    }




