/* Datepicker Styles */

.calendar-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.calendar-container.show {
    opacity: 1;
    transform: translateY(0);
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.calendar-nav button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    color: #667eea;
    transition: all 0.3s ease;
}

.calendar-nav button:hover {
    background: rgba(102, 126, 234, 0.1);
}

.calendar-nav button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-nav button:disabled:hover {
    background: none;
}

.calendar-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.calendar-weekdays {
    display: contents;
}

.weekday {
    background: #667eea;
    color: white;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.calendar-dates {
    display: contents;
}

.calendar-date {
    background: white;
    border: none;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1);
}

.calendar-date:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.calendar-date:active {
    transform: scale(0.95);
}

.calendar-date.other-month {
    color: #ccc;
    background: #f8f9fa;
}

.calendar-date.other-month:hover {
    background: #f0f0f0;
}

.calendar-date.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f8f9fa;
}

.calendar-date.disabled:hover {
    background: #f8f9fa;
}

.calendar-date.today {
    background: rgba(102, 126, 234, 0.1);
    font-weight: 600;
    color: #667eea;
    position: relative;
}

.calendar-date.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
    transform: translateX(-50%);
}

.calendar-date.selected {
    background: #667eea;
    color: white;
    font-weight: 600;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.calendar-date.in-range {
    background: rgba(102, 126, 234, 0.2);
    color: #333;
    animation: fadeInRange 0.3s ease-out;
}

.calendar-date.range-start,
.calendar-date.range-end {
    background: #667eea;
    color: white;
    font-weight: 600;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: selectDate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInRange {
    from {
        opacity: 0;
        background: rgba(102, 126, 234, 0.05);
    }
    to {
        opacity: 1;
        background: rgba(102, 126, 234, 0.2);
    }
}

@keyframes selectDate {
    from {
        transform: scale(0.8);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    }
    to {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
}

.calendar-date.range-start {
    border-radius: 8px 0 0 8px;
}

.calendar-date.range-end {
    border-radius: 0 8px 8px 0;
}

.calendar-date.range-start.range-end {
    border-radius: 8px;
}

/* Price display on calendar dates */
.calendar-date .price {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #666;
    font-weight: 500;
}

.calendar-date.selected .price,
.calendar-date.range-start .price,
.calendar-date.range-end .price {
    color: rgba(255, 255, 255, 0.8);
}

/* Dual calendar for date ranges */
.dual-calendar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.calendar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInFooter 0.4s ease-out 0.2s forwards;
}

@keyframes fadeInFooter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-footer .btn {
    transform: scale(1);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.calendar-footer .btn:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-footer .btn:active {
    transform: scale(0.98) translateY(0px);
    transition-duration: 0.1s;
}

.calendar-footer .selected-dates {
    color: #666;
    font-size: 0.875rem;
}

.calendar-footer .night-count {
    color: #667eea;
    font-weight: 500;
}

/* Time picker for daytrip */
.time-picker {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.time-picker h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1rem;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.time-slot {
    padding: 0.5rem;
    border: 2px solid #eee;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.time-slot:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.time-slot.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.time-slot.unavailable {
    background: #f8f9fa;
    color: #ccc;
    cursor: not-allowed;
}

.time-slot.unavailable:hover {
    border-color: #eee;
    background: #f8f9fa;
}

/* Calendar Quick Actions */
.calendar-quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.quick-action {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #666;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action:hover {
    border-color: #667eea;
    color: #667eea;
}

.quick-action.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .dual-calendar {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calendar-date {
        min-height: 40px;
        padding: 0.75rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .weekday {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .calendar-nav {
        padding: 0;
    }
    
    .calendar-header {
        font-size: 1rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .time-slot {
        padding: 0.375rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .calendar-quick-actions {
        gap: 0.25rem;
    }
    
    .quick-action {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 2% auto;
        width: 95%;
        max-width: none;
    }
    
    .calendar-date {
        min-height: 36px;
        padding: 0.5rem 0.125rem;
    }
    
    .calendar-date .price {
        display: none; /* Hide prices on very small screens */
    }
    
    .calendar-footer {
        /* flex-direction: column;
        gap: 1rem; */
        text-align: center;
    }
    
    .time-slots {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animation for calendar transitions */
.calendar-slide-enter {
    opacity: 0;
    transform: translateX(30px);
}

.calendar-slide-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
}

.calendar-slide-exit {
    opacity: 1;
    transform: translateX(0);
}

.calendar-slide-exit-active {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.3s ease;
}

/* Loading state */
.calendar-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    color: #666;
}

.calendar-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Accessibility improvements */
.calendar-date:focus {
    outline: 2px solid #667eea;
    outline-offset: -2px;
    z-index: 1;
}

.time-slot:focus {
    outline: 2px solid #667eea;
    outline-offset: -2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
