/* 캡슐룸 예약 UI 스타일 */
.capsule-room-extra {
    display: flex;
    flex-wrap: wrap;
    margin: 30px 0;
    gap: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 캘린더 컨테이너 */
.calendar-container {
    flex: 1;
    min-width: 300px;
}

#calendar {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 오른쪽 정보 및 컨트롤 영역 */
.right-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.additional-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.additional-info h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

.reservation-controls {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reservation-quantity {
    margin-bottom: 20px;
}

.reservation-quantity label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.reservation-quantity input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
}

.add-to-cart {
    background-color: #f0f0f0;
    color: #333;
}

.add-to-cart:hover {
    background-color: #e0e0e0;
}

.buy-now {
    background-color: #4CAF50;
    color: white;
}

.buy-now:hover {
    background-color: #45a049;
}

/* FullCalendar 커스텀 스타일 */
.fc-day-today {
    background-color: rgba(76, 175, 80, 0.1) !important;
}

.fc-day-past {
    background-color: #f5f5f5;
}

.fc-day-available {
    cursor: pointer;
    position: relative;
}

.fc-day-unavailable {
    background-color: rgba(244, 67, 54, 0.1);
    color: #ccc;
    text-decoration: line-through;
    cursor: not-allowed;
}

.fc-day-selected {
    background-color: rgba(33, 150, 243, 0.3) !important;
    position: relative;
}

/* 연속 날짜 선택 스타일 */
.fc-day-selected:not(:first-child):not(:last-child) {
    background-color: rgba(33, 150, 243, 0.2) !important;
}

/* 첫 번째 선택 날짜 (체크인) */
.fc-day-selected:first-child {
    background-color: rgba(33, 150, 243, 0.4) !important;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

/* 마지막 선택 날짜 (체크아웃) */
.fc-day-selected:last-child {
    background-color: rgba(33, 150, 243, 0.4) !important;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* 선택된 날짜 범위 표시 */
.fc-day-selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #2196F3;
    z-index: 1;
    pointer-events: none;
}

/* 첫 번째 선택 날짜 (체크인) 표시 */
.fc-day-selected:first-child::after {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 9px;
    color: #1565C0;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 2;
}

/* 마지막 선택 날짜 (체크아웃) 표시 - 2개 이상 선택된 경우에만 */
.fc-day-selected:last-child:not(:first-child)::after {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 9px;
    color: #1565C0;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 2;
}

/* 재고 정보 스타일 */
.stock-info {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 10px !important;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 2;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .capsule-room-extra {
        flex-direction: column;
    }
    
    .calendar-container,
    .right-container {
        width: 100%;
    }
}

/* 예약 버튼 컨테이너 (컨퍼런스룸 카드 스타일과 동기화) */
.capsule-room-booking-container {
    margin-top: 32px;
    margin-bottom: 32px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 32px 28px 24px 28px;
    max-width: 420px; /* 컨퍼런스룸과 동일하게 */
    width: 100%;
    position: relative;
}

.capsule-room-booking-container h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2271b1;
    letter-spacing: -1px;
}

.capsule-room-booking-container p {
    color: #444;
    font-size: 1rem;
    margin-bottom: 18px;
}

.capsule-room-booking-container .open-capsule-booking-modal {
    width: 100%;
    font-size: 1.15rem;
    padding: 16px 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #2271b1 60%, #1e5a99 100%);
    color: #fff;
    font-weight: 700;
    border: none;
    box-shadow: 0 2px 8px rgba(34,113,177,0.08);
    transition: background 0.2s, box-shadow 0.2s;
    margin-bottom: 0;
    text-align: center;
}

.capsule-room-booking-container .open-capsule-booking-modal:hover {
    background: linear-gradient(90deg, #1e5a99 60%, #2271b1 100%);
    box-shadow: 0 4px 16px rgba(34,113,177,0.15);
}

/* 모달 스타일 */
.booking-modal {
    display: none; /* 초기에는 숨김 */
    position: fixed;
    z-index: 999999; /* 매우 높은 z-index 값 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateZ(0); /* 새로운 스태킹 컨텍스트 생성 */
    will-change: transform; /* 브라우저 최적화 */
}

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

.booking-modal .modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 900px; /* 캘린더를 포함하므로 너비를 넓게 설정 */
    border-radius: 8px;
    position: relative;
    animation: modalPopIn 0.3s ease-out;
}

@keyframes modalPopIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.booking-modal .close-modal {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.booking-modal .close-modal:hover,
.booking-modal .close-modal:focus {
    color: black;
}

/* 모달 내 UI 조정 */
.modal-content .capsule-room-extra {
    display: flex;
    flex-direction: row;
    gap: 25px;
}

.modal-content .calendar-container {
    flex: 2; /* 캘린더가 더 넓은 공간 차지 */
}

.modal-content .right-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 수직 중앙 정렬 */
}

.modal-content .button-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 버튼 사이 간격 */
    margin-top: 15px;
}

.modal-content .button-group-vertical .btn {
    width: 100%;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .modal-content .capsule-room-extra {
        flex-direction: column;
    }

    .booking-modal .modal-content {
        width: 95%;
        padding: 15px;
    }
} 