/* ===== 예약 조회 (/package/reservation/ · /package/reservation/detail/) ===== */

/* 공통 레이아웃 */
.rsv-main {
    padding: 40px 20px 110px;
    box-sizing: border-box;
}
.rsv-container {
    max-width: 720px;
    margin: 0 auto;
}
.rsv-nowrap {
    white-space: nowrap;
}

/* 공통 버튼 (홈으로 · 다시 조회하기 · 완료 화면 버튼) */
.rsv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
}
.rsv-btn {
    display: flex;
    flex: 1 1 200px;
    align-items: center;
    justify-content: center;
    height: 54px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    box-sizing: border-box;
}
.rsv-btn--outline {
    background: #fff;
    box-shadow: inset 0 0 0 1.5px #18855C;
    color: #18855C;
}
.rsv-btn--fill {
    background: #18855C;
    color: #fff;
}

/* ===== 예약 조회 입력 ===== */
.rsv-lookup {
    max-width: 440px;
    margin: 0 auto;
}
.rsv-lookup-title {
    margin: 0;
    color: #1F2329;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}
.rsv-lookup-desc {
    margin: 10px 0 0;
    color: #7F8894;
    font-size: 15px;
    line-height: 1.7;
    text-align: center;
    word-break: keep-all;
}
.rsv-lookup-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}
.rsv-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rsv-field-label {
    color: #1F2329;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}
.rsv-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #E1E4E8;
    border-radius: 8px;
    background: #fff;
    color: #1F2329;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
}
.rsv-input--code {
    letter-spacing: .5px;
}
.rsv-input--phone {
    letter-spacing: 2px;
}
.rsv-lookup-error {
    margin: 14px 0 0;
    color: #E05252;
    font-size: 13px;
    line-height: 1.5;
}
.rsv-lookup-submit {
    width: 100%;
    height: 48px;
    margin-top: 24px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #18855C;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.rsv-lookup-guide {
    margin: 28px 0 0;
    padding: 18px 20px;
    border-radius: 12px;
    background: #F7F8FA;
    list-style: none;
    color: #7F8894;
    font-size: 13px;
    line-height: 1.7;
    word-break: keep-all;
}
.rsv-link {
    color: #18855C;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== 예약 상세 (문서형 레이아웃) ===== */
/* 타이포는 /service(service_center.css)와 맞춤: 제목 22 · 본문/표 14 · 보조 12, 자간 -0.2px */
.rsv-doc {
    color: #1F2329;
    letter-spacing: -0.2px;
}
.rsv-doc p {
    margin: 0;
}
.rsv-sub {
    color: #7F8894;
    font-weight: 400;
}
.rsv-strong {
    color: #1F2329;
    font-weight: 700;
}

.rsv-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #1F2329;
}
.rsv-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.4px;
}
.rsv-head-meta {
    color: #7F8894;
    font-size: 12px;
    line-height: 1.5;
}
.rsv-head-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
/* 진행 상태 배지: 접수 완료(회색) / 진행중(녹색) */
.rsv-status {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 100px;
    background: #F4F5F7;
    color: #4A5160;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
.rsv-status--progress {
    background: #E8F7F0;
    color: #18855C;
}
.rsv-status--cancelled {
    background: #FDECEC;
    color: #C93C3C;
}

.rsv-notice {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 16px 18px;
    border: 0;
    border-radius: 8px;
    background: #E8F7F0;
}
.rsv-notice-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: #18855C;
    font-size: 16px;
}
.rsv-notice-title {
    color: #18855C;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
.rsv-notice-desc {
    margin-top: 4px !important;
    color: #4A5160;
    font-size: 14px;
    line-height: 1.65;
    word-break: keep-all;
}
/* 경고 (입금 기한 지남) */
.rsv-notice.rsv-notice--danger {
    margin: 0 0 12px;
    border-color: #F5C9C9;
    background: #FFF7F7;
}
.rsv-notice--danger .rsv-notice-icon {
    color: #E05252;
}
.rsv-notice--danger .rsv-notice-title {
    color: #C93C3C;
}

/* 완료 섹션 (?new=1 신청 직후 · ?paid=1 결제 직후). 제목·설명·신청번호는 조회 실패 화면과 공용 */
.rsv-done {
    max-width: 440px;
    margin: 40px auto 56px;
    padding-top: 16px;
    text-align: center;
}
.rsv-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #E8F7F0;
    color: #18855C;
    font-size: 30px;
}
.rsv-done-title {
    margin: 24px 0 0;
    color: #1F2329;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    word-break: keep-all;
}
.rsv-done-desc {
    margin: 10px 0 0 !important;
    color: #7F8894;
    font-size: 15px;
    line-height: 1.7;
    word-break: keep-all;
}
.rsv-done-code {
    display: inline-block;
    margin: 20px 0 0 !important;
    padding: 8px 16px;
    border-radius: 100px;
    background: #F4F5F7;
    color: #4A5160;
    font-size: 13px;
    line-height: 1.4;
}
.rsv-done-code strong {
    margin-left: 6px;
    color: #1F2329;
    font-weight: 700;
    letter-spacing: .5px;
}
.rsv-done-guide {
    margin: 12px 0 0 !important;
    color: #9AA1AB;
    font-size: 13px;
    line-height: 1.6;
    word-break: keep-all;
}

