/* 캘린더 스타일 */
.calendar-container {
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

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

.calendar-month-year {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.calendar-nav-btn:hover {
    background: #00b4d8;
    color: white;
    transform: scale(1.05);
}

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

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

.calendar-weekday.sunday {
    color: #e74c3c;
}

.calendar-weekday.saturday {
    color: #3498db;
}

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

.calendar-date {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #f8f9fa;
}

.calendar-date:hover:not(.disabled) {
    background: #e3f2fd;
    transform: scale(1.05);
}

.calendar-date.today {
    background: #fff3cd;
    border-color: #ffc107;
}

.calendar-date.selected {
    background: #00b4d8;
    color: white;
    border-color: #0077b6;
}

.calendar-date.disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.calendar-date.available {
    background: #d4edda;
    border-color: #28a745;
}

.calendar-date.booked {
    background: #f8d7da;
    border-color: #dc3545;
    cursor: not-allowed;
}

.calendar-date-number {
    font-size: 1.1rem;
    font-weight: 500;
}

.calendar-date-status {
    font-size: 0.7rem;
    margin-top: 2px;
}

/* 시간 선택 섹션 */
.time-selection {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.time-slot:hover:not(.booked) {
    border-color: #00b4d8;
    background: #e3f2fd;
}

.time-slot.selected {
    background: #00b4d8;
    color: white;
    border-color: #0077b6;
}

.time-slot.booked {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* 예약 정보 요약 */
.booking-summary {
    margin-top: 20px;
    padding: 20px;
    background: #e7f3ff;
    border-radius: 10px;
    border-left: 4px solid #00b4d8;
}

.booking-summary h3 {
    margin-bottom: 10px;
    color: #0077b6;
}

.booking-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.booking-summary-label {
    font-weight: 500;
    color: #495057;
}

.booking-summary-value {
    font-weight: 700;
    color: #212529;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .calendar-container {
        padding: 15px;
        margin: 10px;
    }
    
    .calendar-dates {
        gap: 3px;
    }
    
    .calendar-date {
        font-size: 0.9rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* 로딩 애니메이션 */
.calendar-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00b4d8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 툴팁 */
.calendar-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.calendar-date:hover .calendar-tooltip {
    opacity: 1;
}

.calendar-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #333;
}