﻿/* =========================================
   RESET Y VARIABLES
   ========================================= */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #10b981;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text-main: #1e293b;
    --text-sec: #455160;
    --border: #e2e8f0;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --area-header: rgba(37, 99, 235, 0.08);
    --alert: #ff4757;
    --keyboard: rgba(0,0,0,0.03);
}

.dark-mode {
    --bg: #0f172a;
    --card: #1e293b;
    --text-main: #f8fafc;
    --text-sec: #94a3b8;
    --border: #334155;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --keyboard: rgba(255,255,255,0.1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: sans-serif !important;
    background-color: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

body {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

    body.branding-ready {
        opacity: 1;
    }


.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg, #ffffff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre el texto y el switch */
}

/* Estilos para el banner de estado */
#status-alert {
    font-size: 11px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.alert-off {
    background-color: #ff4757;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.alert-on {
    background-color: #2ed573;
    color: white;
    box-shadow: 0 4px 10px rgba(46, 213, 115, 0.3);
}

/* 2. Estilos del Switch (Corregidos) */
.theme-switch {
    display: inline-block;
    height: 30px;
    position: relative;
    width: 60px; /* Un poco más ancho para los iconos */
}

    .theme-switch input {
        display: none;
    }

.slider {
    background-color: #333; /* Fondo por defecto (oscuro) */
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

    /* Círculo blanco que se mueve */
    .slider:before {
        background-color: white;
        bottom: 3px;
        content: "";
        height: 24px;
        left: 3px;
        position: absolute;
        transition: .4s;
        width: 24px;
        border-radius: 50%;
        z-index: 2;
    }

    /* Iconos de Sol y Luna */
    .slider .icon {
        font-size: 14px;
        z-index: 1;
        user-select: none;
    }

.kiosk-column {
    max-width: 600px; /* El ancho del teclado y los inputs coincidirá aquí */
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}


/* =========================================
   LAYOUT Y CONTENEDORES
   ========================================= */
.brand-header {
    text-align: center;
    padding: 20px 10px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.brand-logo {
    height: 80px;
    max-width: 200px;
    object-fit: contain;
    margin-bottom: 8px;
}

.brand-nombre {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kiosk-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================
   STEPPER (PROGRESO)
   ========================================= */
.stepper-container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinea los círculos arriba para que las etiquetas no muevan la línea */
    margin: 10px auto 10px;
    max-width: 600px;
    padding: 0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1; /* Distribuye espacio equitativo */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* El círculo del número */
.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-sec);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

/* Estado Activo: Resalta el paso actual */
.step-indicator.active .step-number {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
    background: var(--card);
}

/* Estado Completado: Verde y con Check */
.step-indicator.completed .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Etiquetas de texto debajo del círculo */
.step-label {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.step-indicator.active .step-label {
    color: var(--primary);
}

.step-indicator.completed .step-label {
    color: var(--accent);
}

.step-line {
    flex: 0 1 100px; /* Tamaño de la conexión */
    height: 4px;
    background: var(--border); /* Fondo gris (no completado) */
    margin: 0 10px;
    margin-bottom: 25px; /* Alineación con el centro de los círculos */
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

    /* El relleno de la línea */
    .step-line::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 0%; /* Empieza vacía */
        background: var(--accent); /* Color verde éxito */
        transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Clase para activar el llenado */
    .step-line.filled::after {
        width: 100%;
    }

/* Ajuste de alineación para el contenedor del stepper */
.stepper-container {
    display: flex;
    justify-content: center;
    align-items: center; /* Asegura que círculos y líneas compartan el eje central */
    margin-bottom: 50px;
}


.step-indicator .check {
    display: none !important;
}

/* 2. Cuando está completado, ocultar el número y mostrar el check */
.step-indicator.completed .num {
    display: none !important;
}

.step-indicator.completed .check {
    display: block !important; /* O flex si usas centrado */
}

/* 3. Asegurar que en estado activo solo se vea el número */
.step-indicator.active .num {
    display: block;
}

.step-indicator.active .check {
    display: none;
}

/* Estado de error: Rojo vibrante */
.error-field {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Estado de éxito: Verde esmeralda */
.success-field {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.05) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* El prefijo +58 se ve diferente para que parezca fijo */
.prefix {
    color: var(--text-sec);
    font-weight: 800;
    font-size: 1.6rem;
    margin-right: 8px;
    opacity: 0.7;
}

/* =========================================
   SECCIONES (PASOS)
   ========================================= */
.step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

    .step.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

/* =========================================
   GRID DE AREAS (PASO 1)
   ========================================= */
.area-selection-header {
    background: var(--area-header);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid var(--primary);
    text-align: left;
}

    .area-selection-header .subtitle {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--primary);
        display: block;
        margin-bottom: 4px;
    }

.area-title-selected {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.grid-areas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding: 10px 5px;
}

.area-card {
    background: var(--card);
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    /* Sombras multicapa para efecto premium */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    /* Efecto de brillo sutil al pasar el mouse */
    .area-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.2), transparent );
        transition: 0.5s;
    }

    .area-card:hover::before {
        left: 100%;
    }

    /* Hover: Elevación y cambio de color */
    .area-card:hover {
        transform: translateY(-10px);
        border-color: var(--primary);
        box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.1), 0 10px 10px -5px rgba(37, 99, 235, 0.04);
    }

    /* Cuando la tarjeta está seleccionada (opcional para JS) */
    .area-card.selected {
        border-color: var(--primary);
        background: rgba(37, 99, 235, 0.02);
        box-shadow: inset 0 0 0 2px var(--primary);
    }

.area-img {
    width: 85px;
    height: 85px;
    margin-bottom: 20px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.area-card:hover .area-img {
    transform: scale(1.1) rotate(3deg);
}

.area-name {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

/* Indicador de "Click para seleccionar" que aparece al hover */
.area-card::after {
    content: 'SELECCIONAR';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
}

.area-card:hover::after {
    bottom: 15px;
    opacity: 1;
}

#lista-areas .area-card {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}


    #lista-areas .area-card.show {
        opacity: 1;
        transform: translateY(0);
    }

.area-card.area-bloqueada {
    opacity: 0.7;
    filter: grayscale(0.5);
    border: 2px dashed var(--accent);
}

.badge-activo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.form-control-native {
    display: block !important;
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    outline: none;
    padding: 0;
    margin-top: 5px;
}

/* Si el input nativo está presente, ocultamos el display-text manual 
   para que no se duplique la información */
.input-container:has(.form-control-native) .display-text {
    display: none;
}

/* Ajuste del placeholder nativo para que combine con tu diseño */
.form-control-native::placeholder {
    color: var(--text-sec);
    opacity: 0.4;
    font-weight: 500;
}

/* =========================================
   FORMULARIO Y ENTRADA (PASO 2)
   ========================================= */
.kiosk-form {
    background: var(--card);
    padding: 30px;
    border-radius: 25px;
    box-shadow: var(--shadow);
}

.input-container {
    background: var(--glass);
    padding: 1rem 1.5rem;
    border-radius: 1.2rem;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
    text-align: left;
}

    .input-container label {
        font-size: 0.75rem;
        color: #94a3b8;
        font-weight: 600;
        margin-bottom: 5px;
        display: block;
    }

    .input-container.focused {
        border-color: var(--accent);
        background: rgba(16, 185, 129, 0.1);
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    }

    .input-container.error {
        border-color: #ef4444;
        animation: shake 0.4s ease-in-out;
    }

.display-text {
    min-height: 1.8rem;
    font-size: 1.6rem;
    color: var(--accent);
    font-weight: 800;
}

.focused .display-text::after {
    content: "|";
    color: white;
    animation: blink 1s infinite;
}

.hidden-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 5;
    pointer-events: auto;
}

/* Toggle Buttons SMS */
.notification-opt-in {
    text-align: center;
    margin: 25px 0;
}

.toggle-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.btn-toggle {
    padding: 12px 25px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: var(--card);
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
}

    .btn-toggle.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

.abandon-alert {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--alert); /* Rojo vibrante para llamar la atención */
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(255, 71, 87, 0.4);
    z-index: 1000;
    display: none; /* Se controla por JS */
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: translateX(-50%) scale(0.7);
        opacity: 0;
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

.main-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================
   TECLADO VIRTUAL
   ========================================= */
#keyboard-manager {
    width: 100%;
    background: var(--keyboard);
    padding: 15px;
    border-radius: 15px;
}

/* Filas del teclado */
.kb-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

    .kb-row button {
        height: 55px;
        min-width: 45px;
        padding: 0 15px;
        border-radius: 8px;
        border: none;
        background: var(--card);
        color: var(--text-main);
        font-size: 1.2rem;
        font-weight: 700;
        box-shadow: 0 3px 0 var(--border);
        cursor: pointer;
    }

        .kb-row button:active {
            transform: translateY(2px);
            box-shadow: none;
        }

.numeric-layout {
    max-width: 400px;
    margin: 0 auto;
}

    .numeric-layout .kb-row {
        justify-content: center;
    }

    .numeric-layout .kb-key {
        width: 100px; /* Botones más grandes y cómodos */
        height: 80px;
        font-size: 1.8rem;
        flex: 0 1 100px; /* Evita que crezcan demasiado */
    }

.btn-clear-all {
    font-size: 0.9rem !important;
    background-color: #f8d7da !important; /* Rojo pálido */
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
}
/* =========================================
   BOTON ACCION PRINCIPAL
   ========================================= */
.actions-container {
    display: flex;
    gap: 15px; /* Espacio entre botones */
    margin-top: 20px;
    width: 100%; /* Asegura que use todo el ancho disponible */
    box-sizing: border-box;
}

.btn-main-action {
    flex: 2; /* El botón de confirmar es más grande */
    background: var(--accent);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
}

    .btn-main-action:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-secondary-action {
    flex: 1; /* El botón de cancelar es más pequeño */
    background: transparent;
    color: #666;
    border: 2px solid #ccc;
    padding: 15px;
    border-radius: 15px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 20px;
}

.kb-key {
    flex: 1; /* Esto hace que las teclas se repartan el ancho equitativamente */
    height: 65px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    /* ... tus otros estilos de botón ... */
}

/* El botón de generar turno debe ser igual de ancho que el teclado */
#btn-submit {
    width: 100%;
    height: 80px;
    font-size: 1.5rem;
    margin-top: 20px;
}

