/* Estilos para el Sistema de Reservas ClimaBaix */

/* Contenedor principal del calendario */
.calendar-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

/* Header del calendario */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.calendar-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C5AA0;
    margin: 0;
}

.calendar-nav {
    background: linear-gradient(135deg, #2C5AA0, #1e3f6b);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

/* Grid del calendario */
.calendar-grid {
    width: 100%;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: 600;
    color: #666;
    padding: 10px 5px;
    font-size: 0.9rem;
}

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

.calendar-day {
    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;
    border: 2px solid transparent;
}

.calendar-day:hover {
    background-color: #f8f9fa;
    transform: scale(1.05);
}

.calendar-day.other-month {
    color: #ccc;
    cursor: default;
}

.calendar-day.other-month:hover {
    background-color: transparent;
    transform: none;
}

.calendar-day.past {
    color: #ccc;
    cursor: not-allowed;
    background-color: #f8f8f8;
}

.calendar-day.past:hover {
    background-color: #f8f8f8;
    transform: none;
}

.calendar-day.today {
    background: linear-gradient(135deg, #FF6B35, #FF8E53);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.calendar-day.weekend {
    color: #5A7C65;
    font-weight: 600;
    background-color: #f8f9fa;
}

.calendar-day.available {
    background-color: #e8f4f8;
    border-color: #2C5AA0;
    color: #1e3f6b;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.calendar-day.available::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: #2C5AA0;
    border-radius: 50%;
}

.calendar-day.available:hover {
    background-color: #d1e7dd;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #2C5AA0, #1e3f6b);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.4);
    transform: scale(1.05);
}

/* Contenedor de slots de tiempo */
.time-slots-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.time-slots-container h3 {
    color: #2C5AA0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
}

.time-slot {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.time-slot:hover {
    border-color: #2C5AA0;
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.2);
}

.time-slot.selected {
    background: linear-gradient(135deg, #2C5AA0, #1e3f6b);
    color: white;
    border-color: #2C5AA0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

.no-slots {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-slots p {
    margin: 10px 0;
    font-size: 1rem;
}

/* Resumen de la reserva */
.booking-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid #0078d4;
}

.booking-summary h3 {
    color: #0078d4;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: #333;
    font-weight: 600;
}

/* Formulario de reserva mejorado */
.booking-form {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
}

.booking-form h3 {
    color: #0078d4;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0078d4;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Botones */
.btn-submit {
    background: linear-gradient(135deg, #2C5AA0, #1e3f6b);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.4);
    width: 100%;
    margin-top: 20px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(44, 90, 160, 0.6);
}

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

/* Estados de carga */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mensajes de estado */
.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-container,
    .time-slots-container,
    .booking-form {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .calendar-header h3 {
        font-size: 1.3rem;
    }
    
    .calendar-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .calendar-day {
        font-size: 0.9rem;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .time-slot {
        padding: 10px 6px;
        font-size: 0.85rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .booking-summary {
        padding: 20px;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .calendar-container,
    .time-slots-container,
    .booking-form {
        padding: 15px;
    }
    
    .calendar-weekdays div {
        font-size: 0.8rem;
        padding: 8px 2px;
    }
    
    .calendar-day {
        font-size: 0.8rem;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 6px;
    }
    
    .time-slot {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-container,
.time-slots-container,
.booking-form {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar personalizado */
.time-slots-grid::-webkit-scrollbar {
    width: 8px;
}

.time-slots-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.time-slots-grid::-webkit-scrollbar-thumb {
    background: #0078d4;
    border-radius: 4px;
}

.time-slots-grid::-webkit-scrollbar-thumb:hover {
    background: #005bb5;
} 