/* 조회 실패 (없는 예약 · 번호 불일치 · 오류) */
.rsv-error {
    max-width: 440px;
    margin: 40px auto 0;
    text-align: center;
}
.rsv-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #FDECEC;
    color: #E05252;
    font-size: 30px;
}
.rsv-error-help {
    margin: 24px 0 0;
    color: #9AA1AB;
    font-size: 13px;
    line-height: 1.6;
    word-break: keep-all;
}
.rsv-error-help a {
    color: #4A5160;
    font-weight: 600;
    text-decoration: none;
}

.rsv-code-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
.rsv-code {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .5px;
    font-variant-numeric: tabular-nums;
}
.rsv-copy {
    padding: 4px 10px;
    border: 1px solid #E1E4E8;
    border-radius: 4px;
    background: #fff;
    color: #4A5160;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}
.rsv-copy:hover {
    border-color: #9AA1AB;
}

.rsv-section {
    margin-top: 40px;
}
.rsv-section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.rsv-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid #1F2329;
    table-layout: fixed;
}
.rsv-table th,
.rsv-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #EDEFF2;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    vertical-align: top;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.rsv-table th {
    width: 120px;
    background: #F9FAFB;
    color: #7F8894;
    font-weight: 600;
}
.rsv-table td {
    color: #4A5160;
    font-weight: 400;
}
.rsv-remark {
    white-space: pre-line;
}
.rsv-tel {
    color: #1F2329;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #E1E4E8;
    text-underline-offset: 3px;
}
/* 가상계좌 입금 기한: 남아 있으면 빨강, 지났으면 회색 */
.rsv-table td.rsv-va-due {
    color: #E05252;
    font-weight: 600;
}
.rsv-table td.rsv-va-due--expired {
    color: #7F8894;
}

.rsv-flight {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}
.rsv-flight-no {
    color: #1F2329;
    font-weight: 600;
}
.rsv-flight-route {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 2px;
}
.rsv-flight-route i {
    color: #C5CAD1;
    font-size: 12px;
}

.rsv-guide {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    color: #7F8894;
    font-size: 12px;
    line-height: 1.7;
    word-break: keep-all;
}
.rsv-guide li {
    position: relative;
    padding-left: 10px;
}
.rsv-guide li::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 0;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #C5CAD1;
}

