/* =========================================================
   RESET TOTAL PARA TV / KIOSK ANDROID
========================================================= */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    /* Mantenemos overflow hidden para el BODY principal, pero el modal lo gestionaremos aparte */
    overflow: hidden !important; 
    background: #000;
    font-family: 'Inter', sans-serif;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.row > * {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--vz-gutter-x) * 0) !important;
    padding-left: calc(var(--vz-gutter-x) * 0) !important;
    margin-top: var(--vz-gutter-y);
}

.auth-page-wrapper,
.auth-page-content,
.card {
    width: 100vw;
    height: 100vh;
    height: var(--app-height, 100vh);
    margin: 0;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
}

/* =========================================================
   LAYOUT FORZADO (Ignora Bootstrap en Android)
========================================================= */
.tv-main-container {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    height: 100%;
}

.tv-left-panel {
    width: 60%; 
    height: 100%;
    background: #000;
    position: relative;
}

.tv-right-panel {
    width: 40%; 
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-two-bg {
    width: 100%;
    height: 100%;
    background-image: url("../../admin/assets/images/auth-two-bg.jpg");
    background-size: cover;
    background-position: center;
}

.tv-form-inner {
    width: 100%;
    max-width: 1000px;
    padding: 1rem;
}

/* =========================================================
   ESTILOS VISUALES
========================================================= */
.tv-logo { height: 80px; width: auto; margin-bottom: 20px; }
.tv-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.tv-text { font-size: 0.8rem; line-height: 1; }
.tv-text-sm { font-size: 0.8rem; }
.tv-text-xs { font-size: 0.8rem; }

/* =========================================================
   INPUTS (FIX PARA ANDROID NATIVO)
========================================================= */
.tv-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px; 
    margin: 10px 0px;
}

.tv-input {
    width: 40px;
    height: 60px;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    background-color: #f8f9fa !important; 
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    color: #000;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    outline: none;
    padding: 0;
    margin: 0;
}

.tv-input:focus {
    border-color: #198754 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.2) !important;
}

@media screen and (min-width: 1024px) {
    .tv-input { width: 50px; height: 60px; font-size: 28px; }
    .tv-logo { height: 100px; }
    .tv-title { font-size: 1.5rem; }
}

