/* File: assets/css/style.css */

/* --- Estilos Generales --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

.main-container {
    padding-bottom: 100px;
}

.main-title {
    font-weight: 700;
    color: #0d6efd;
}

/* --- Contenedor de Controles --- */
.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 10px;
    z-index: 1020;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid #dee2e6;
}

.progress-container { flex-grow: 1; }
.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* --- Cuadrícula de Números --- */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    min-height: 300px;
}
.spinner-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.number-box {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    user-select: none;
}
.number-box.available {
    background-color: #e9f5e9;
    color: #28a745;
    border-color: #c8e6c9;
}
.number-box.available:hover {
    background-color: #d4edda;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.number-box.selected {
    background-color: #0d6efd;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
    border-color: #0b5ed7;
}
.number-box.reserved, .number-box.sold {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- Botón Flotante de Acción --- */
.floating-action-button-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    z-index: 1030;
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    transform: translate(-50%, 100px);
    pointer-events: none;
}
.floating-action-button-container.visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

/* --- CAMBIO: Paginación por Rangos Deslizable --- */
.range-pagination-container {
    position: relative;
    display: flex;
    align-items: center;
}

.range-pagination {
    display: flex;
    flex-wrap: nowrap; /* Evita que los botones salten a la siguiente línea */
    gap: 0.5rem;
    overflow-x: auto; /* Activa el scroll horizontal */
    padding: 10px 0;
    scroll-behavior: smooth; /* Desplazamiento suave con las flechas */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.range-pagination::-webkit-scrollbar {
    display: none;
}

.range-btn {
    font-weight: 600;
    flex-shrink: 0; /* Evita que los botones se encojan */
}

.range-btn.active {
    background-color: #0d6efd;
    color: white;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: none; /* Oculto por defecto, se muestra con JS */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.scroll-btn.left {
    left: -20px;
}
.scroll-btn.right {
    right: -20px;
}
.range-pagination-container::before,
.range-pagination-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 1;
    pointer-events: none;
}
.range-pagination-container::before {
    left: 0;
    background: linear-gradient(to right, #f0f2f5, transparent);
}
.range-pagination-container::after {
    right: 0;
    background: linear-gradient(to left, #f0f2f5, transparent);
}


/* --- Paginación Detallada --- */
.pagination .page-link {
    border-radius: 50% !important;
    margin: 0 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* --- Modales y Toast --- */
.modal-content { border-radius: 12px; border: none; }
.toast { background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(5px); }
.toast.success { border-left: 5px solid #28a745; }
.toast.error { border-left: 5px solid #dc3545; }
.toast.info { border-left: 5px solid #0dcaf0; }
.search-result-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}
