/* =====================================================================
   舒適字級 Comfort Type Scale
   只放大原本 <=14px 的小字；標題、金額數字、主要按鈕維持既有層級，
   並在放大同時增加行高與區塊留白，避免頁面變得擁擠。
   切換狀態由 comfort-font.js 寫入 <html data-fs="...">
   ===================================================================== */

html { -webkit-text-size-adjust: 100%; }

/* 表單輸入固定 16px：避免 iOS 聚焦時自動縮放，同時提升可讀性 */
input, select, textarea { font-size: 16px !important; }

/* ---------- 舒適（預設）---------- */
html[data-fs="comfort"] .text-\[9px\]  { font-size: 11px   !important; }
html[data-fs="comfort"] .text-\[10px\] { font-size: 12px   !important; }
html[data-fs="comfort"] .text-\[11px\] { font-size: 13px   !important; }
html[data-fs="comfort"] .text-xs       { font-size: 13.5px !important; }
html[data-fs="comfort"] .text-sm       { font-size: 15px   !important; }

/* ---------- 放大（需要更大字體時）---------- */
html[data-fs="large"] .text-\[9px\]  { font-size: 12px   !important; }
html[data-fs="large"] .text-\[10px\] { font-size: 13px   !important; }
html[data-fs="large"] .text-\[11px\] { font-size: 14px   !important; }
html[data-fs="large"] .text-xs       { font-size: 15px   !important; }
html[data-fs="large"] .text-sm       { font-size: 16px   !important; }
html[data-fs="large"] .text-base     { font-size: 17px   !important; }

/* 小字放大後給足夠行高，才不會擠在一起 */
html[data-fs="comfort"] .text-\[9px\],
html[data-fs="comfort"] .text-\[10px\],
html[data-fs="comfort"] .text-\[11px\],
html[data-fs="comfort"] .text-xs,
html[data-fs="large"] .text-\[9px\],
html[data-fs="large"] .text-\[10px\],
html[data-fs="large"] .text-\[11px\],
html[data-fs="large"] .text-xs { line-height: 1.5; }

/* 主要區塊之間多留一點呼吸，字變大也不顯得滿 */
html[data-fs="comfort"] #bookingForm.space-y-4 > * + *,
html[data-fs="large"]   #bookingForm.space-y-4 > * + * { margin-top: 1.5rem !important; }

html[data-fs="comfort"] body > .max-w-md.space-y-4 > * + *,
html[data-fs="large"]   body > .max-w-md.space-y-4 > * + * { margin-top: 1.35rem !important; }

/* 快速導覽的副標改為可換行，放大後不再被截斷 */
html[data-fs="comfort"] a[href="michelin.html"] .truncate,
html[data-fs="comfort"] a[href="tour.html"] .truncate,
html[data-fs="large"]   a[href="michelin.html"] .truncate,
html[data-fs="large"]   a[href="tour.html"] .truncate {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* =====================================================================
   字體大小：頁面內入口 + 置中彈窗
   全部都在正常文件流／覆蓋層，不使用 fixed 膠囊，不會壓到底部結算列
   ===================================================================== */

/* 「我的預約」有進行中訂單時的強調態（不依賴 Tailwind 即時產生新 class） */
#myBookingPill.is-active { border-color: #34d399; background: #052e2b; }
#myBookingPill .pill-sub.is-active { color: #6ee7b7; font-weight: 700; }

/* 沒有手寫入口的頁面（tour / michelin / driver）自動補的按鈕 */
.fs-entry-wrap { max-width: 32rem; margin: 0 auto; padding: 12px 16px 0; }
.fs-entry-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .5);
  background: rgba(255, 255, 255, .9);
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.fs-entry-btn:active { transform: scale(.98); }
.fs-entry-aa { font-size: 18px; font-weight: 900; color: #b45309; line-height: 1; }
.fs-entry-label { line-height: 1.2; }
.fs-entry-mode { font-size: 12px; font-weight: 600; color: #64748b; }

/* 置中設定彈窗 */
.fs-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 23, .82);
  backdrop-filter: blur(6px);
}
.fs-modal[hidden] { display: none !important; }
.fs-modal-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.fs-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fs-modal-title { font-size: 20px; font-weight: 900; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.fs-modal-close {
  width: 36px; height: 36px; border-radius: 12px; border: none;
  background: #f1f5f9; color: #475569; font-size: 22px; line-height: 1; cursor: pointer;
}
.fs-modal-desc { font-size: 14px; color: #64748b; line-height: 1.6; margin: 8px 0 14px; }
.fs-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  margin-top: 8px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}
.fs-option:hover { background: #f1f5f9; }
.fs-option[aria-checked="true"] { border-color: #d97706; background: #fffbeb; }
.fs-option-name { display: block; font-size: 17px; font-weight: 900; }
.fs-option-desc { display: block; font-size: 13px; color: #64748b; line-height: 1.5; margin-top: 2px; }
.fs-option-check { width: 20px; text-align: center; font-size: 18px; font-weight: 900; color: #b45309; }
.fs-modal-foot {
  font-size: 13px; color: #94a3b8; line-height: 1.6;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2e8f0;
}
