/*
Theme Name: Trave Korea
Theme URI: https://github.com/hangoacademy-code/trave-korea
Author: Trave Korea
Description: Tema Trave Korea (Pin Pass) untuk tiket pulang kampung Korea–Indonesia. Desain, layout, dan alur dari aplikasi web Sprint 1–5 (+ NS-01 pembayaran): beranda & pencarian, hasil, pemesanan, pesanan, pembayaran (termasuk link bayar keluarga), chat, dan penumpang tersimpan. Tiga bahasa (ID/KO/EN). Berjalan dalam mode demo dengan data contoh, atau terhubung ke API Trave Korea lewat proxy aman di Penampilan → Sesuaikan → Trave Korea.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: Proprietary
Text Domain: trave-korea
*/

/* Design tokens (from @trave-korea/tokens) */
:root {
--tk-orange: #F07A2B;
--tk-orange-tint: #FDEBDD;
--tk-teal: #0E4F52;
--tk-teal-tint: #E3EFEE;
--tk-deep-sea: #08302F;
--tk-ink: #0B2E30;
--tk-ink-muted: #3D5658;
--tk-border: #C9DAD8;
--tk-divider: #D5E2E0;
--tk-mist: #F2F7F6;
--tk-white: #FFFFFF;
--tk-success: #1F9D6B;
--tk-warning-text: #B4481A;
--tk-radius-sm: 8px;
--tk-radius-md: 12px;
--tk-radius-lg: 16px;
--tk-radius-xl: 20px;
--tk-radius-pill: 999px;
--tk-font: 'Plus Jakarta Sans', 'Noto Sans KR', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--tk-font); color: var(--tk-ink); background: var(--tk-mist); -webkit-font-smoothing: antialiased; }
a { color: var(--tk-teal); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--tk-orange); outline-offset: 2px; }
[hidden] { display: none !important; }

.header { background: var(--tk-white); border-bottom: 1px solid var(--tk-divider); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tk-ink); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand-name { color: var(--tk-ink); }
.brand-name span { color: var(--tk-teal); }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav a { padding: 10px 14px; border-radius: 10px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--tk-ink-muted); }
.nav a.btn-primary { color: var(--tk-white); font-weight: 800; }
.nav a[aria-current="page"] { color: var(--tk-teal); background: var(--tk-teal-tint); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--tk-teal); color: var(--tk-white); }
.btn-primary:hover { background: var(--tk-deep-sea); }
.btn-primary:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: var(--tk-white); color: var(--tk-teal); border: 1px solid var(--tk-border); font-weight: 700; }
.select { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--tk-border); background: var(--tk-white); font: inherit; font-size: 14px; font-weight: 600; color: var(--tk-ink); }

.hero { background: var(--tk-teal); color: var(--tk-white); padding: 56px 0 112px; }
.hero h1 { margin: 12px 0; font-size: clamp(32px, 5vw, 48px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; max-width: 680px; }
.hero p { margin: 0; font-size: 18px; line-height: 1.5; color: #CFE3E2; max-width: 620px; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--tk-orange); color: var(--tk-ink); font-size: 13px; font-weight: 800; }

.card { background: var(--tk-white); border-radius: 20px; padding: 24px; box-shadow: 0 12px 32px rgba(8,48,47,.12); }
.search-card { margin-top: -72px; display: flex; flex-direction: column; gap: 18px; }
.search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field label, .field-label { font-size: 13px; font-weight: 700; color: var(--tk-ink-muted); }
.input { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--tk-border); font: inherit; font-size: 16px; font-weight: 600; color: var(--tk-ink); background: var(--tk-white); width: 100%; }
.input[aria-invalid="true"] { border-color: var(--tk-warning-text); }
#from { padding-right: 52px; }
.swap { position: absolute; right: -6px; bottom: 2px; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--tk-border); background: var(--tk-white); cursor: pointer; z-index: 1; }
.chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--tk-border); background: var(--tk-white); font: inherit; font-size: 14px; font-weight: 700; color: var(--tk-ink); cursor: pointer; }
.chip[aria-pressed="true"] { border: 2px solid var(--tk-orange); background: var(--tk-orange-tint); font-weight: 800; }
.error { color: var(--tk-warning-text); font-size: 14px; font-weight: 600; margin: 0; }
.muted { color: var(--tk-ink-muted); font-size: 14px; }