/* Contenedor de inputs más delgado */
.input-container-compact {
    padding: 10px 15px; /* Reducido de 20px */
    margin-bottom: 10px;
    height: 50px; /* Altura fija para evitar saltos */
}

/* Filas de teclado con menos separación */
.kb-row-compact {
    display: flex;
    justify-content: center;
    gap: 5px; /* Espacio mínimo */
    margin-bottom: 5px;
}

.kb-key-flash {
    background-color: var(--accent) !important; /* Color de destello (puedes ajustarlo) */
    color: white !important;
    transform: scale(0.92); /* Pequeño hundimiento */
    box-shadow: 0 5px 15px var(--accent), 0 10px 30px var(--accent-light);
    transition: all 0.1s ease;
}

/* Teclas más bajas pero anchas */
.kb-key-compact {
    flex: 1;
    height: 55px; /* Reducido de 70px-80px */
    font-size: 1.1rem;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

/* El Pad numérico no debe ser tan alto */
.numeric-layout-compact {
    max-width: 350px; /* Más estrecho */
    margin: 0 auto;
}

    .numeric-layout-compact .kb-key-compact {
        height: 60px; /* Equilibrio para el pad numérico */
    }

.btn-spacebar {
    background-color: #f0f0f0; /* Un gris claro para diferenciarlo de las letras */
    flex: 2 !important; /* Hacerlo un poco más ancho si el layout lo permite */
    font-weight: bold;
    color: #555;
}

.consulta-container {
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.btn-consulta {
    /* Usamos el azul primario del tema */
    background-color: var(--primary);
    /* Texto en blanco para contraste alto sobre el azul */
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid var(--primary-dark);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 90%;
    margin: 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow);
    animation: pulse-soft 2s infinite;
}

/* Efecto al pasar el mouse (PC) */
@media (hover: hover) {
    .btn-consulta:hover {
        background-color: var(--primary-dark);
        transform: translateY(-1px);
    }
}

/* Efecto al presionar (Móvil/Touch) */
.btn-consulta:active {
    background-color: var(--primary-dark);
    transform: scale(0.96);
    filter: brightness(0.9);
}

.dark-mode .btn-consulta {
    border-color: var(--border);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.2); /* Resplandor azul sutil */
}