.tv-separator { font-size: 30px; font-weight: 900; color: #6c757d; text-align: center; }
.tv-btn { min-height: 45px; font-size: 1rem; font-weight: 700; }
.footer { position: absolute; bottom: 10px; width: 100%; z-index: 10; }

@media screen and (orientation: portrait) {
    .tv-main-container { flex-direction: column !important; }
    .tv-left-panel, .tv-right-panel { width: 100% !important; height: 50% !important; }
}



/* =========================================================
   MODAL DE SELECCIÓN (SWEETALERT2 CUSTOM TV GRID)
   DISEÑO VERTICAL PARA ANDROID TV
========================================================= */

/* 1. Ajustamos el contenedor principal de SweetAlert para TV */
.swal2-popup {
    width: 50vw !important;          /* Ancho optimizado para lista vertical */
    max-width: 600px !important;     /* Límite máximo */
    padding: 1.5em 0em !important;       /* Padding espacioso */
    background: #ffffff !important;
    border-radius: 16px !important;
}

/* 2. Título del Modal más grande */
.swal2-title {
    font-size: 1.5rem !important;
    color: #343a40 !important;
    margin-bottom: 5px !important;
}

/* 3. El Grid de Dispositivos - VERTICAL */
.tv-device-grid {
    display: grid !important;
    /* Forzamos una sola columna */
    grid-template-columns: 1fr !important; 
    gap: 10px !important;            /* Espacio entre tarjetas */
    padding: 15px !important;    /* Padding interno */
    max-height: 60vh !important;     /* Altura máxima antes de scroll */
    overflow-y: auto !important;     /* Permitir scroll vertical si hay muchos */
    width: 100% !important;
    
    /* Estilo del Scroll para que se vea en TV */
    scrollbar-width: thin;
    scrollbar-color: #0ab39c #f1f1f1;
}

/* 4. Tarjeta de Dispositivo (El Botón) - Ajuste Vertical */
.tv-device-card {
    background: #ffffff !important;
    border: 3px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 20px 15px !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    text-align: center;
    display: flex !important;
    flex-direction: row !important;  /* Alineamos icono y texto horizontalmente para aprovechar el ancho */
    justify-content: flex-start !important; /* Alineamos a la izquierda */
    align-items: center !important;
    min-height: 80px !important;     /* Altura reducida para lista */
    outline: none !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
}

/* 5. ESTADO FOCUS (CRUCIAL PARA CONTROL REMOTO) */
.tv-device-card:focus {
    border-color: #0ab39c !important;
    box-shadow: 0 0 0 6px rgba(10, 179, 156, 0.4), 0 10px 25px rgba(0,0,0,0.2) !important;
    transform: scale(1.02) !important; /* Zoom ligero */
    background-color: #f4fffd !important;
    z-index: 10;
}

/* 6. Iconos y Textos dentro de la tarjeta */
.tv-device-icon {
    font-size: 32px !important;
    color: #f25900 !important;
    margin-right: 10px !important; /* Espacio a la derecha del icono */
    margin-bottom: 0 !important;
    display: block !important;
}

.tv-device-card:focus .tv-device-icon {
    color: #0ab39c !important;
    transform: scale(1.1) !important;
}

.tv-device-name {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #343a40 !important;
    margin-bottom: 0 !important;
    text-align: left;
    flex-grow: 1;
}

.tv-device-status {
    font-size: 0.8rem !important;
    color: #adb5bd !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-align: right;
    margin-left: 5px;
    
}

/* 7. Botón de Cancelar dentro del Modal */
.tv-cancel-btn {
    margin-top: 10px !important;
    width: 100%;
    padding: 15px !important;
    border-radius: 10px !important;
    border: 2px solid transparent !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
}

.tv-cancel-btn:focus {
    background: #ff3d60 !important;
    color: white !important;
    border-color: #ff3d60 !important;
    outline: none !important;
    transform: scale(1.02) !important;
    box-shadow: 0 0 0 4px rgba(255, 61, 96, 0.4) !important;
}
.swal2-container .swal2-title {
    padding: 0px 0px 0 !important;
    font-size: 20px !important;
    font-weight: 800 !important;
}
div:where(.swal2-container) div:where(.swal2-html-container) {
    padding: 0px !important,
}



/* =========================================================
   DIFERENTES TIPOS DE MONITORES O DISPOSITIVOS
========================================================= */
@media screen and (max-width: 768px) {
    /* Se activa cuando la pantalla es igual o menor al tamaño indicado. */
    .auth-two-bg {
        width: 100%;
        height: 100%;
        background-image: url("../../admin/assets/images/auth-two-bg.jpg");
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
    }
    .tv-input {
        width: 40px;
        height: 40px;
        font-size: 24px;
        font-weight: 800;
        text-align: center;
        background-color: #f8f9fa !important;
        border: 2px solid #e9ecef !important;
        border-radius: 8px !important;
        color: #000;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        outline: none;
        padding: 0;
        margin: 0;
    }
    .tv-input-group {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        margin: 6px 0px;
    }
    .conect-title {
        font-size: 18px !important;
        display: none;
    }
    .logoimagen {
        height: 70px !important;
        margin-bottom: -7px;
    }
    .tv-btn {
        min-height: 40px;
        font-size: 1rem;
        font-weight: 700;
    }
    .mt-4 {
        margin-top: 0rem !important;
    }
    .footer {
        display: none;
    }
}

@media screen and (max-width: 1024px) { 
    /* Se usa para pantallas (computadoras, tablets, celulares). */
  
}

@media all and (max-width: 600px) {
  /* Aplica a todos los dispositivos (pantalla, impresión, etc.). */
}

@media screen and (orientation: landscape) {
/* Detecta la orientación del dispositivo.
  body {
    background: lightgreen;
  } */
}