/* Estilos para la página de Reservas - Pizpireta */

.back-link {
    display: inline-block;
    margin: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #970066, #ec4899);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.back-link:hover {
    transform: translateY(-2px);
}

.reservas-hero {
    background: linear-gradient(135deg, #970066, #ec4899);
    color: white;
    padding: 80px 20px 60px;
    text-align: center;
    margin-top: 80px;
}

.reservas-hero h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 3rem;
    margin-bottom: 20px;
}

.reservas-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.reservas-container {
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.reservas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.calendario-section,
.horarios-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.calendario-section h2,
.horarios-section h2 {
    font-family: 'Fredoka', sans-serif;
    color: #970066;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendario-header button {
    background: #970066;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.calendario-header button:hover {
    background: #ec4899;
}

.calendario-header h3 {
    font-family: 'Fredoka', sans-serif;
    color: #970066;
    font-size: 1.5rem;
}

.calendario-dias {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #970066;
}

.calendario-dias div {
    text-align: center;
    padding: 10px;
}

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendario-dia {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.calendario-dia.otro-mes {
    color: #ccc;
}

.calendario-dia.disponible {
    background: #dcfce7;
    color: #16a34a;
}

.calendario-dia.disponible:hover {
    background: #16a34a;
    color: white;
    transform: scale(1.1);
}

.calendario-dia.ocupado {
    background: #fee;
    color: #dc2626;
    cursor: not-allowed;
}

.calendario-dia.seleccionado {
    background: #970066;
    color: white;
    font-weight: 700;
}

.calendario-dia.hoy {
    border: 2px solid #970066;
}

.calendario-dia.festivo {
    background: #fef3c7;
    color: #f59e0b;
    font-weight: 700;
}

.calendario-dia.festivo.disponible {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.calendario-dia.festivo.disponible:hover {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
}

/* Día festivo seleccionado - prioridad sobre festivo */
.calendario-dia.festivo.seleccionado {
    background: #970066 !important;
    color: white !important;
}

.calendario-dia.cerrado {
    background: #fee;
    color: #dc2626;
    text-decoration: line-through;
    cursor: not-allowed;
}

.leyenda {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 0.9rem;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leyenda-color {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

.horarios-lista {
    display: grid;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.horario-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.horario-slot.disponible {
    background: #dcfce7;
    border: 2px solid #16a34a;
}

.horario-slot.disponible:hover {
    background: #bbf7d0;
}

.horario-slot.ocupado {
    background: #fee;
    border: 2px solid #dc2626;
    cursor: not-allowed;
    opacity: 0.6;
}

.horario-slot.marcado {
    background: #970066;
    color: white;
    border: 2px solid #970066;
}

.horario-slot input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #970066;
}

.horario-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.horario-hora {
    font-weight: 600;
    font-size: 1.1rem;
}

.dia-completo {
    background: linear-gradient(135deg, #970066, #ec4899);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.dia-completo label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
}

.dia-completo input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: white;
}

.formulario-reserva {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.formulario-reserva h2 {
    font-family: 'Fredoka', sans-serif;
    color: #970066;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    transition: border 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #970066;
}

.form-group input[readonly] {
    background: #f3f4f6;
}

/* Validación visual de inputs */
.form-group input.valid {
    border-color: #16a34a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316a34a'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.form-group input.invalid {
    border-color: #dc2626;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dc2626'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.error-message {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

.resumen-reserva {
    background: #FFEBDE;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.resumen-reserva h3 {
    color: #970066;
    margin-bottom: 15px;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.resumen-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: #970066;
}

.btn-reservar {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #970066, #ec4899);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-reservar:hover {
    transform: translateY(-2px);
}

.btn-reservar:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.alerta {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.alerta-info {
    background: #dbeafe;
    color: #1e40af;
}

.alerta-warning {
    background: #fef3c7;
    color: #92400e;
}

.alerta-success {
    background: #dcfce7;
    color: #16a34a;
}

/* Modal de Normas */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 30px;
    background: linear-gradient(135deg, #970066, #ec4899);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    max-height: 60vh;
}

.modal-body h3 {
    color: #970066;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.modal-body p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.modal-body ul {
    list-style: none;
    padding: 0;
}

.modal-body li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
}

.modal-body li:before {
    content: '•';
    color: #ec4899;
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
}

.modal-body strong {
    color: #970066;
}

.scroll-indicator {
    text-align: center;
    padding: 15px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
    border-top: 2px solid #fcd34d;
}

.scroll-indicator.hidden {
    display: none;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f3f4f6;
    display: flex;
    gap: 15px;
}

.modal-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

.modal-btn-cancel:hover {
    background: #d1d5db;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #970066, #ec4899);
    color: white;
}

.modal-btn-confirm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(151, 0, 102, 0.3);
}

.modal-btn-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .reservas-container {
        padding: 40px 15px;
    }

    .reservas-grid {
        gap: 30px;
    }

    .calendario-section,
    .horarios-section {
        padding: 25px;
    }
}

/* Móviles y tablets pequeñas */
@media (max-width: 768px) {
    .reservas-hero {
        padding: 60px 20px 40px;
        margin-top: 70px;
    }

    .reservas-hero h1 {
        font-size: 2rem;
    }

    .reservas-hero p {
        font-size: 1rem;
    }

    .back-link {
        margin: 15px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .reservas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .calendario-section,
    .horarios-section {
        padding: 20px;
    }

    .calendario-section h2,
    .horarios-section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .calendario-grid {
        gap: 3px;
    }

    .calendario-dia {
        font-size: 0.9rem;
        padding: 8px;
        min-height: 40px;
    }

    .calendario-header button {
        padding: 8px 15px;
        font-size: 1rem;
    }

    .calendario-header h3 {
        font-size: 1.2rem;
    }

    .horario-item {
        padding: 12px;
        font-size: 0.95rem;
    }

    .formulario-reserva {
        padding: 20px;
        margin-top: 20px;
    }

    .formulario-reserva h2 {
        font-size: 1.5rem;
    }

    .resumen-reserva {
        padding: 15px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 1rem;
    }

    .btn-reservar {
        padding: 15px;
        font-size: 1.1rem;
    }

    .leyenda {
        flex-wrap: wrap;
        gap: 10px;
    }

    .leyenda-item {
        font-size: 0.85rem;
    }

    .alerta {
        font-size: 0.9rem;
        padding: 12px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .reservas-hero h1 {
        font-size: 1.6rem;
    }

    .reservas-hero p {
        font-size: 0.9rem;
    }

    .calendario-section h2,
    .horarios-section h2 {
        font-size: 1.3rem;
    }

    .calendario-header {
        margin-bottom: 15px;
    }

    .calendario-header button {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .calendario-header h3 {
        font-size: 1.1rem;
    }

    .calendario-dias {
        font-size: 0.8rem;
        gap: 2px;
    }

    .calendario-grid {
        gap: 2px;
    }

    .calendario-dia {
        font-size: 0.8rem;
        padding: 6px;
        min-height: 35px;
    }

    .horario-item {
        padding: 10px;
        font-size: 0.9rem;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .modal-body {
        font-size: 0.9rem;
        padding: 15px;
    }

    .modal-footer {
        padding: 15px;
    }

    .modal-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .resumen-reserva h3 {
        font-size: 1.2rem;
    }

    .resumen-item {
        font-size: 0.9rem;
        padding: 10px 0;
    }
}

/* Estados de visibilidad controlados por JavaScript */
#btnLimpiarContainer {
    display: none;
    margin-top: 20px;
}

#formularioReserva {
    display: none;
}

#alertaHorario {
    display: none;
}

/* Placeholder de horarios */
.horarios-placeholder {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* Contador de caracteres */
.contador-caracteres {
    text-align: right;
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
}