@keyframes pulse-soft {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* En /* En modo oscuro usamos el color de acento o un resplandor más suave */
.dark-mode .btn-consulta {
    animation: pulse-soft-dark 2s infinite;
}

@keyframes pulse-soft-dark {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}



input:checked + .slider {
    background-color: var(--azul-vibrante);
}

    input:checked + .slider:before {
        transform: translateX(24px);
    }

/* =========================================
   CONTENEDOR DE LA IMPRESORA (LA RANURA)
   ========================================= */
.printer-slot {
    width: 350px;
    height: 550px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    /* La ranura negra física */
    border-bottom: 22px solid #1a1a1a;
    background: transparent;
}

    /* El LED de la impresora */
    .printer-slot::before {
        content: '';
        position: absolute;
        bottom: 10px;
        right: 0;
        width: 12px;
        height: 12px;
        background: #333; /* Apagado inicialmente */
        border-radius: 50%;
        z-index: 10;
        transition: background 0.3s;
    }

    /* Estado del LED cuando está imprimiendo */
    .printer-slot.printing::before {
        background: #00ff00;
        box-shadow: 0 0 8px #00ff00;
        animation: ledBlink 0.5s infinite alternate;
    }

@keyframes ledBlink {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.4;
    }
}

/* =========================================
   EL TICKET (PAPEL TÉRMICO)
   ========================================= */
