/* GrayHat Booking */

/* ── 外層 wrapper：固定黑色區塊、不受主題影響 ──── */
.ghb-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  background: #111;
  width: 100%;
}
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Noto+Sans+TC:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 插件容器：固定寬度、黑色背景撐滿內容 */
#ghb-app {
  position: relative;
  --bg:      #0e0e0e;
  --surface: #161616;
  --border:  #252525;
  --accent:  #c8a96e;
  --text:    #ffffff;
  --muted:   #777;

  width: 100%;
  max-width: 520px;
  background: var(--bg);
  color: var(--text);
  padding: 20px 20px 24px;
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.4;

  /* 強制隔離主題樣式干擾 */
  box-sizing: border-box;
}

/* 確保子元素不被主題 line-height 撐開 */
#ghb-app * {
  line-height: 1.4;
  box-sizing: border-box;
}


/* ── 摘要列 ──────────────────────────────────────── */
.summary-bar {
  display: flex; flex-wrap: wrap; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-bottom: none;
}
.s-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 14px 7px 0; margin-left: 14px;
  border-right: 1px solid var(--border);
  padding-right: 14px;
}
.s-item:last-child { border-right: none; }
.s-key { font-size: 9px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.s-val { font-size: 12px; color: var(--text); }

/* ── Steps ───────────────────────────────────────── */
.steps {
  display: flex;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.step {
  flex: 1; padding: 8px 0; font-size: 9px; letter-spacing: .12em;
  color: var(--muted); text-transform: uppercase; text-align: center;
  position: relative; transition: color .25s;
}
.step.active { color: var(--text); }
.step.done   { color: var(--muted); }
.step.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--accent);
}
.step-n {
  display: block; font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; margin-bottom: 1px; color: inherit;
}

/* ── 返回 ────────────────────────────────────────── */
.back-btn {
  background: none; border: none; color: var(--muted); font-size: 11px;
  letter-spacing: .08em; cursor: pointer; padding: 0; margin-bottom: 12px;
  font-family: 'Noto Sans TC', sans-serif; transition: color .2s; display: block;
}
.back-btn:hover { color: var(--text); }

/* ── Label ───────────────────────────────────────── */
.lbl {
  font-size: 10px; letter-spacing: .2em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 10px; display: block;
}

/* ── Panel ───────────────────────────────────────── */
.panel { animation: fadeIn .18s ease both; }
@keyframes fadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

