/* --- CONTENEDOR PRINCIPAL --- */
.manya-reserva-container {
    background: #001f3f;
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- GRID PARA +200 STANDS --- */
.manya-grid {
    display: grid;
    /* auto-fill permite que entren tantos stands como quepan en el ancho */
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); 
    gap: 10px;
    margin-top: 25px;
    max-height: 600px; /* Evita que la página sea infinita si hay demasiados */
    overflow-y: auto;  /* Scroll interno si sobran stands */
    padding: 10px;
}

/* --- ESTILO DE CADA STAND (BUTACA) --- */
.stand-box {
    padding: 12px 2px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.stand-box strong {
    display: block;
    font-size: 1.1em;
}


/* VERDE: Totalmente libre para clickear */
.disponible {
    background: #2ecc71;
    color: white;
    cursor: pointer;
}
.disponible:hover {
    background: #27ae60;
    transform: scale(1.1);
    border-color: #FFD700;
}

/* NARANJA: Alguien ya mandó sus datos pero no ha pagado */
.reservado {
    background: #f39c12; /* Naranja fuerte */
    color: white;
    cursor: not-allowed;
    border: 1px inset rgba(255,255,255,0.3);
}

/* ROJO: Confirmado y pagado. Espacio cerrado */
.vendido {
    background: #e74c3c; /* Rojo pasión */
    color: white;
    opacity: 0.8;
    cursor: not-allowed;
}

/* Estilo general de las etiquetas pequeñas bajo el número de stand */
.stand-box span {
    display: block;
    font-size: 0.65em;
    text-transform: uppercase;
    margin-top: 2px;
    font-weight: bold;
}

/* --- MODAL (VENTANA EMERGENTE) --- */
.manya-modal {
    display: none; /* Se activa por JS */
    position: fixed;
    z-index: 99999; /* Por encima de todo */
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
}

.manya-modal-content {
    background-color: #ffffff;
    color: #333 !important; /* Texto oscuro para legibilidad */
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0,0.8);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover { color: #333; }

/* --- FORMULARIO DENTRO DEL MODAL --- */
.manya-form-modal {
    text-align: left;
    margin-top: 20px;
}

.manya-form-modal label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #001f3f; /* Azul oscuro para los títulos de los campos */
    font-size: 0.95em;
}

.manya-form-modal input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    color: #333; /* Texto que escriben será negro */
    background: #fff;
}

.manya-info-reserva {
    background: #f0f4f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 5px solid #FF4500;
}

.manya-info-reserva p {
    margin: 5px 0;
    font-size: 1em;
}

.btn-reserva {
    background: #FF4500;
    color: white;
    padding: 15px;
    border: none;
    width: 100%;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-reserva:hover {
    background: #e03e00;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}