/* 공통: booking-modal / room-modal / pension-modal / privacy-modal / privacy-policy-modal 레이아웃 */
.booking-modal,
.room-modal,
.pension-modal,
.privacy-modal,
.privacy-policy-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.booking-modal,
.room-modal,
.pension-modal {
    z-index: 1000;
}

/* 약관(privacy)은 다른 예약 모달·UI 모달보다 항상 위 */
.privacy-modal,
.privacy-policy-modal {
    z-index: 10050;
}

.booking-modal.is-open,
.room-modal.is-open,
.pension-modal.is-open,
.privacy-modal.is-open,
.privacy-policy-modal.is-open {
    display: flex;
}

.booking-modal-dim,
.room-modal-dim,
.pension-modal-dim,
.privacy-modal-dim,
.privacy-policy-modal-dim {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.booking-modal-container,
.room-modal-container,
.pension-modal-container,
.privacy-modal-container,
.privacy-policy-modal-container {
    position: relative;
    width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.booking-modal-container,
.privacy-modal-container{
    max-width: 460px;
    height: 720px;
}

.privacy-policy-modal-container {
    max-width: 460px;
    height: auto;
}

.room-modal-container {
    max-width: 960px;
    height: 720px;
}

.pension-modal-container {
    max-width: 460px;
    height: auto;
    max-height: 90vh;
}

/* 헤더 (공통) */
.booking-modal-header,
.room-modal-header,
.pension-modal-header,
.privacy-modal-header,
.privacy-policy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    font-size: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.modal-close img {
    width: 24px;
    height: 24px;
    display: block;
}

/* 탭 (스코프: .booking-modal) */
.booking-modal .booking-modal-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.booking-modal .booking-tab {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    text-align: center;
}

.booking-modal .booking-tab.is-active {
    font-weight: 600;
    color: #111;
    border-bottom: 2px solid #111;
    margin-bottom: -1px;
}

.booking-modal .booking-tab-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-modal .booking-tab-panel {
    display: none;
    flex: 1;
    overflow: hidden;
}

.booking-modal .booking-tab-panel.is-active {
    display: block;
}

.booking-modal .booking-tab-panel .panel-scroll {
    height: 100%;
    overflow-y: auto;
}

/* 인원 탭 상단 안내 */
.booking-modal .guest-notice {
    display: flex;
    align-items: flex-start;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 16px;
}

.booking-modal .guest-notice .icon-info {
    display: inline-block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    margin-top: 2px;
    vertical-align: middle;
    background: url('../images/ic/info.svg') no-repeat center;
    background-size: contain;
}

.booking-modal .guest-notice .guest-notice-text {
    flex: 1;
}

.booking-modal .guest-notice .guest-notice-line1 {
    font-size: 14px;
    color: #555;
}

.booking-modal .guest-notice .guest-notice-line2 {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.booking-modal .guest-notice strong {
    font-weight: 700;
    color: #111;
    padding: 0 4px;
}

/* 인원 UI (스코프: .booking-modal) */
.booking-modal .booking-guests {
    padding: 8px 0;
}

.booking-modal .booking-guests-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.booking-modal .booking-guests-row:last-child {
    border-bottom: none;
}

.booking-modal .booking-guests-label {
    font-size: 15px;
    color: #111;
}

.booking-modal .booking-guests-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

.booking-modal .booking-guests-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: none;
    font-size: 18px;
    line-height: 1;
    color: #111;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.booking-modal .booking-guests-btn:hover {
    background: #f5f5f5;
}

.booking-modal .booking-guests-count {
    min-width: 24px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

/* 아동 항목 리스트 (스코프: .booking-modal) */
.booking-modal .booking-guests-child-list {
    background: #fafafa;
}

.booking-modal .child-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

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

.booking-modal .child-item .label {
    font-size: 14px;
    color: #333;
}

/* custom-select (dropdown은 absolute로 문서 흐름 영향 없음) */
.booking-modal .custom-select {
    position: relative;
    min-width: 120px;
}

.booking-modal .custom-select select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.booking-modal .custom-select .select-trigger {
    display: block;
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #111;
    background: #fff;
    text-align: left;
    cursor: pointer;
    position: relative;
}

/* arrow: 이미지 1개(::after)만 사용, active 시 회전 */
.booking-modal .custom-select .select-trigger::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    background: url('../images/ic/arrow-b.svg') no-repeat center;
    background-size: 12px 7px;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.booking-modal .custom-select.active .select-trigger::after {
    transform: rotate(180deg);
}

.booking-modal .custom-select .select-trigger:hover {
    border-color: #bbb;
}

.booking-modal .custom-select.active .select-trigger {
    border-color: #111;
    outline: none;
}

/* 옵션 영역: absolute로 떠서 레이아웃 밀지 않음 */
.booking-modal .custom-select .select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 1000;
}

.booking-modal .custom-select.active .select-options {
    display: block;
}

/* body로 이동한 드롭다운: overflow 영향 없음, 위치는 JS에서 fixed로 설정 */
.select-options.booking-select-options-portaled {
    display: block;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 10000;
}

.select-options.booking-select-options-portaled .select-option {
    padding: 8px 12px;
    font-size: 14px;
    color: #111;
    cursor: pointer;
}

.select-options.booking-select-options-portaled .select-option:hover {
    background: #f5f5f5;
}

.select-options.booking-select-options-portaled .select-option.selected {
    background: #f0f0f0;
    font-weight: 600;
}

.booking-modal .custom-select .select-option {
    padding: 8px 12px;
    font-size: 14px;
    color: #111;
    cursor: pointer;
}

.booking-modal .custom-select .select-option:hover {
    background: #f5f5f5;
}

.booking-modal .custom-select .select-option.selected {
    background: #f0f0f0;
    font-weight: 600;
}

/* 컨텐츠 (공통) */
.booking-modal-body,
.room-modal-body,
.pension-modal-body,
.privacy-modal-body,
.privacy-policy-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* 하단 버튼 (공통) */
.booking-modal-footer,
.room-modal-footer,
.pension-modal-footer,
.privacy-modal-footer,
.privacy-policy-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

/* pension-modal: footer 제거 후 빈 공간 제거 (body flex 제거) */
.pension-modal .pension-modal-body {
    flex: none;
}

/* pension-modal 전용: 펜션 정보 영역 */
.pension-modal .pension-content-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.pension-modal .pension-info-section {
    padding: 0;
}

.pension-modal .pension-info-value,
.pension-modal .pension-info-desc {
    margin-top: 6px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.pension-modal .pension-facility-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 12px;
}

.pension-modal .pension-facility-list span {
    font-size: 14px;
    color: #333;
}

.pension-modal .usage-info-list {
    margin-top: 16px;
}

.pension-modal .usage-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.pension-modal .usage-info-list li::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-top: 8px;
    background-color: #111;
    border-radius: 50%;
    flex-shrink: 0;
}

.pension-modal .map-wrap {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 12px;
}

.pension-modal .map-wrap iframe {
    position: absolute;   /* 핵심 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: auto;
}

.place-details-compact-container {
    display: none !importnat;
}

/* room-modal 푸터: 1박 기준 + 가격 */
.room-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111;
}

.room-modal-footer .price-label {
    font-size: 14px;
    color: #fff;
}

.room-modal-footer .price-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.room-modal-footer .price {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}

/* room-modal: Swiper 슬라이드 (상단 full width) */
.room-modal .room-modal-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.room-modal .room-modal-body::-webkit-scrollbar {
    width: 6px;
    height: 10px;
    margin: 0 2px;
    background-color: rgba(0, 0, 0, 0);
    -webkit-border-radius: 100px;
}

.room-modal .room-modal-body::-webkit-scrollbar:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.room-modal .room-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.4);
    -webkit-border-radius: 100px;
    border: 2px solid transparent;
}

