/* Estilos generales */
.mesa {
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.mesa:hover {
    transform: scale(1.05);
    z-index: 20;
}

.mesa-ocupada {
    background-color: #ef4444;
    color: white;
}

.mesa-libre {
    background-color: #10b981;
    color: white;
}

.mesa-combinada {
    border: 2px dashed #f59e0b !important;
}

.mesa.square {
    border-radius: 2px;
}

.mesa.round {
    border-radius: 50%;
}

.gradient-header {
    background: linear-gradient(90deg, #2563eb, #4338ca);
}

.gradient-green {
    background: linear-gradient(90deg, #059669, #047857);
}

/* Estilos para el plano del salÃ³n en simulaciÃ³n */
#plano-salon {
    position: relative;
    height: 400px;
    background-color: #f8f9fa;
    background-image: 
        linear-gradient(rgba(207, 207, 207, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(207, 207, 207, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden; /* Cambiado de 'auto' a 'hidden' para eliminar scrollbars */
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
}

/* Contenedor de salÃ³n con auto-escalado */
.salon-container {
    position: relative;
    height: 100%;
    width: 100%;
}

/* Estilos para las mesas en simulaciÃ³n */
#plano-salon .mesa {
    position: absolute;
    z-index: 10;
    cursor: default;
}

#plano-salon .mesa:hover {
    z-index: 100;
}

#plano-salon .mesa.mesa-ocupada {
    cursor: pointer;
}

/* Selector de salÃ³n en simulaciÃ³n */
.salon-selector-container {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.salon-selector-container label {
    font-weight: 600;
    color: #4b5563;
}

.salon-selector-container select {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: white;
    min-width: 200px;
}

/* Animaciones y transiciones */
.hover-scale {
    transition: transform 0.2s;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* DiseÃ±o responsivo */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #plano-salon {
        height: 300px;
    }
}

/* =================================
   MEJORAS PARA MODALES (SOLO CUANDO ESTÃN ABIERTOS)
   ================================= */

/* Centrar modales cuando tienen la clase 'flex' */
.fixed.inset-0.bg-black.bg-opacity-50.flex {
    align-items: center;
    justify-content: center;
}

/* Hacer el modal de prioridades mÃ¡s grande */
#modal-prioridades .max-w-4xl {
    max-width: 1000px !important;
}

/* Limitar altura del modal de prioridades y agregar scroll */
#modal-prioridades > div > div {
    max-height: 90vh !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* El cuerpo del modal debe tener scroll */
#modal-prioridades .overflow-y-auto {
    max-height: 60vh !important;
    overflow-y: auto !important;
    flex: 1;
}

/* La lista de prioridades con scroll interno */
#lista-prioridades {
    max-height: 400px !important;
    overflow-y: auto !important;
    min-height: 200px;
}

/* Mejorar el estilo del scroll */
#lista-prioridades::-webkit-scrollbar {
    width: 8px;
}

#lista-prioridades::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#lista-prioridades::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#lista-prioridades::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive para mÃ³viles */
@media (max-width: 768px) {
    #modal-prioridades .max-w-4xl {
        max-width: 95vw !important;
        margin: 1rem;
    }
    
    #modal-prioridades .overflow-y-auto {
        max-height: 50vh !important;
    }
    
    #lista-prioridades {
        max-height: 300px !important;
    }
}