/* 요약 카드 (아래 .rsv-table 과 같은 문서 톤: 상단 진한 선 · 회색 하단 · 모서리 없음) */
.rsv-summary {
    margin-top: 12px;
    border-bottom: 1px solid #EDEFF2;
    background: #fff;
}
.rsv-summary-pkg {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0px;
    color: inherit;
    text-decoration: none;
}
.rsv-summary-pkg:hover .rsv-summary-name {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.rsv-summary-thumb {
    flex: 0 0 120px;
    width: 120px;
    height: 90px;
    border-radius: 2px;
    background: #EDEFF2;
    overflow: hidden;
}
.rsv-summary-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rsv-summary-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.rsv-summary-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.25px;
    word-break: keep-all;
}
.rsv-summary-meta {
    color: #4A5160;
    font-size: 14px;
    line-height: 1.5;
}
.rsv-summary-arrow {
    flex-shrink: 0;
    color: #C5CAD1;
    font-size: 16px;
}
.rsv-summary-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 16px;
    border-top: 1px solid #EDEFF2;
    background: #F9FAFB;
}
.rsv-summary-label {
    color: #7F8894;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.rsv-summary-price strong {
    display: block;
    margin-top: 2px;
    color: #1F2329;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.4px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.rsv-summary-price strong small {
    margin-left: 2px;
    font-size: 14px;
    font-weight: 600;
}
.rsv-summary-note {
    margin-top: 4px !important;
    color: #7F8894;
    font-size: 12px;
    line-height: 1.5;
}
/* 결제 수단 버튼 (네이버페이 · 토스페이) */
.rsv-pay-buttons {
    display: flex;
    flex: 0 0 280px;
    gap: 8px;
}
.rsv-pay-btn {
    flex: 1 1 0;
    height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.rsv-pay-btn--naver {
    background: #03C75A;
}
.rsv-pay-btn--naver:hover {
    background: #02B350;
}
.rsv-pay-btn--toss {
    background: #0064FF;
}
.rsv-pay-btn--toss:hover {
    background: #0052D4;
}
.rsv-pay-btn--hecto {
    background: #ff9100;
}
.rsv-pay-btn--hecto:hover {
    background: #ff8100;
}
/* 신용카드결제 추천 뱃지 (수수료가 낮아 카드결제로 유도) - 버튼 오른쪽 위 모서리에 띄운다. 상세 · 결제 화면(checkout) 공용 */
.rsv-pay-btn--hecto {
    position: relative;
}
.rsv-pay-badge {
    position: absolute;
    top: -8px;
    right: -6px;
    padding: 0 6px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    white-space: nowrap;
    border: 1px solid #fff;
    border-radius: 999px;
    pointer-events: none;
}
/* 결제 상태 표시 (결제 완료 · 환불 완료일 때만) */
.rsv-pay-state {
    display: flex;
    flex: 0 0 200px;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 8px;
    background: #F4F5F7;
    color: #4A5160;
    font-size: 14px;
    font-weight: 600;
    box-sizing: border-box;
}
.rsv-pay-state--completed {
    background: #E8F7F0;
    color: #18855C;
}
.rsv-pay-state--waiting {
    background: #FFF0D6;
    color: #9A5B00;
}

/* 토스 결제 위젯 시트 (결제 수단 선택 + 약관) */
.rsv-paysheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rsv-paysheet[hidden] {
    display: none;
}
.rsv-paysheet-dim {
    position: absolute;
    inset: 0;
    background: #7F8894;
}
.rsv-paysheet-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px 16px 24px;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}
.rsv-paysheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 8px;
}
.rsv-paysheet-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}
.rsv-paysheet-close {
    padding: 4px 8px;
    border: 0;
    background: none;
    color: #4A5160;
    font-size: 18px;
    cursor: pointer;
}
.rsv-paysheet-submit {
    display: block;
    width: calc(100% - 32px);
    height: 48px;
    margin: 12px auto 0;
    border: 0;
    border-radius: 8px;
    background: #0064FF;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.rsv-paysheet-submit:disabled {
    background: #B0C8F5;
    cursor: default;
}

