/* CarryAir passenger app. Bright, quiet, one accent (the airline's colour). Logical properties throughout, so RTL needs no overrides. */
:root {
  --primary: #0B5FFF; --ink: #0A1B3D;
  --paper: #FFFFFF; --mist: #F3F5F8; --line: #E3E7ED; --slate: #566074;
  --ok: #0B8A47; --warn: #A66300; --bad: #D0343A;
  --tint: color-mix(in srgb, var(--primary) 9%, #fff);
  --r-lg: 22px; --r-md: 14px;
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
#app { max-width: 460px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }
main { flex: 1; padding: 4px 22px 20px; display: flex; flex-direction: column; gap: 18px; }
main > section { display: flex; flex-direction: column; }
footer { text-align: center; color: #7A8496; font-size: 12px; padding: 4px 16px 14px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, #fff); outline-offset: 2px; border-radius: 10px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num, bdi.num { font-variant-numeric: tabular-nums; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; gap: 8px; }
.brand { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.mark { width: 20px; height: 20px; border-radius: 6px; background: var(--primary); }
.iconbtn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.iconbtn svg { width: 24px; height: 24px; stroke-width: 2.2; }
.iconbtn.ghost { visibility: hidden; }
[dir=rtl] .iconbtn svg, [dir=rtl] .chev svg { transform: scaleX(-1); }
select { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 9px 14px; font: 600 13px/1 var(--font); color: var(--ink); min-height: 40px; }

/* type */
h1 { font-size: 31px; line-height: 1.14; font-weight: 800; letter-spacing: -0.022em; margin: 0 0 10px; text-wrap: balance; }
h2 { font-size: 25px; line-height: 1.2; font-weight: 800; letter-spacing: -0.018em; margin: 4px 0 0; text-wrap: balance; }
h3 { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
h3.quiet { color: var(--slate); font-weight: 600; margin-top: 16px; }
[lang=he] h1, [lang=he] h2 { letter-spacing: 0; }
.hero { padding-top: 10px; } .hero p { color: var(--slate); margin: 0; font-size: 17px; }
.lead { color: var(--slate); margin: 0; } .lead.small { font-size: 14.5px; }
.fine { color: var(--slate); font-size: 12.5px; line-height: 1.45; text-align: center; margin: 0; } .fine.start { text-align: start; }
.fine.demo { color: var(--warn); }
small { color: var(--slate); font-size: 13.5px; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: start; }

/* home: boarding-pass strip + allowances */
.pass { background: var(--mist); border-radius: var(--r-lg); padding: 18px 20px 16px; position: relative; }
.route { display: flex; align-items: center; gap: 14px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.route .line { flex: 1; height: 0; border-top: 2px dashed #C3CAD6; }
.meta { display: flex; justify-content: space-between; color: var(--slate); font-size: 13.5px; margin-top: 8px; }
.farechip { align-self: flex-start; margin-top: 14px; background: var(--ink); color: #fff; font-weight: 700; font-size: 12.5px; padding: 5px 11px; border-radius: 99px; }
.baglist { list-style: none; margin: 0; padding: 0; }
.bagrow { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.bagrow b { font-weight: 700; }
.bagrow.muted { color: var(--slate); } .bagrow.muted b { font-weight: 600; } .bagrow.muted .bagico { background: var(--mist); color: #8792A5; }
.bagico { width: 42px; height: 42px; border-radius: 12px; background: var(--tint); color: var(--primary); display: grid; place-items: center; flex: none; }
.bagico svg { width: 24px; height: 24px; }

/* actions */
.dock { position: sticky; bottom: 0; z-index: 5; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255,255,255,0), #fff 22%); display: flex; flex-direction: column; gap: 8px; }
.cta { display: block; width: 100%; text-align: center; border: 0; border-radius: 16px; min-height: 56px; padding: 16px 18px; font: 700 17px/1.35 var(--font); color: #fff; background: var(--primary); cursor: pointer; transition: transform .12s ease, filter .12s ease; }
.cta:active { transform: scale(.985); filter: brightness(.94); }
.cta:disabled { opacity: .45; }
.ghostbtn { border: 1.5px solid var(--line); background: var(--paper); border-radius: 16px; min-height: 56px; padding: 14px; font: 700 16px/1.2 var(--font); color: var(--ink); cursor: pointer; flex: 1; }
.link { background: none; border: 0; color: var(--primary); font: 600 15px/1.3 var(--font); padding: 12px 8px; min-height: 44px; cursor: pointer; align-self: center; }
.two { display: flex; gap: 10px; } .two .cta { flex: 1.5; }

/* method choice */
.choice { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s; }
.choice:active { border-color: var(--primary); }
.choice b { font-size: 17px; font-weight: 700; line-height: 1.3; }
.choice .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--tint); color: var(--primary); display: grid; place-items: center; flex: none; }
.choice .ico svg { width: 26px; height: 26px; }
.tagline { color: var(--ok); font-size: 12.5px; font-weight: 700; }
.chev { color: #9AA4B5; display: grid; } .chev svg { width: 22px; height: 22px; }

/* progress + guidance */
.steps { display: flex; gap: 6px; } .steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); } .steps i.on { background: var(--primary); }
.illus { height: 200px; border-radius: var(--r-lg); background: linear-gradient(180deg, var(--mist) 0 74%, #E4E8EE 74%); display: grid; place-items: end center; padding-bottom: 24px; }
.bagshape { width: 104px; height: 142px; border-radius: 14px; background: var(--ink); position: relative; }
.bagshape::before { content: ""; position: absolute; top: -14px; left: 32px; right: 32px; height: 14px; border: 4px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; }
.bagshape::after { content: ""; position: absolute; bottom: -7px; left: 14px; right: 14px; height: 7px; background: radial-gradient(circle at 5px 2px, var(--ink) 5px, transparent 5.5px) left / 50% 100% no-repeat, radial-gradient(circle at calc(100% - 5px) 2px, var(--ink) 5px, transparent 5.5px) right / 50% 100% no-repeat; }
.illus.side .bagshape { width: 54px; } .illus.side .bagshape::before { left: 14px; right: 14px; } .illus.side .bagshape::after { left: 6px; right: 6px; }
.sheet { position: absolute; left: 50%; top: 50%; width: 46px; height: 65px; transform: translate(-50%, -50%) rotate(3deg); background: #fff; border-radius: 2px; box-shadow: 0 0 0 3px var(--primary); }
.illus.side .sheet { width: 33px; height: 46px; }
.illus.card .sheet { width: 40px; height: 25px; border-radius: 4px; background: #DCE3EE; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tips li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; line-height: 1.4; }
.tick { width: 24px; height: 24px; border-radius: 50%; background: var(--tint); color: var(--primary); display: grid; place-items: center; flex: none; } .tick svg { width: 15px; height: 15px; stroke-width: 2.6; }
.notice { margin: 0; background: #FFF4DD; color: #6B4300; border-radius: var(--r-md); padding: 12px 14px; font-size: 14.5px; font-weight: 600; }
.busy { flex: 1; display: grid; place-content: center; justify-items: center; gap: 16px; min-height: 55dvh; color: var(--slate); font-weight: 600; } .busy p { margin: 0; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3.5px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* outline editor */
.stage { position: relative; margin: 0 auto; width: 100%; border-radius: var(--r-md); overflow: hidden; background: #000; touch-action: none; }
.stage .photo { width: 100%; height: 100%; display: block; }
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke-linecap: butt; }
.stage .bag { fill: rgba(255,138,31,.10); stroke: #FF8A1F; stroke-width: var(--sw); }
.stage .sheetq { fill: rgba(47,123,255,.20); stroke: #2F7BFF; stroke-width: var(--sw); }
.stage .h { cursor: grab; } .stage .hit { fill: transparent; stroke: none; }
.stage .dotc { stroke: #fff; stroke-width: var(--sw); } .hs .dotc { fill: #2F7BFF; } .hb .dotc { fill: #FF8A1F; }
#loupe { position: absolute; top: 8px; display: none; width: 132px; height: 132px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.35); z-index: 3; pointer-events: none; }
.legend { display: flex; gap: 18px; justify-content: center; font-size: 13.5px; font-weight: 600; color: var(--slate); }
.legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; } .dot.blue { background: #2F7BFF; } .dot.orange { background: #FF8A1F; }

/* result */
.verdict { padding-top: 6px; } .verdict h1 { margin-bottom: 6px; } .verdict p { margin: 0; color: var(--slate); font-size: 17px; }
.badge { width: 46px; height: 46px; border-radius: 50%; margin-bottom: 14px; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 800; font-size: 24px; line-height: 1; }
.badge::after { content: "✓"; }
.verdict.borderline .badge { background: var(--warn); } .verdict.borderline .badge::after { content: "≈"; }
.verdict.over .badge { background: var(--ink); } .verdict.over .badge::after { content: "i"; font-family: Georgia, serif; }
.verdict.oversize .badge { background: var(--bad); } .verdict.oversize .badge::after { content: "!"; }
.panel { background: var(--mist); border-radius: var(--r-lg); padding: 16px 18px; gap: 10px; }
.fit { width: 100%; height: auto; display: block; }
.fit .floor { stroke: #C3CAD6; stroke-width: 1.5; }
.fit .bagr { fill: color-mix(in srgb, var(--ink) 13%, #fff); stroke: var(--ink); stroke-width: 2; transform-box: fill-box; transform-origin: 50% 100%; animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
.fit .ovr { fill: color-mix(in srgb, var(--bad) 45%, #fff); stroke: none; animation: fadein .3s .5s both; }
.fit .lim { stroke: var(--primary); stroke-width: 2; stroke-dasharray: 6 4; }
.fit text { fill: var(--slate); stroke: none; font: 600 12px var(--font); }
@keyframes rise { from { transform: scaleY(.02); opacity: .3; } } @keyframes fadein { from { opacity: 0; } }
.spec { margin: 0; display: grid; }
.spec > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #DDE2E9; }
.spec dt { color: var(--slate); font-size: 14px; display: flex; align-items: center; gap: 8px; } .spec dd { margin: 0; font-weight: 700; font-size: 17px; text-align: end; }
.key { width: 16px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.key.solid { background: color-mix(in srgb, var(--ink) 13%, #fff); border: 2px solid var(--ink); } .key.dash { border: 2px dashed var(--primary); }
.conf { font-size: 14px; font-weight: 700; color: var(--ok); } .conf.medium { color: var(--warn); } .conf.low { color: var(--bad); }
.offer { border: 2px solid var(--primary); border-radius: var(--r-lg); padding: 18px; gap: 6px; }
.offer h3 { font-size: 18px; font-weight: 800; line-height: 1.3; margin: 0; }
.prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.prices .now { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; } .prices .gate { color: var(--slate); font-size: 14.5px; }
.save { margin-inline-start: auto; background: #E3F5EA; color: var(--ok); font-weight: 700; font-size: 13.5px; padding: 5px 10px; border-radius: 99px; }

/* AR */
.tabs { display: flex; background: var(--mist); border-radius: 14px; padding: 4px; gap: 4px; }
.tabs button { flex: 1; border: 0; background: none; padding: 12px 8px; border-radius: 11px; font: 600 14px/1.2 var(--font); color: var(--slate); cursor: pointer; }
.tabs .on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(10,27,61,.14); }
model-viewer { width: 100%; height: 300px; background: var(--mist); border-radius: var(--r-lg); }
.arbtn { position: absolute; inset-inline: 16px; bottom: 14px; width: auto; }
.okline { color: var(--ok); font-weight: 700; margin: 10px 0 0; }
#ar-out { display: flex; flex-direction: column; gap: 10px; } #ar-out:not(:empty) { margin-top: 12px; } #ar-out .offer { background: var(--paper); }

@media (min-width: 560px) { body { background: var(--mist); } #app { margin-block: 24px; min-height: calc(100dvh - 48px); border-radius: 28px; overflow: clip; box-shadow: 0 20px 60px rgba(10,27,61,.10); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