.room-modal .room-modal-body::-webkit-scrollbar-thumb:active {
    background: rgba(0, 0, 0, 0.61);
    -webkit-border-radius: 100px;
}

.room-modal .room-swiper {
    width: 100%;
    height: 460px;
    overflow: hidden;
    flex-shrink: 0;
}

.room-modal .room-swiper .swiper-slide {
    height: 100%;
}

.room-modal .room-swiper img {
    width: 100%;
    height: 100%;
    display: block;
}

/* 좌우 버튼: 세로 중앙 */
/* room-swiper 커스텀 prev/next 버튼 */
.room-modal .swp-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.room-modal .swp-btn.prev {
    left: 12px;
}

.room-modal .swp-btn.next {
    right: 12px;
}

.room-modal .swp-btn img {
    width: 16px;
    height: 16px;
}

/* pagination: 우측 하단, 반투명 배경 */
.room-modal .room-swiper .swiper-pagination {
    bottom: 12px;
    left: auto;
    right: 12px;
    width: auto;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
}

.room-modal .room-swiper .swiper-pagination-fraction {
    color: #fff;
}

/* room-modal 전용: 객실 상세 영역 */
.room-modal .room-content-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 0;
}

/* room-modal: 객실정보 섹션 (슬라이드 바로 아래) */
.room-modal .room-info-section {
    padding: 0 20px;
}