@media screen and (max-width: 767px) {
    .rsv-table th,
    .rsv-table td {
        padding: 12px;
    }
    .rsv-table th {
        width: 84px;
    }
    .rsv-summary-pkg {
        gap: 14px;
        padding: 16px 12px;
    }
    .rsv-summary-thumb {
        flex-basis: 88px;
        width: 88px;
        height: 66px;
    }
    .rsv-summary-name {
        font-size: 15px;
    }
    .rsv-summary-foot {
        padding: 12px;
    }
    .rsv-summary-price strong {
        font-size: 20px;
    }
    .rsv-pay-buttons,
    .rsv-pay-state {
        flex: 1 1 100%;
    }

    .rsv-paysheet {
        align-items: flex-end;
    }
    .rsv-paysheet-panel {
        border-radius: 12px 12px 0 0;
    }
}

/* ===== 예약 신청 직후 결제 화면 (checkout.php: ?new=1 · kind=1 · 결제 가능) =====
   상담 신청 완료 화면(.rsv-done)과 분리된 별도 UI. 모바일 첫 화면 안에 금액 · 결제 버튼이 들어오도록 위쪽을 촘촘하게 둔다 */
.rsv-checkout {
    max-width: 480px;
    margin: 0 auto;
}
.rsv-checkout-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    background: #E8F7F0;
    color: #18855C;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
.rsv-checkout-title {
    margin: 14px 0 0;
    color: #1F2329;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.4px;
    word-break: keep-all;
}
.rsv-checkout-desc {
    margin: 6px 0 0 !important;
    color: #7F8894;
    font-size: 15px;
    line-height: 1.6;
    word-break: keep-all;
}

/* 상품 · 금액 · 결제 버튼 카드 */
.rsv-checkout-card {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #E3E6EA;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(17, 20, 24, 0.05);
}
.rsv-checkout-pkg {
    display: flex;
    align-items: center;
    gap: 14px;
}
.rsv-checkout-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #EDEFF2;
    overflow: hidden;
}
.rsv-checkout-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rsv-checkout-pkg-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.rsv-checkout-pkg-name {
    color: #1F2329;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    word-break: keep-all;
}
.rsv-checkout-pkg-meta {
    color: #4A5160;
    font-size: 13px;
    line-height: 1.5;
}
.rsv-checkout-amount {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #EDEFF2;
}
.rsv-checkout-amount-label {
    color: #4A5160;
    font-size: 15px;
    font-weight: 600;
}
.rsv-checkout-amount-value {
    color: #1F2329;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.rsv-checkout-amount-value small {
    margin-left: 2px;
    font-size: 16px;
    font-weight: 600;
}
.rsv-checkout-note {
    margin: 4px 0 0 !important;
    color: #9AA1AB;
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
}
.rsv-checkout-pay {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}
.rsv-checkout-pay-btn {
    flex: 1 1 0;
    height: 54px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

/* 신청번호 · 나중에 결제하기 */
.rsv-checkout-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: #7F8894;
    font-size: 13px;
}
.rsv-checkout-code strong {
    color: #1F2329;
    font-weight: 700;
    letter-spacing: .5px;
}
.rsv-checkout-later {
    display: block;
    width: fit-content;
    margin: 18px auto 0;
    color: #7F8894;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.rsv-checkout-guide {
    margin: 10px 0 0 !important;
    color: #9AA1AB;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    word-break: keep-all;
}

@media screen and (max-width: 767px) {
    /* 헤더 바로 아래에서 시작해 결제 버튼까지 첫 화면에 들어오게 */
    .rsv-main:has(.rsv-checkout) {
        padding-top: 16px;
    }
    .rsv-checkout-title {
        margin-top: 10px;
        font-size: 21px;
    }
    .rsv-checkout-desc {
        font-size: 14px;
    }
    .rsv-checkout-card {
        margin-top: 16px;
        padding: 16px;
    }
    .rsv-checkout-amount {
        margin-top: 14px;
        padding-top: 14px;
    }
    .rsv-checkout-amount-value {
        font-size: 22px;
    }
    /* 버튼은 세로로 쌓아 누르기 쉽게 */
    .rsv-checkout-pay {
        flex-direction: column;
        margin-top: 14px;
    }
    .rsv-checkout-pay-btn {
        flex: 0 0 auto;
        height: 52px;
    }
}
