/**
 * Estilos para el widget de calendario de habitaciones
 */

.habitacion-api-pro-widget {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.habitacion-info {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.habitacion-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.habitacion-desc {
    margin: 15px 0;
    line-height: 1.6;
    color: #666;
}

.habitacion-precio {
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
    margin: 15px 0;
}

.calendario-reservas {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendario-reservas h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.fecha-selector {
    margin-bottom: 20px;
}

.fecha-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.habitacion-calendar-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.habitacion-calendar-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.habitacion-calendar-input::placeholder {
    color: #999;
}

/* Estilos para Flatpickr */
.flatpickr-calendar {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: none;
    border-radius: 8px;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

.flatpickr-day.inRange {
    background: rgba(0, 124, 186, 0.2);
    border-color: rgba(0, 124, 186, 0.3);
    color: #007cba;
}

.flatpickr-day:hover {
    background: rgba(0, 124, 186, 0.1);
    border-color: #007cba;
}

/* Resultados de disponibilidad */
.disponibilidad-resultado {
    min-height: 20px;
}

.disponibilidad-success {
    padding: 12px 16px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    font-weight: 500;
}

.disponibilidad-error {
    padding: 12px 16px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-weight: 500;
}

.disponibilidad-error small {
    display: block;
    margin-top: 5px;
    font-weight: normal;
    opacity: 0.8;
}

/* Acciones de reserva */
.reserva-actions {
    text-align: center;
    padding: 20px 0;
}

.precio-total {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.precio-total strong {
    color: #007cba;
    font-size: 22px;
}

.precio-total small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.btn-reservar {
    background: #007cba;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-reservar:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.btn-reservar:active {
    transform: translateY(0);
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading-spinner::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .habitacion-api-pro-widget {
        margin: 0;
    }
    
    .habitacion-info,
    .calendario-reservas {
        padding: 15px;
        margin: 0 0 20px 0;
    }
    
    .habitacion-title {
        font-size: 20px;
    }
    
    .habitacion-calendar-input {
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .btn-reservar {
        width: 100%;
        padding: 16px;
    }
}

/* Estilos adicionales para mejorar la experiencia */
.flatpickr-calendar.arrowTop:before {
    border-bottom-color: white;
}

.flatpickr-calendar.arrowTop:after {
    border-bottom-color: white;
}

.flatpickr-months .flatpickr-month {
    background: #007cba;
    color: white;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #007cba;
}

.flatpickr-weekdays {
    background: #f8f9fa;
}

.flatpickr-weekday {
    color: #666;
    font-weight: 600;
}

/* Estados deshabilitados */
.flatpickr-day.disabled {
    color: #ccc !important;
    cursor: not-allowed !important;
}

.flatpickr-day.disabled:hover {
    background: transparent !important;
    border-color: transparent !important;
}