.thermal-paper {
    background: #ffffff;
    background-image: radial-gradient(#f0f0f0 1px, transparent 0); /* Textura de papel */
    background-size: 4px 4px;
    width: 300px;
    margin: 0 auto;
    position: absolute;
    left: 25px;
    /* Posición inicial: totalmente escondido debajo de la ranura */
    bottom: -560px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    transition: none;
}



/* =========================================
   BORDES TROQUELADOS (ZIGZAG)
   ========================================= */
.cut-edge-top, .cut-edge-bottom {
    width: 100%;
    height: 15px;
    background-color: #ffffff;
    background-size: 15px 15px;
    position: absolute;
    left: 0;
    z-index: 2;
}

.cut-edge-top {
    top: -14px;
    background-image: linear-gradient(45deg, transparent 33.333%, #ffffff 33.333%, #ffffff 66.666%, transparent 66.666%), linear-gradient(-45deg, transparent 33.333%, #ffffff 33.333%, #ffffff 66.666%, transparent 66.666%);
}

.cut-edge-bottom {
    bottom: -14px;
    background-image: linear-gradient(135deg, transparent 33.333%, #ffffff 33.333%, #ffffff 66.666%, transparent 66.666%), linear-gradient(-135deg, transparent 33.333%, #ffffff 33.333%, #ffffff 66.666%, transparent 66.666%);
}

/* =========================================
   CONTENIDO INTERNO DEL TICKET
   ========================================= */
.ticket-inner {
    padding: 5px 5px;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    color: #000;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 4rem;
    font-weight: bold;
    color: rgba(0,0,0,0.02); /* Casi invisible */
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

.ticket-header {
    margin-bottom: 4px;
    z-index: 1;
    position: relative;
    line-height: 1;
}

#ticket-area-name {
    color: var(--primary);
    margin: 0;
    padding: 0;
}

#display-ticket-number {
    color: var();
}

.store-name {
    font-size: 0.9rem;
    font-weight: bold;
    margin: 5px 0;
    line-height: 1;
}

.dashed-line {
    border: none;
    border-top: 2px dashed #444;
    margin: 15px 0;
}

.ticket-main {
    padding: 10px 0;
    z-index: 1;
    position: relative;
    line-height: 0.8;
}

.ticket-code {
    font-size: 4rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -2px;
    line-height: 1;
}

.qr-box {
    display: inline-block;
    padding: 5px;
    background: #fff;
    margin: 5px 0;
}

.timestamp {
    font-size: 0.8rem;
    color: #555;
    margin: 5px 0;
}

.thanks-msg {
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 5px;
    line-height: 1.2;
}

/* =========================================
   ANIMACIÓN DE IMPRESIÓN (MECÁNICA LENTA)
   ========================================= */
.print-animation {
    /* Cambiamos cubic-bezier por linear o ease-out para evitar el rebote */
    animation: thermalPrint 1.8s cubic-bezier(0.1, 0.5, 0.5, 1) forwards;
}

@keyframes thermalPrint {
    0% {
        /* Empieza exactamente donde termina la ranura */
        bottom: -550px;
    }

    100% {
        /* Termina arriba sin retroceder */
        bottom: 20px;
    }
}

/* Aviso de éxito debajo de la impresora */
.success-notice {
    text-align: center;
    margin-top: 30px;
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.2rem;
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
    .grid-areas {
        grid-template-columns: 1fr 1fr;
        padding-bottom: 10px;
    }

    .kb-row button {
        height: 45px;
        min-width: 35px;
        font-size: 1rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-line {
        flex: 0 0 40px;
        margin-top: 20px;
    }

    .step-label {
        font-size: 0.7rem;
    }
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 480px) {
    .grid-areas {
        grid-template-columns: 1fr; /* Una columna para mejor usabilidad en kioscos pequeños */
        gap: 10px;
        padding-bottom: 10px;
    }

    .area-name {
        font-size: 0.9rem;
    }

    .area-card {
        padding: 10px 10px;
        display: flex;
        align-items: center;
        text-align: left;
    }

        .area-card:hover {
            transform: translateY(-2px);
            border-color: var(--primary);
            box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.1), 0 10px 10px -5px rgba(37, 99, 235, 0.04);
        }

    .area-img {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
        margin-right: 20px;
    }

    .area-card:hover::after {
        display: none;
    }

    .step-title {
        font-size: 1rem;
    }

    .input-container {
        font-size: 0.9rem;
    }

        .input-container label {
            font-size: 0.75rem;
        }

    #btn-text {
        font-size: 0.8rem;
    }

    .btn-main-action {
        line-height: 0.5;
    }

    .btn-secondary-action {
        font-size: 0.8rem;
    }

    .area-title-selected {
        font-size: 1rem;
    }

    .placeholder-text {
        font-size: 1rem;
    }

    .input-container {
        padding: 5px 25px;
    }

    .display-text {
        font-size: 1rem;
        padding: 0;
        margin: 0;
    }

    .kiosk-form {
        padding: 15px 20px;
    }
}

/* Ajustes para que SweetAlert use tus fuentes y estilos */
.swal-popup-custom {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    border: 2px solid var(--primary) !important; /* Borde del color de la marca */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.swal-title-custom {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    font-size: 2.2rem !important;
    letter-spacing: -1px;
}

/* Efecto de pulso suave para el icono del modal */
.swal-popup-custom div[style*="font-size: 70px"] {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}


@media print {
    /* Ocultar todo el sitio web */
    body * {
        visibility: hidden;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Mostrar solo el contenedor del ticket y sus hijos */
    #ticket-anim, #ticket-anim * {
        visibility: visible;
    }

    /* Posicionar el ticket en la esquina superior izquierda para la impresora */
    #ticket-anim {
        margin-top: 0 !important;
        padding-top: 0 !important;
        top: 0 !important;
        position: relative;
        box-shadow: none !important; /* Quitar sombras en papel */

    }

    /* Configuración de la página (ancho térmico estándar) */
    @page {
        size: 80mm auto; /* Ajusta a 58mm si tu impresora es pequeña */
        margin: 0;
    }

    /* Ocultar botones de la alerta SweetAlert durante la impresión */
    .swal2-container, .navbar, .btn-test-alert, .theme-switch-wrapper {
        display: none !important;
    }
}


#ticket-anim {
    background: white !important;
    color: black !important;
    border: 1px dashed #ccc; /* Guía de corte visual */
    padding: 20px;
    font-family: 'Courier New', Courier, monospace; /* Fuente tipo ticket */
}

    #ticket-anim .text2-number {
        font-size: 3rem;
        font-weight: bold;
        text-align: center;
    }
