/* ==========================================================================
   [2026-08-28] 예약 조회 페이지 (/booking/check)
   - 클라이언트 퍼블리싱(publish/seoulcruise-reservation-lookup.html, css/style.css) 적용본
   - 공통 리셋/폰트/스크롤바는 reset.css + booking.css(#booking) 가 담당하므로 제외
   ========================================================================== */
:root {
  --brand: #0B4DA2;
  --brand-dark: #08397A;
  --brand-ink: #0B3268;
  --ink: #16233A;
  --ink-soft: #5A6577;
  --muted: #8A94A6;
  --muted-2: #6B7684;
  --eyebrow: #8FA6C4;
  --line: #E9EEF5;
  --line-input: #DDE4EE;
  --canvas: #F5F8FC;
  --disabled-bg: #EDF1F7;
  --disabled-fg: #B4BECD;
  --accent: #E2571C;
  --accent-bg: #FFF6F0;
  --accent-line: #FBDCC8;
  --tint: #EAF1FB;
}

/* ── 레이아웃 (예약하기와 동일 비율: 좌 46% / 우 54%) ── */
.sc-app { display: flex; align-items: flex-start; }

.sc-left {
  flex: 0 0 46%;
  width: 46%;
  min-width: 460px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid var(--line);
}
.sc-left-scroll { flex: 1 1 auto; overflow-y: auto; padding: 36px 44px 24px; }

.sc-right { flex: 1 1 auto; width: auto; min-width: 0; min-height: 100vh; background: var(--canvas); }

/* ── 좌측 헤더 ── */
.sc-logo-link { display: block; width: -moz-fit-content; width: fit-content; }
.sc-logo { height: 40px; width: auto; display: block; margin-bottom: 22px; object-fit: contain; }
.sc-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; color: var(--eyebrow); margin-bottom: 10px; }
.sc-title { font-size: 30px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.03em; color: var(--brand-ink); line-height: 1.2; }
.sc-sub { margin: 0 0 28px; font-size: 15px; color: var(--muted-2); }
.sc-note { margin: 18px 2px 0; font-size: 13px; line-height: 1.7; color: var(--muted); }

/* ── 카드 / 폼 ── */
.sc-card { background: #ffffff; border: 1px solid var(--line); border-radius: 18px; padding: 24px 26px; }
.sc-card-label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 8px; }

.sc-step { display: none; }
#scRoot[data-step="phone"] .sc-step--phone,
#scRoot[data-step="code"] .sc-step--code,
#scRoot[data-step="done"] .sc-step--done { display: block; }

.sc-row { display: flex; gap: 8px; }
.sc-row + .sc-row { margin-top: 10px; }
.sc-row--mb { margin-bottom: 12px; }
.sc-field { display: flex; align-items: center; position: relative; }

