/* MAX JETS Mini App — light, Apple-style; colours from the MAX JETS boarding pass (black, gold, cream). */
:root {
  --page: #f5f5f7; --card: #ffffff; --ink: #1d1d1f; --muted: #6e6e73; --hair: #e5e5ea; --fill: #f2f2f4;
  --gold: #e2a321; --gold-ink: #9a6b0e; --cream: #f6f1e6; --black: #111111; --err: #d70015;
  --r: 20px; --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font: inherit; color: var(--ink); }
.muted { color: var(--muted); }

.screen { display: none; padding: 0 16px calc(32px + var(--safe-b)); animation: fadein .3s ease both; } /* opacity only: a transform here would break the fixed bottom bar */
@keyframes fadein { from { opacity: 0; } }
.screen.active { display: block; }
.screen.with-bar { padding-bottom: calc(110px + var(--safe-b)); }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.top { display: flex; justify-content: center; padding: 14px 0 6px; }
.logo { height: 34px; width: auto; }
.hello { margin: 18px 4px 0; color: var(--muted); font-size: 15px; }
.large { font-size: 32px; line-height: 1.12; font-weight: 700; letter-spacing: -.02em; margin: 4px 4px 18px; }

/* Uber-like "Where to?" */
.whereto { width: 100%; display: flex; align-items: center; gap: 12px; padding: 18px 18px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); font-size: 18px; font-weight: 600; text-align: left; transition: transform .15s; }
.whereto:active { transform: scale(.985); }
.whereto .dot { width: 10px; height: 10px; border-radius: 2px; background: var(--black); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #e9e9ee; border-radius: 10px; padding: 3px; margin: 14px 0; }
.seg button { padding: 8px 6px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink); transition: background .2s, box-shadow .2s; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.seg.big button { padding: 10px 6px; font-size: 15px; }
.seg.small { margin: 0 0 12px; }

.sechead { display: flex; justify-content: space-between; align-items: baseline; margin: 30px 4px 10px; }
.sechead h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 12px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.skeleton { flex: 0 0 78%; height: 250px; border-radius: var(--r); background: linear-gradient(90deg, #fff, #eeeef1, #fff); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.leg { flex: 0 0 78%; scroll-snap-align: start; border-radius: var(--r); overflow: hidden; background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .15s; animation: in .4s ease both; }
.leg:active { transform: scale(.98); }
.leg .pic { aspect-ratio: 2 / 1; background: #fff center top / 100% auto no-repeat; position: relative; } /* top 28% of the poster: plane + cities, no pill */
.leg .pic.ga { background: #fff url(img/side-light.jpg?v=2) center / 92% auto no-repeat; }
.leg .badge { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 99px; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); }
.leg .info { padding: 12px 14px 14px; }
.leg .rt { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg .meta { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg .pr { margin-top: 8px; display: flex; gap: 8px; align-items: baseline; } .leg .pr b { font-size: 19px; } .leg .pr s { color: var(--muted); font-size: 13px; }
.leg .pr .off { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--gold-ink); background: var(--cream); padding: 3px 8px; border-radius: 99px; }
.empty { color: var(--muted); padding: 10px 4px; }

.fleet .jetc { flex: 0 0 46%; scroll-snap-align: start; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .15s; }
.fleet .jetc:active { transform: scale(.97); }
.jetc .pic { height: 92px; background: #fff center / 100% auto no-repeat; }
.jetc .info { padding: 10px 12px 12px; } .jetc b { font-size: 15px; display: block; } .jetc small { color: var(--muted); font-size: 12px; }
.foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 26px; }

/* grouped form, iOS settings style */
.group { position: relative; background: var(--card); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.glabel { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.hair { height: 1px; background: var(--hair); margin: 2px 0 2px 26px; }
.route-group { padding: 6px 14px; z-index: 10; }
.field { position: relative; display: flex; align-items: center; gap: 12px; }
.field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 14px 44px 14px 0; font-size: 17px; }
.field input.picked { font-weight: 600; }
.pin { flex: 0 0 auto; width: 10px; height: 10px; }
.pin.from { border-radius: 50%; border: 2.5px solid var(--black); }
.pin.to { border-radius: 2px; background: var(--gold); }
.code { position: absolute; right: 44px; font-size: 13px; font-weight: 700; color: var(--gold-ink); background: var(--cream); padding: 3px 7px; border-radius: 6px; }
.code:empty { display: none; }
.swap { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--fill); font-size: 15px; transition: transform .3s; }
.swap.spin { transform: translateY(-50%) rotate(180deg); }
.sug { position: absolute; left: -14px; right: -14px; top: calc(100% + 2px); z-index: 5; background: var(--card); border-radius: 14px; overflow: hidden; display: none; box-shadow: 0 16px 40px rgba(0,0,0,.16); }
.sug.open { display: block; animation: in .18s ease both; }
.sug button { display: flex; width: 100%; padding: 12px 14px; gap: 12px; align-items: center; text-align: left; border-bottom: 1px solid var(--hair); }
.sug button:last-child { border-bottom: 0; }
.sug .ic { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--gold-ink); }
.sug .nm { flex: 1; min-width: 0; font-weight: 600; } .sug .nm small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.switchrow { display: flex; justify-content: space-between; align-items: center; background: var(--card); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 99px; background: #e9e9ea; position: relative; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch:checked { background: var(--gold); } .switch:checked::after { transform: translateX(20px); }

.dates { display: grid; gap: 0; }
.drow { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; gap: 10px; }
.drow + .drow { border-top: 1px solid var(--hair); }
.drow span { font-size: 16px; }
.drow input { border: 0; background: var(--fill); border-radius: 8px; padding: 7px 10px; font-size: 15px; min-width: 0; max-width: 60%; color-scheme: light; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; background: var(--fill); font-size: 20px; line-height: 1; transition: transform .1s; }
.stepper button:active { transform: scale(.88); }
.stepper b { min-width: 22px; text-align: center; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 8px 13px; border-radius: 99px; background: var(--fill); font-size: 14px; transition: all .2s; }
.chips button.on { background: var(--black); color: #fff; }
/* budget slider (iOS style) */
.budget { padding: 2px 2px 0; }
.bval { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 12px; }
.budget input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; --p: 100%; }
.budget input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--gold) 0 var(--p), #e5e5ea var(--p) 100%); }
.budget input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--gold) 0 var(--p), #e5e5ea var(--p) 100%); }
.budget input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 .5px rgba(0,0,0,.05); }
.budget input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.bticks { display: flex; justify-content: space-between; margin-top: 6px; }
.bticks span { font-size: 11px; color: #aeaeb2; width: 0; display: flex; justify-content: center; white-space: nowrap; transition: color .2s; }
.bticks span:first-child { justify-content: flex-start; } .bticks span:last-child { justify-content: flex-end; }
.bticks span.on { color: var(--ink); font-weight: 600; }
.bhint { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--cream); font-size: 13px; color: var(--gold-ink); }
.bhint span { min-width: 0; } .bhint .ball { flex: 0 0 auto; padding: 7px 11px; border-radius: 99px; background: var(--black); color: #fff; font-size: 13px; font-weight: 600; }
.bhint.all { background: #e9f8ee; color: #1f7a3a; } .bhint.all .ball { display: none; }
textarea { width: 100%; border: 0; outline: none; background: var(--fill); border-radius: 10px; padding: 10px 12px; resize: none; }
.err { color: var(--err); min-height: 18px; font-size: 14px; margin: 4px; }

/* Uber-style aircraft list: picture | name + details | price — fixed columns, nothing can overlap */
.crumb { margin: 18px 4px 0; color: var(--muted); font-size: 14px; }
.jetlist { display: grid; gap: 10px; margin-bottom: 10px; }
.jet { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 10px 14px 10px 10px; background: var(--card);
  border: 2px solid transparent; border-radius: 16px; text-align: left; transition: border-color .2s, box-shadow .2s; animation: in .35s ease both; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.jet .pic { width: 80px; height: 56px; border-radius: 10px; background: #fff center / 118% auto no-repeat; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.jet.on { border-color: var(--black); box-shadow: var(--shadow); }
.jet.on .pic { transform: scale(1.06); }
.jet .txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jet .txt > b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jet .line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pax { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 5px; border-radius: 99px; background: var(--fill); font-size: 12px; font-weight: 600; color: var(--ink); line-height: 16px; }
.pax svg { width: 12px; height: 12px; fill: currentColor; }
.jet small { display: block; color: var(--muted); font-size: 13px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jet .tag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--gold-ink); background: var(--cream); padding: 2px 7px; border-radius: 99px; }
.jet .price { text-align: right; min-width: 0; } .jet .price b { display: block; font-size: 17px; font-weight: 700; white-space: nowrap; } .jet .price small { font-size: 12px; }
.jet[disabled] { opacity: .38; }
.hint { color: var(--muted); font-size: 13px; margin: 0 4px 16px; }

/* bottom action bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 12px 16px calc(12px + var(--safe-b)); background: rgba(245,245,247,.86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid rgba(0,0,0,.05); }
.cta { width: 100%; padding: 16px; border-radius: 14px; background: var(--black); color: #fff; font-weight: 600; font-size: 17px; transition: transform .15s, opacity .2s; }
.cta:active { transform: scale(.98); } .cta[disabled] { opacity: .5; }
.cta .g { color: var(--gold); }

/* done */
.donebox { text-align: center; padding-top: 9vh; }
.check { width: 84px; height: 84px; }
.check circle { fill: none; stroke: #34c759; stroke-width: 3; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .7s ease forwards; }
.check path { fill: none; stroke: #34c759; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.donebox h1 { font-size: 28px; margin: 14px 0 6px; letter-spacing: -.02em; }
.donebox p { margin: 0 12px 20px; }
.summary { text-align: left; padding: 4px 16px; margin-bottom: 20px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 15px; } .summary div + div { border-top: 1px solid var(--hair); }
.summary span { color: var(--muted); } .summary b { font-weight: 600; text-align: right; }

/* leg sheet */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.32); display: none; align-items: flex-end; }
.sheet.open { display: flex; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheetbox { width: 100%; max-height: 92vh; overflow-y: auto; background: var(--page); border-radius: 14px 14px 0 0; padding: 8px 16px calc(20px + var(--safe-b)); animation: up .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes up { from { transform: translateY(100%); } }
.grab { width: 36px; height: 5px; border-radius: 5px; background: #c7c7cc; margin: 2px auto 12px; }
.sheetbox img.poster { width: 100%; border-radius: 16px; display: block; margin-bottom: 14px; box-shadow: var(--shadow); }
.sheetbox h3 { margin: 0 4px 2px; font-size: 22px; letter-spacing: -.01em; }
.sheetbox .meta { margin: 0 4px 10px; color: var(--muted); font-size: 14px; }
.sheetbox .pr { margin: 0 4px 14px; } .sheetbox .pr b { font-size: 26px; } .sheetbox .pr s { color: var(--muted); margin-left: 8px; }

.only-watch, .only-charter { display: none; }
#trip.watch .only-watch { display: block; } #trip.watch .switchrow.only-watch { display: flex; }
#trip.charter .only-charter { display: grid; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
