/* ฟอร์มจองรถรับส่งสนามบิน (transfer.php · สาธารณะ) — แบบที่ผู้ใช้ส่งมา 30/11/2026: ครีม + แดงเลือดหมู + ทอง · บัตรสรุปแบบตั๋ว */
:root {
  color-scheme: light;
  --bg: #F9F4EC;
  --surface: #FFFFFF;
  --line: #EADFD2;
  --line-strong: #DCCDBB;
  --ink: #2B2420;
  --ink-2: #4A403A;
  --muted: #776B62;
  --faint: #B3A79C;
  --wine: #8A3934;
  --wine-dk: #722C28;
  --wine-soft: #F7EEEA;
  --rose: #FBE8E6;
  --gold: #D4B07F;
  --gold-dk: #C49C66;
  --gold-ink: #3B2A1A;
  --bad: #B42318;
  --warn: #93370D;
  --warn-soft: #FFF6E5;
  --display: 'Marcellus', 'Noto Serif Thai', Georgia, serif;
  --font: 'Figtree', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }

.tf { max-width: 1112px; margin: 0 auto; padding: 40px 24px 64px; }
.tf-embed .tf { padding: 8px 4px 24px; }
.tf-noscript { background: var(--surface); padding: 20px; border-radius: 12px; }

/* ── หัว ── */
.tf-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tf-hotel { font-family: var(--display); color: var(--ink-2); font-size: 16px; }
.tf-lang { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; }
.tf-lang:hover { border-color: var(--wine); color: var(--wine); }
.tf-route { display: flex; align-items: center; gap: 20px; margin: 14px 0 18px; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 5.2vw, 58px); line-height: 1.1; color: var(--wine); }
.tf-route span { flex: none; }
.tf-dash { flex: 1; position: relative; height: 0; border-top: 2px dashed #CDBFAE; min-width: 40px; }
.tf-dash::after { content: ''; position: absolute; right: -5px; top: -7px; width: 12px; height: 12px; border-radius: 50%; background: #B9A794; }
.tf-intro { margin: 0 0 30px; max-width: 590px; color: var(--ink-2); font-size: 16px; }

/* ── เลย์เอาต์ 2 คอลัมน์ ── */
.tf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "main side" "after side"; column-gap: 32px; align-items: start; }
.tf-main { grid-area: main; min-width: 0; }
.tf-after { grid-area: after; min-width: 0; }
.tf-side { grid-area: side; align-self: stretch; }
.tf-ticket { position: sticky; top: 24px; }
.tf-embed .tf-ticket { position: relative; top: 0; transition: transform .12s ease-out; }

/* ── การ์ดส่วน ── */
.tf-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px 26px; margin-bottom: 18px; }
.tf-sec h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 25px; color: var(--ink); }
.tf-num { flex: none; width: 26px; height: 26px; border: 1.5px solid var(--wine); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font); font-size: 13px; color: var(--ink); }
.tf-sec-d { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.tf-sec-d b { color: var(--ink); }
.tf-q { margin: 6px 0 14px; color: var(--ink-2); font-size: 14.5px; }
.tf-star { color: var(--bad); margin-left: 2px; }

/* การ์ดตัวเลือก */
.tf-cards { display: grid; gap: 12px; }
.tf-cards.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tf-cards.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tf-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 16px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.tf-card:hover { border-color: var(--wine); }
.tf-card input { position: absolute; opacity: 0; pointer-events: none; }
.tf-card:has(input:checked) { border: 2px solid var(--wine); padding: 15px; background: var(--wine-soft); }
.tf-card:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(138, 57, 52, .22); }
.tf-card-t { font-weight: 500; font-size: 15.5px; color: var(--ink); }
.tf-card-d { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.tf-card-d b { color: var(--ink); font-weight: 600; }
.tf-card-p { margin-top: 10px; font-weight: 700; color: var(--wine); font-size: 15px; }
.tf-cards.bad .tf-card { border-color: var(--bad); }

.tf-note { margin: 18px 0 0; padding: 12px 16px; background: var(--rose); border-left: 3px solid var(--wine); border-radius: 6px; color: var(--wine-dk); font-size: 14px; }

/* ช่องกรอก */
.tf-grid { display: grid; gap: 14px 18px; margin-top: 18px; }
.tf-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tf-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tf-grid .full { grid-column: 1 / -1; }
.tf-field { display: flex; flex-direction: column; min-width: 0; margin-top: 16px; }
.tf-grid .tf-field, .tf-field-wrap .tf-field { margin-top: 0; }
.tf-lbl { font-weight: 500; font-size: 14.5px; color: var(--ink); margin-bottom: 8px; }
.tf-h { color: var(--muted); font-weight: 400; }
.tf-desc { margin: -4px 0 10px; color: var(--muted); font-size: 14px; }
.tf-field input[type=text], .tf-field input[type=email], .tf-field input[type=tel], .tf-field input[type=date], .tf-field input[type=time], .tf-field select, .tf-field textarea {
  width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 15px;
}
.tf-field textarea { resize: vertical; min-height: 96px; }
.tf-field ::placeholder { color: var(--faint); }
.tf-field input:focus, .tf-field select:focus, .tf-field textarea:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(138, 57, 52, .15); }
.tf-field .bad { border-color: var(--bad) !important; }