.footer { padding-top: 8px; padding-bottom: 40px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--tk-ink-muted); }

.narrow { max-width: 440px; margin: 48px auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.summary { padding: 14px 16px; border-radius: 12px; background: var(--tk-mist); }
.status-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--tk-teal-tint); color: var(--tk-teal); font-size: 13px; font-weight: 800; }

/* Results, booking, orders */
.wide { max-width: 720px; margin: 32px auto; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--tk-teal-tint); border-radius: 14px; }
.tab { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--tk-teal); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--tk-teal); color: var(--tk-white); font-weight: 800; }
.option { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--tk-white); border: 1px solid var(--tk-divider); border-radius: 16px; text-decoration: none; color: var(--tk-ink); }
a.option:hover, a.option:focus-visible { border-color: var(--tk-teal); }
.option.top { border: 2px solid var(--tk-teal); }
.option-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.time { font-size: 20px; font-weight: 800; }
.price { font-size: 19px; font-weight: 800; text-align: right; }
.label { padding: 4px 8px; border-radius: 999px; background: var(--tk-teal-tint); color: var(--tk-teal); font-size: 12px; font-weight: 800; }
.label.cheapest { background: var(--tk-orange-tint); color: var(--tk-ink); }
.line { flex: 1; height: 2px; background: var(--tk-border); }
.check { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--tk-border); border-radius: 12px; background: var(--tk-white); cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; accent-color: var(--tk-teal); }
.warn { padding: 12px 14px; border-radius: 12px; background: var(--tk-orange-tint); color: var(--tk-ink); font-size: 14px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); margin: 0; font-size: 15px; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--tk-teal-tint); }
.kv dt { color: var(--tk-ink-muted); padding-right: 12px; }
.kv dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.kv .sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--tk-ink-muted); }

/* Chat */
.chat { max-width: 720px; margin: 24px auto; background: var(--tk-white); border-radius: 20px; border: 1px solid var(--tk-divider); display: flex; flex-direction: column; height: min(78vh, 760px); }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--tk-divider); display: flex; align-items: center; gap: 12px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--tk-mist); }
.msg { max-width: 82%; display: flex; flex-direction: column; gap: 4px; }
.msg.me { align-self: flex-end; }
.msg .from { font-size: 11px; font-weight: 700; color: var(--tk-ink-muted); }
.msg .b { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--tk-white); border: 1px solid var(--tk-divider); font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.msg.me .b { border-radius: 16px 16px 4px 16px; background: var(--tk-teal); color: var(--tk-white); border: 0; }
.msg.system .b { background: var(--tk-orange-tint); border: 0; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--tk-divider); }
.chat-form input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--tk-border); font: inherit; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; }

/* Theme-only additions */
.tk-demo { background: var(--tk-orange-tint); color: var(--tk-ink); font-size: 13px; font-weight: 600; padding: 8px 0; border-bottom: 1px solid var(--tk-border); }
.tk-demo .container { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.tk-demo button { border: 0; background: transparent; color: var(--tk-teal); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 0; }
.entry { max-width: 760px; }
.entry h1 { margin-top: 0; font-size: 28px; letter-spacing: -0.02em; }
.entry h2 { font-size: 20px; }
.entry p, .entry li { line-height: 1.6; }
.pay-copy { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
code { background: var(--tk-mist); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .header-inner { gap: 8px; padding-top: 10px; padding-bottom: 8px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a, .nav .btn { flex: none; white-space: nowrap; }
  .nav .select { flex: none; max-width: 150px; }
  .chat { margin: 12px auto; height: calc(100dvh - 150px); border-radius: 16px; }
}