/* ── 日曆 ────────────────────────────────────────── */
.cal-nav { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.cal-title { font-family:'Bebas Neue',sans-serif; font-size:20px; letter-spacing:.1em; }
.cal-btn {
  background:none; border:1px solid var(--border); color:var(--text);
  width:28px; height:28px; cursor:pointer; font-size:14px;
  display:flex; align-items:center; justify-content:center; transition:border-color .2s;
}
.cal-btn:hover { border-color:var(--text); }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.cal-dow {
  text-align:center; font-size:9px; letter-spacing:.06em;
  color:var(--muted); padding:4px 0; text-transform:uppercase;
}
.cal-day {
  aspect-ratio:1; display:flex; align-items:center; justify-content:center;
  font-size:12px; cursor:pointer; border:1px solid transparent; transition:all .12s; color:var(--text);
}
.cal-day:hover:not(.off) { border-color:var(--border); }
.cal-day.today  { font-weight:500; }
.cal-day.sel    { background:var(--accent); color:#0e0e0e; font-weight:500; }
.cal-day.off    { color:#2a2a2a; cursor:default; }

/* ── 時段 ────────────────────────────────────────── */
.slots-label-date { font-family:'Bebas Neue',sans-serif; font-size:15px; color:var(--text); margin-left:6px; }
.slots-wrap { display:flex; flex-direction:column; gap:6px; margin-top:6px; }
.hour-row   { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.hour-lbl   { font-family:'Bebas Neue',sans-serif; font-size:13px; color:var(--muted); width:36px; flex-shrink:0; }
.slot-btn {
  background:none; border:1px solid var(--border); color:var(--text);
  padding:5px 11px; font-size:12px; cursor:pointer;
  font-family:'Noto Sans TC',sans-serif; transition:all .12s; white-space:nowrap;
}
.slot-btn:hover { border-color:var(--text); }
.slot-btn.sel   { background:var(--accent); border-color:var(--accent); color:#0e0e0e; font-weight:500; }
.no-slots { font-size:12px; color:var(--muted); padding:10px 0; }

/* ── 人數/時數 ───────────────────────────────────── */
.qty-row  { display:flex; gap:28px; flex-wrap:wrap; margin-bottom:16px; }
.qty-grp  { display:flex; flex-direction:column; gap:7px; }
.stepper  { display:flex; align-items:center; border:1px solid var(--border); }
.stp-btn  {
  background:none; border:none; color:var(--text);
  width:36px; height:36px; font-size:18px; cursor:pointer;
  transition:background .12s; display:flex; align-items:center; justify-content:center;
}
.stp-btn:hover { background:var(--border); }
.stp-val  {
  min-width:48px; text-align:center;
  font-family:'Bebas Neue',sans-serif; font-size:22px; color:var(--text);
  border-left:1px solid var(--border); border-right:1px solid var(--border); line-height:36px;
}
.hint { font-size:11px; color:var(--muted); }
.conflict-msg { font-size:11px; color:#e05252; margin-bottom:10px; }

/* ── 按鈕 ────────────────────────────────────────── */
.next-btn, .submit-btn {
  background:none; border:1px solid var(--accent); color:var(--text);
  padding:9px 28px; font-family:'Bebas Neue',sans-serif; font-size:14px;
  letter-spacing:.2em; cursor:pointer; position:relative; overflow:hidden;
  transition:color .2s;
}
.next-btn::before, .submit-btn::before {
  content:''; position:absolute; inset:0; background:var(--accent);
  transform:translateX(-100%); transition:transform .22s ease; z-index:0;
}
.next-btn:hover::before, .submit-btn:hover::before { transform:translateX(0); }
.next-btn:hover, .submit-btn:hover { color:#0e0e0e; }
.next-btn span, .submit-btn span { position:relative; z-index:1; }

/* ── 表單 ────────────────────────────────────────── */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:0; }
@media(max-width:420px){ .form-grid{ grid-template-columns:1fr; } }
.f-field  { display:flex; flex-direction:column; gap:6px; }
.f-full   { grid-column:1/-1; }
.f-field label { font-size:9px; letter-spacing:.2em; color:var(--muted); text-transform:uppercase; }
.f-field input, .f-field textarea {
  background:var(--surface); border:1px solid var(--border);
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important;
  padding:9px 12px; font-size:13px; font-family:'Noto Sans TC',sans-serif; font-weight:300;
  outline:none; transition:border-color .2s; width:100%; resize:none;
  /* 防止主題覆蓋 */
  -webkit-appearance: none;
  appearance: none;
}
/* autofill 背景與文字顏色 */
.f-field input:-webkit-autofill,
.f-field input:-webkit-autofill:hover,
.f-field input:-webkit-autofill:focus {
  -webkit-box-shadow:0 0 0 100px #161616 inset !important;
  -webkit-text-fill-color:#ffffff !important;
  caret-color:#ffffff;
}
.f-field input:focus, .f-field textarea:focus { border-color:var(--text); }
.f-field input::placeholder, .f-field textarea::placeholder { color:#3a3a3a !important; -webkit-text-fill-color:#3a3a3a !important; font-size:12px; }
.submit-row { margin-top:14px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.submit-hint { font-size:11px; color:var(--muted); line-height:1.6; }

/* ── 載入中 overlay ──────────────────────────────── */
.ghb-loading {
  position: absolute;
  inset: 0;
  background: rgba(14,14,14,.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.ghb-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ghb-spin .7s linear infinite;
}
@keyframes ghb-spin { to { transform: rotate(360deg); } }

/* ── 成功 ────────────────────────────────────────── */
.success { padding:20px 0; animation:fadeIn .35s ease both; }
.success-title {
  font-family:'Bebas Neue',sans-serif; font-size:clamp(32px,7vw,48px);
  letter-spacing:.1em; line-height:1; color:var(--text); margin-bottom:6px;
}
.success-sub   { font-size:12px; color:var(--muted); margin-bottom:28px; }
.success-detail { border:1px solid var(--border); padding:0; max-width:420px; margin-bottom:14px; box-sizing:border-box; overflow:hidden; }
.success-detail table { width:100%; border-collapse:collapse; table-layout:fixed; margin-bottom:-1px; }
.success-detail td { padding:10px 14px; font-size:12px; border-bottom:1px solid var(--border); color:var(--text); word-break:break-all; }
.success-detail td:first-child { font-size:9px; letter-spacing:.15em; color:var(--muted); text-transform:uppercase; width:30%; }
.success-detail {
  border-bottom: 1px solid var(--text); /* 直接改容器底邊為白色 */
}
.ical-btn {
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--border); padding:8px 16px; color:var(--text);
  text-decoration:none; font-size:12px; letter-spacing:.08em;
  transition:border-color .2s; background:none; cursor:pointer;
}
.ical-btn:hover { border-color:var(--text); }
