/* =========================================
   ESTILOS GENERALES Y CONTENEDOR
   ========================================= */
.sorteos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}


/* =========================================
   SECCIÓN 1: LA MAQUINITA DE LA SUERTE
   ========================================= */
.maquinita-section {
    text-align: center;
    padding: 25px;
    background: #f8f9fa; /* Gris muy suave */
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.titulo-sorteo {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 700;
}

.subtitulo {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.maquinita-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#maquinita-cantidad {
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    background: #fff;
    cursor: pointer;
}

.btn-animate {
    background: #FF9800; /* Naranja Energético */
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-animate:hover {
    transform: translateY(-2px);
    background: #f57c00;
}

.btn-animate:active {
    transform: translateY(0);
}

/* =========================================
   SECCIÓN 2: ZONA DE NÚMEROS (BADGES)
   ========================================= */
#zona-tus-numeros {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 2px dashed #34495e;
    border-radius: 12px;
    animation: fadeIn 0.5s ease;
}

#zona-tus-numeros h3 {
    margin-top: 0;
    color: #34495e;
    font-size: 1.2rem;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.numero-badge {
    background: #34495e;
    color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 8px 18px;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid #2c3e50;
   /* transition: transform 0.2s; */
    cursor: pointer; 
    position: relative;
    transition: all 0.2s;
}

.numero-badge:hover {
    transform: scale(1.1);
    /*background: #e74c3c; /* Rojo al pasar el mouse */
    background: #c0392b !important; /* Fuerza el rojo */
    padding-right: 20px; /* Espacio para la X */
    border-color: #c0392b;
    cursor: default;
}

.numero-badge:hover::after {
    content: "";
    position: absolute;
    right: 5px;
    font-weight: bold;
}

/* Estilo para los campos bloqueados (Disabled) */
input:disabled, select:disabled, button:disabled {
    background-color: #f0f0f0 !important;
    color: #999 !important;
    cursor: not-allowed;
    border-color: #ddd !important;
}


/* =========================================
   SECCIÓN 3: PANEL RESUMEN (STICKY)
   ========================================= */
.sticky-panel {
    position: sticky;
    top: 10px;
    z-index: 100;
    background: #2c3e50; /* Azul Marino Oscuro */
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

.resumen-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-resumen {
    font-size: 1.1rem;
}

.info-resumen span {
    margin-right: 15px;
}

#btn-apartar {
    background: #27ae60; /* Verde Éxito */
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

#btn-apartar:hover {
    background: #219150;
}

#btn-apartar:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.8;
}

/* =========================================
   SECCIÓN 4: GRID (VENTANA INTERNA)
   ========================================= */
.grid-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 10px;
}

#buscador-numero {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
}

.btn-small {
    padding: 8px 15px;
    border: 1px solid #ced4da;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

/* --- GRID EMBEBIDO --- */
.grid-numeros {
    display: grid;
    /* Columnas automáticas (mínimo 45px para que quepan en móviles) */
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 6px;

    /* LA MAGIA: Altura Fija + Scroll */
    max-height: 450px; 
    overflow-y: auto; 
    
    /* Estética de la ventana */
    background: #ffffff;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

/* Estilo de la barra de desplazamiento (Scrollbar) */
.grid-numeros::-webkit-scrollbar {
    width: 10px;
}
.grid-numeros::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.grid-numeros::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}
.grid-numeros::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Botones Individuales */
.boleto-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 0;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    text-align: center;
    transition: all 0.1s;
}

.boleto-btn:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
}

.boleto-btn.seleccionado {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
    font-weight: bold;
    transform: scale(0.95);
}

.boleto-btn.ocupado {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

/* =========================================
   SECCIÓN 5: FORMULARIO CHECKOUT
   ========================================= */
.checkout-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    animation: slideIn 0.3s ease;
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.checkout-header h3 { margin: 0; color: #333; }

.btn-text {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.form-row {
    display: flex;
    gap: 15px;
}
.form-row .form-group { flex: 1; }

input[type="text"], 
input[type="tel"], 
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Grupo Teléfono */
.phone-input-group {
    display: flex;
    gap: 10px;
}
#cliente-lada {
    width: 130px;
    flex-shrink: 0;
}

/* Resumen Final */
.resumen-final-box {
    background: #eaf2f8;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 25px;
    border: 1px solid #d6eaf8;
}

.total-grande {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 800;
    margin: 5px 0 0 0;
}

/*.btn-full {
    width: 100%;
    font-size: 18px;
    padding: 15px;
} */


.btn-full {
    font-size: 1.5rem; /* 1.5rem suele equivaler a 24px */
    padding: 20px;     /* Aumenta el grosor general del bot髇 */
    width: 100%;       /* Si "btn-full" significa ancho completo, aseg鷕ate de mantener esto */
}

/* =========================================
   ANIMACIONES
   ========================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loader del GIF */
#maquinita-loader p {
    color: #666;
    margin-top: 10px;
    font-weight: bold;
}


/* --- CLASE PARA EL FILTRO DEL BUSCADOR --- */
.boleto-btn.oculto-por-filtro {
    display: none !important;
}

/* Forzar color rojo ocupado (por si algo lo sobreescribe) */
.boleto-btn.ocupado {
    background-color: #ffcdd2 !important;
    color: #c62828 !important;
    border-color: #ef9a9a !important;
    opacity: 0.7;
    cursor: not-allowed;
}


/* =========================================
   ESTILOS NUEVOS PARA BOTONES VERIFICADORES
   ========================================= */

/* Bot髇 Morado (Verificador de Boleto) */
.btn-purple {
    background: #8e44ad !important; /* Morado Wisteria */
    border-color: #8e44ad !important;
    color: white !important;
    box-shadow: 0 4px 0 #732d91; /* Efecto 3D sutil */
    transition: all 0.2s ease;
}

.btn-purple:hover {
    background: #9b59b6 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #732d91;
}

.btn-purple:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #732d91;
}

/* Ajuste para el bot髇 Naranja (Verificador Tel閒ono) */
/* Esto asegura que use los mismos estilos base que la maquinita */
.btn-animate.btn-full {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Espacio entre icono y texto */
}

/* Efecto Focus para accesibilidad y est閠ica */
input:focus {
    transform: scale(1.02);
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}


/* =========================================
   CORRECCI覰 PARA M覸ILES (Salto de l韓ea)
   ========================================= */
@media only screen and (max-width: 768px) {
    
    /* 1. Separar Nombre y Apellido (uno arriba del otro) */
    .form-row {
        display: flex;
        flex-direction: column !important; /* Fuerza el salto de l韓ea */
        gap: 0 !important; /* Quitamos el espacio lateral */
    }

    /* 2. Separar Lada y Tel閒ono */
    .phone-input-group {
        display: flex;
        flex-direction: column !important; /* Fuerza el salto de l韓ea */
    }

    /* 3. Que el selector de pa韘 ocupe todo el ancho */
    #cliente-lada {
        width: 100% !important;
        margin-bottom: 10px; /* Espacio para que no se pegue al tel閒ono */
    }

    /* 4. Ajustar m醨genes para que no se vean pegados los campos apilados */
    .form-group {
        margin-bottom: 15px;
    }
}


/* Hacer gigante SOLO el bot髇 de buscar */
.btn-solo-buscar {
    font-size: 24px !important;
    padding: 20px !important;
}