/* ตัวนับ */
.tf-count { display: inline-flex; align-items: stretch; width: 126px; height: 46px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); overflow: hidden; }
.tf-count:focus-within { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(138, 57, 52, .15); }
.tf-count button { width: 40px; border: 0; background: none; font-size: 18px; color: var(--wine); cursor: pointer; }
.tf-count button:hover:not(:disabled) { background: var(--wine-soft); }
.tf-count button:disabled { color: #D9CFC6; cursor: default; }
.tf-count input { flex: 1; min-width: 0; width: 40px; border: 0; text-align: center; font-size: 16px; color: var(--ink); background: none; -moz-appearance: textfield; }
.tf-count input:focus { outline: none; }
.tf-count input::-webkit-inner-spin-button, .tf-count input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tf-small { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; }

.tf-ferr { color: var(--bad); font-size: 13px; margin-top: 5px; }
.tf-ferr:empty { display: none; }
.tf-msgs:empty { display: none; }
.tf-msgs { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tf-msg { padding: 11px 15px; border-radius: 6px; font-size: 14px; border-left: 3px solid; }
.tf-msg.err { background: #FEF1F0; color: var(--bad); border-color: var(--bad); }
.tf-msg.warn { background: var(--warn-soft); color: var(--warn); border-color: #E59A3A; }

/* เที่ยวบิน */
.tf-leg + .tf-leg { margin-top: 26px; }
.tf-sub { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; font-weight: 500; font-size: 15px; color: var(--wine); }
.tf-sub::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* การจองห้อง / ไฟล์ */
.tf-res-row { display: flex; align-items: center; gap: 12px; }
.tf-res-row input[type=text] { flex: 1; }
.tf-or { color: var(--muted); font-size: 14px; }
.tf-upload { position: relative; flex: none; display: inline-flex; align-items: center; height: 46px; padding: 0 16px; border: 1.5px dashed var(--wine); border-radius: 8px; color: var(--wine); font-weight: 600; cursor: pointer; background: var(--surface); }
.tf-upload:hover { background: var(--wine-soft); }
.tf-upload:focus-within { box-shadow: 0 0 0 3px rgba(138, 57, 52, .2); }
.tf-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tf-file { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 8px 12px; background: var(--wine-soft); border-radius: 8px; font-size: 14px; }
#tfFileName { overflow-wrap: anywhere; color: var(--ink-2); }
.tf-link { border: 0; background: none; color: var(--wine); font-size: 14px; cursor: pointer; padding: 0; text-decoration: underline; }

/* ยอมรับเงื่อนไข */
.tf-agree { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; color: var(--ink-2); font-size: 15px; }
.tf-agree + .tf-ferr + .tf-agree { margin-top: 12px; }
.tf-agree input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--wine); }
.tf-agree.bad { border-color: var(--bad); }

.tf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* จุดนัดพบ */
.tf-meet h2 { font-size: 24px; }
.tf-gates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 4px 0 18px; }
.tf-gates > div { border-left: 3px solid var(--gold); padding: 4px 0 4px 14px; display: grid; gap: 6px; }
.tf-gates b { font-weight: 600; }
.tf-gates span { color: var(--muted); font-size: 14px; }
.tf-gate { color: var(--wine); }
.tf-meet-p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.tf-meet-p b { color: var(--ink); }

/* ── บัตรสรุปแบบตั๋ว ── */
.tf-ticket { background: var(--wine); color: #fff; border-radius: 16px; padding: 22px 22px 22px; box-shadow: 0 18px 40px -18px rgba(90, 30, 26, .5); }
.tf-tk-route { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.tf-tk-route small { display: block; font-size: 12px; color: rgba(255, 255, 255, .8); }
.tf-tk-route b { display: block; font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.1; letter-spacing: .02em; }
.tf-tk-route .r { text-align: right; }
.tf-tk-arrow { font-size: 22px; color: rgba(255, 255, 255, .65); padding-bottom: 6px; }
.tf-tk-perf { position: relative; margin: 22px -22px 16px; border-top: 2px dashed rgba(255, 255, 255, .35); }
.tf-tk-perf::before, .tf-tk-perf::after { content: ''; position: absolute; top: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); }
.tf-tk-perf::before { left: -9px; }
.tf-tk-perf::after { right: -9px; }
.tf-tk-rows { display: grid; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.tf-tk-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.tf-tk-row span:first-child { color: rgba(255, 255, 255, .78); }
.tf-tk-row span:last-child { text-align: right; }
.tf-tk-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; }
.tf-tk-total span { font-size: 15px; }
.tf-tk-total b { font-size: 25px; font-weight: 700; }
.tf-tk-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: rgba(255, 255, 255, .78); }
.tf-privacy { font-size: 11.5px; color: rgba(255, 255, 255, .7); }
.tf-privacy a { color: #fff; text-decoration: underline; }
.tf-tk-err:empty { display: none; }
.tf-tk-err { margin-top: 14px; padding: 9px 12px; border-radius: 8px; background: #fff; color: var(--bad); font-size: 13.5px; }
.tf-submit { display: block; width: 100%; margin-top: 20px; height: 52px; border: 0; border-radius: 10px; background: var(--gold); color: var(--gold-ink); font-size: 16px; font-weight: 600; cursor: pointer; transition: background .15s; }
.tf-submit:hover { background: var(--gold-dk); }
.tf-submit:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tf-submit:disabled { opacity: .7; cursor: wait; }

/* ── ส่งแล้ว ── */
.tf-done { max-width: 640px; text-align: center; padding: 44px 24px; }
.tf-done h2 { justify-content: center; }
.tf-done-mark { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; background: var(--wine-soft); color: var(--wine); font-size: 28px; line-height: 60px; }
.tf-done p { color: var(--ink-2); margin: 0 0 10px; }
.tf-ref b { font-size: 19px; color: var(--wine); letter-spacing: .03em; }

/* ── มือถือ / แท็บเล็ต: บัตรสรุปอยู่ใต้ฟอร์ม ก่อนจุดนัดพบ ── */
@media (max-width: 959px) {
  .tf-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "after"; }
  .tf-ticket, .tf-embed .tf-ticket { position: static; transform: none !important; margin-bottom: 18px; }
}
@media (max-width: 640px) {
  .tf { padding: 24px 16px 40px; }
  .tf-route { gap: 10px; font-size: clamp(22px, 7vw, 30px); }
  .tf-dash { min-width: 16px; }
  .tf-sec { padding: 20px 16px; }
  .tf-sec h2 { font-size: 22px; }
  .tf-cards.c3, .tf-cards.c2 { grid-template-columns: minmax(0, 1fr); }
  .tf-grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-grid.g2 { grid-template-columns: minmax(0, 1fr); }
  .tf-count { width: 100%; max-width: 160px; }
  .tf-res-row { flex-wrap: wrap; }
  .tf-res-row input[type=text] { flex-basis: 100%; }
  .tf-gates { grid-template-columns: minmax(0, 1fr); }
}