.sc-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-input);
  border-radius: 12px;
  font-size: 14.5px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.sc-input::placeholder { color: #A9B3C2; }
.sc-input:focus { border-color: var(--brand); }
.sc-input--fixed { font-weight: 700; }
.sc-input--code { padding-right: 74px; }
.sc-row .sc-input { flex: 1; min-width: 0; }

.sc-timer { display: block; position: absolute; right: 16px; font-size: 13.5px; color: var(--accent); font-weight: 700; }

/* ── 버튼 (예약하기와 동일 스타일) ── */
.sc-btn {
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sc-btn--grow { flex: 1; }

.sc-btn--outline {
  flex: none;
  border: 1px solid var(--brand);
  color: var(--brand);
  background: #ffffff;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 14px;
}
.sc-btn--outline:hover { background: #F3F7FD; }
.sc-btn--outline:disabled { border-color: var(--line-input); color: var(--disabled-fg); background: #ffffff; cursor: not-allowed; }

.sc-btn--ghost { border: 1px solid var(--line-input); background: #ffffff; color: var(--ink-soft); }
.sc-btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.sc-btn--ghost-sm { flex: none; border: 1px solid var(--line-input); background: #ffffff; color: var(--ink-soft); padding: 0 20px; font-size: 14px; border-radius: 12px; }
.sc-btn--ghost-sm:hover { border-color: var(--brand); color: var(--brand); }

.sc-btn--primary { background: var(--brand); color: #ffffff; }
.sc-btn--primary:hover { background: var(--brand-dark); }
.sc-btn--primary:disabled { background: var(--disabled-bg); color: var(--disabled-fg); cursor: not-allowed; }

.sc-btn--danger { padding: 13px 20px; border: 1px solid var(--accent); background: #ffffff; color: var(--accent); font-size: 14px; }
.sc-btn--danger:hover { background: var(--accent-bg); }
.sc-btn--danger:disabled,
.sc-btn--danger:disabled:hover { border-color: var(--line-input); color: var(--disabled-fg); background: #ffffff; cursor: not-allowed; }

.sc-verified {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--brand);
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
  margin-top: 4px;
}

/* 인증 실패/만료 메시지 (서버 응답용, 퍼블리싱에 추가) */
.sc-auth-msg { margin: 10px 2px 0; font-size: 13px; color: #D32F2F; line-height: 1.5; }

/* ── 우측 히어로 ── */
.sc-topbar { display: none; }

.sc-hero {
  position: relative;
  overflow: hidden;
  height: 240px;
  background: linear-gradient(135deg, #08305F 0%, #0B4DA2 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 46px 34px;
}
.sc-pill {
  align-self: flex-start;
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}
.sc-hero-title { font-size: 34px; margin: 14px 0 10px; font-weight: 800; letter-spacing: -0.03em; color: #ffffff; }
.sc-hero-sub { font-size: 15px; color: rgba(255, 255, 255, 0.8); }

/* ── 예약 내역 ── */
.sc-body { padding: 36px 46px 90px; display: flex; flex-direction: column; gap: 18px; }
.sc-list { display: none; flex-direction: column; gap: 18px; }
.sc-empty, .sc-pending { display: none; background: #ffffff; border: 1px solid var(--line); border-radius: 18px; padding: 88px 30px; text-align: center; }
#scRoot[data-step="done"] .sc-list { display: flex; }
#scRoot[data-step="done"].is-empty .sc-list { display: none; }
#scRoot[data-step="done"].is-empty .sc-empty { display: block; }
#scRoot:not([data-step="done"]) .sc-pending { display: block; }
.sc-empty p { font-size: 17px; font-weight: 700; color: var(--muted); }
.sc-pending-title { margin-bottom: 8px; font-size: 18px; font-weight: 800; color: var(--brand-ink); }
.sc-pending-sub { font-size: 14.5px; line-height: 1.7; color: var(--muted); }

.sc-loading { background: #ffffff; border: 1px solid var(--line); border-radius: 18px; padding: 60px 30px; text-align: center; font-size: 14.5px; font-weight: 700; color: var(--muted); }

.sc-booking { background: #ffffff; border-radius: 18px; padding: 28px 30px; border: 1px solid var(--line); }
.sc-booking-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sc-booking-title { margin: 0; font-size: 19px; font-weight: 800; color: var(--brand-ink); letter-spacing: -0.02em; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }

.sc-badge { flex: none; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.sc-badge--done { background: var(--tint); color: var(--brand); }
.sc-badge--canceled { background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent); }
[data-status="done"] .sc-badge--canceled,
[data-status="canceled"] .sc-badge--done { display: none; }
[data-status="canceled"] .sc-booking-foot { display: none; }

.sc-detail { display: grid; grid-template-columns: 92px 1fr; row-gap: 12px; column-gap: 20px; align-items: start; }
.sc-detail dt { font-size: 14px; color: var(--muted); }
.sc-detail dd { display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; font-weight: 600; color: var(--ink); min-width: 0; margin: 0; }
.sc-detail dd span { display: block; }

.sc-divider { height: 1px; margin: 22px 0 16px; background: var(--line); }

.sc-total { display: flex; align-items: baseline; justify-content: space-between; }
.sc-total span { display: inline-block; font-size: 14.5px; font-weight: 700; color: var(--ink-soft); }
.sc-total strong { font-size: 24px; font-weight: 800; color: var(--brand); letter-spacing: -0.03em; }

.sc-booking-foot { display: flex; justify-content: flex-end; margin-top: 18px; }

/* ── 모달 ── */
.sc-modal {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 32, 62, 0.45);
  animation: scFade 0.16s ease-out;
}
.sc-modal[hidden] { display: none; }
.sc-modal-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 28px 24px;
  box-shadow: 0 18px 48px rgba(8, 32, 68, 0.24);
  animation: scPop 0.18s ease-out;
}
.sc-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.sc-modal-close:hover { color: var(--ink); }
.sc-modal-text { margin: 14px 0 24px; font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.55; white-space: pre-line; }

@keyframes scFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scPop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── 모바일: 예약조회 / 예약내역 별도 페이지 ── */
@media (max-width: 899px) {
  .sc-app { display: block; }
  .sc-left {
    width: 100%;
    min-width: 0;
    position: static;
    height: auto;
    border-right: 0;
  }
  .sc-left-scroll { overflow: visible; padding: 24px 20px 16px; }
  .sc-right { width: 100%; min-height: 100vh; }

  #scRoot[data-step="done"] .sc-left { display: none; }
  #scRoot:not([data-step="done"]) .sc-right { display: none; }

  .sc-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #E4EAF3;
    background: #ffffff;
  }
  .sc-back { border: none; background: none; font-size: 20px; cursor: pointer; padding: 4px; line-height: 1; color: var(--ink); width: auto; height: auto; }
  .sc-topbar-title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }

  .sc-hero { height: 190px; padding: 0 20px 24px; }
  .sc-hero-title { font-size: 25px; }
  .sc-body { padding: 20px 20px 56px; gap: 14px; }
  .sc-booking { padding: 22px 20px; }
  .sc-detail { grid-template-columns: 84px 1fr; }
  .sc-card { padding: 20px 20px; }
  .sc-input { font-size: 16px; /* iOS 자동 확대 방지 */ }
}