.room-modal .room-info-title {
    border-top: 2px solid #111;
    padding-top: 20px;
    font-size: 18px;
    font-weight: 600;
}

.room-modal .room-info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 40px;
    margin-top: 16px;
}

.room-modal .room-info-list .info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.room-modal .room-info-list .label {
    color: #999;
    font-size: 14px;
}

.room-modal .room-info-list .value {
    font-size: 16px;
    font-weight: 500;
}

/* room-modal: 편의시설 섹션 (스코프: .room-modal만) */
.room-modal .facility-section {
    padding: 0 20px;
}

.room-modal .facility-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 12px;
}

.room-modal .usage-info-section {
    padding: 0 20px;
}

/* room-modal 이용안내: DB usage_notice (textarea) */
.room-modal .usage-info-section .notice-content {
    margin-top: 16px;
    padding: 16px;
    background: #f9f9f9;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.room-modal .facility-list span {
    font-size: 14px;
    color: #333;
    display: inline-block;
    padding: 0 12px;   /* 좌우 여유 늘려야됨 */
    height: 32px;
    line-height: 32px;
    border: 1px solid #eee;
    border-radius: 999px;  /* 핵심 */
}

.room-modal .room-modal-content {
    flex: 1;
    padding: 20px;
    font-size: 14px;
    color: #333;
}

.room-modal .room-modal-placeholder {
    color: #999;
}

.modal-submit {
    width: 100%;
    height: 48px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
        border-radius: 8px;
    overflow: hidden;
}

/* 예약 확인 모달 (pension-modal 동일 레이아웃 + 하단 확인 고정, 전용 클래스만 사용) */
.reservation-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.reservation-confirm-modal.is-open {
    display: flex;
}

.reservation-confirm-modal-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.reservation-confirm-inner {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    height: auto;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.reservation-confirm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.reservation-confirm-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.reservation-confirm-footer {
    flex-shrink: 0;
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.reservation-confirm-modal .confirm-wrap {
    
}

.reservation-confirm-modal .confirm-header {
    margin-bottom: 24px;
}

.reservation-confirm-modal .confirm-pension {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.reservation-confirm-modal .confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #262626;
    line-height: 1.4;
}

.reservation-confirm-modal .confirm-title strong {
    font-weight: 600;
}

.reservation-confirm-modal .confirm-title .confirm-status-message {
    display: block;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #4a4a4a;
    line-height: 1.45;
}

.reservation-confirm-modal .confirm-info {
    border-top: 1px solid #eee;
}

.reservation-confirm-modal .confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.reservation-confirm-modal .confirm-label {
    font-size: 14px;
    color: #888;
}

.reservation-confirm-modal .confirm-value {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

/* 전체 래퍼 */
.privacy-modal .policy-wrapper,
.privacy-policy-modal .policy-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 섹션 공통 */
.privacy-modal .policy-wrapper .policy-section,
.privacy-policy-modal .policy-wrapper .policy-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 타이틀 */
.privacy-modal .policy-wrapper .policy-title,
.privacy-policy-modal .policy-wrapper .policy-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

/* 본문 텍스트 */
.privacy-modal .policy-wrapper p,
.privacy-policy-modal .policy-wrapper p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* strong (항목 제목) */
.privacy-modal .policy-wrapper p strong,
.privacy-policy-modal .policy-wrapper p strong {
    display: block;
    margin-bottom: 4px;
    color: #111;
    font-weight: 600;
}

/* 구분선 느낌 (선택사항) */
.privacy-modal .policy-wrapper .policy-section + .policy-section,
.privacy-policy-modal .policy-wrapper .policy-section + .policy-section {
    padding-top: 24px;
    border-top: 1px solid #eee;
}