/* =========================================================
   JOINTRIP — desktop.css
   The computer look: loaded only on screens wider than 880px (media attribute on the <link>),
   after style.css. It turns the site into a desktop app: a fixed sidebar (places, more, account),
   a slim toolbar with the page name (and a back arrow inside a flow), no website footer,
   calmer type, and a short Home. Phones use app.css instead. Nothing here changes behaviour.
   ========================================================= */
:root { --sb: 244px; --hd: 58px; }

/* ---------- sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: fixed; z-index: 60; inset: 0 auto 0 0; width: var(--sb); padding: 18px 14px 14px; background: var(--surface-2); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
:root[data-mode="dark"] .sidebar { background: #161616; }
.sb-logo { padding: 2px 10px 6px; font-size: 1.2rem; }
.sb-logo .logo-mark { width: 30px; height: 30px; }
.sb-nav { display: grid; gap: 2px; }
.sb-label { padding: 4px 12px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sb-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--fg-2); font: inherit; font-size: .9rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.sb-item .ic { width: 19px; height: 19px; color: var(--muted); }
.sb-item > span { flex: 1; }
.sb-item:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg); }
.sb-item[aria-current] { background: var(--surface); color: var(--fg); font-weight: 650; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px var(--line); }
.sb-item[aria-current] .ic { color: var(--brand); }
.sb-pub { margin: 6px 0; background: var(--brand); color: var(--on-brand); font-weight: 650; justify-content: center; }
.sb-pub > span { flex: none; }
.sb-pub .ic, .sb-pub:hover .ic { color: var(--on-brand); }
.sb-pub:hover { background: var(--brand-hover); color: var(--on-brand); }
.sb-pub[aria-current] { background: var(--brand-hover); color: var(--on-brand); box-shadow: none; }
.sb-pub[aria-current] .ic { color: var(--on-brand); }
.sb-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.sb-foot .ml-val { font-style: normal; font-size: .78rem; color: var(--muted); }
.sb-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--fg); }
.sb-me:hover, .sb-me[aria-current] { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.sb-me span { display: grid; min-width: 0; }
.sb-me b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-me small { font-size: .74rem; color: var(--muted); }
.sb-signin { min-height: 40px; }
.sb-out { min-height: 36px; font-size: .85rem; }
.sb-out:hover { color: var(--coral); background: color-mix(in srgb, var(--coral) 8%, transparent); }
.sb-out:hover .ic { color: var(--coral); }
.sb-legal { font-size: .72rem; color: var(--muted); padding: 2px 12px 0; }
.sb-legal a { color: inherit; text-decoration: none; }
.sb-legal a:hover { color: var(--fg); }

/* everything else sits to the right of the sidebar */
body { padding-left: var(--sb); }
body::before { left: var(--sb); }

/* ---------- toolbar (the old header) ---------- */
.app-header { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--line); }
.hd { max-width: none; gap: 14px; padding-inline: 28px; }
.hd .logo, .hd-nav, #themeBtn { display: none !important; }
.hd-title { display: block; flex: 1; min-width: 0; font-family: var(--f-display); font-weight: 750; font-size: 1.15rem; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:not(.pg-root) .hd-back { display: grid; width: 36px; height: 36px; margin-left: -8px; border: 0; background: none; }
.hd-back:hover { background: var(--surface-2); }
.hd-back .ic { width: 20px; height: 20px; }
.hd-right { gap: 8px; }
.hd-pub { min-height: 38px; padding: 0 16px; font-size: .86rem; }
body:has(.sb-pub) .hd-pub { display: none; } /* owners have Publish in the sidebar */
.hd-account .hd-me { display: none; } /* the account is at the bottom of the sidebar */
.hd-account .btn { min-height: 38px; }
.tabbar { display: none !important; }

/* ---------- no website footer (its links are in the sidebar) ---------- */
.app-footer { display: none; }

/* ---------- calmer, app-sized type ---------- */
.wrap { max-width: 1180px; padding-inline: 28px; }
.section { padding-block: 32px; }
.section.tight { padding-block: 24px 32px; }
.sec-head { margin-bottom: 18px; }
.sec-head h2 { font-size: 1.4rem; }
.sec-head .eyebrow { display: none; }
h1 { letter-spacing: -.025em; }
.veh-title, .dash-head h1 { font-size: 1.7rem; }
.btn { min-height: 42px; font-size: .9rem; }
.btn-lg { min-height: 48px; }

/* tab pages: the toolbar already names the page, so their own big heading goes */
.my-head h1, body[data-page="mytrips"] main .wrap > .eyebrow:first-child, .ac-back, .ex-head .eyebrow, .ex-head h1 { display: none !important; }
.my-head { justify-content: flex-end; margin-bottom: 12px; }
.dash-head .eyebrow, .dash-head-acts .btn-brand { display: none; }
body[data-page="checkout"] #coBack { display: none; }

/* ---------- home: a start screen, not a landing page ---------- */
.m-hide { display: none !important; }
.m-only { display: block; }
.hero { background: none; }
.hero::after { display: none; }
.hero-in { padding-block: 34px 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 36px; align-items: start; }
.hero h1 { font-size: clamp(2rem, 3.2vw, 2.7rem); }
.hero-lead { font-size: 1rem; margin: 10px 0 20px; }
.hero .board-wrap.m-hide { display: block !important; } /* the "leaving this week" board stays: it is the live part */
.mk { padding: 18px; border-radius: 20px; box-shadow: var(--shadow); }
/* the search gets the room it needs ("Anywhere" fits) */
.hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
.hero .search { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) auto; }
.hero .search label { padding: 8px 12px; }
.hero .search .btn { padding: 0 18px; }
/* popular routes beside the board */
.hero-routes { margin-top: 26px; }
.hr-label { display: block; margin-bottom: 10px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hr-route { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.hr-route:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow); }
.hr-route b { display: flex; align-items: center; gap: 6px; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-route b .ic { width: 14px; height: 14px; color: var(--brand-text); flex: none; }
.hr-route small { grid-column: 1; color: var(--muted); font-size: .8rem; }
.hr-route em { grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-weight: 700; font-size: .85rem; color: var(--brand-text); white-space: nowrap; }
/* narrower windows: the four fields in one row, Find trips under them; route prices under the route */
@media (max-width: 1360px) {
  .hero .search { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero .search .btn { grid-column: 1 / -1; min-height: 46px; }
  .hero .search label { padding: 8px 10px; }
  .hero .search .dd-val { font-size: .9rem; }
  .hero .search .dd-btn { gap: 4px; }
  .hr-route { grid-template-columns: minmax(0, 1fr); }
  .hr-route em { grid-column: 1; grid-row: auto; }
}
.m-cats { padding-block: 8px 0 !important; }
.m-featured { padding-top: 18px !important; }
.m-more { padding-block: 4px 40px; }
.m-more .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.m-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); text-decoration: none; color: var(--fg); transition: background .15s; }
.m-link:hover { background: color-mix(in srgb, var(--fg) 7%, var(--surface-2)); }
.m-link > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.m-link b { font-size: .95rem; }
.m-link small { color: var(--muted); font-size: .82rem; }
.m-link-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface); color: var(--brand-text); flex: none; }
.m-link > span:last-child .ic { width: 16px; height: 16px; color: var(--muted); transform: rotate(-90deg); }
.cutout, .vec-float { display: none !important; }

/* ---------- cards: quieter ---------- */
.grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tcard { border-radius: 16px; }
.tcard h3 { font-size: 1.08rem; }
.tcard:hover { transform: none; }
.card, .panel { border-radius: 16px; }
.trip-hero .crumbs { display: none; }
.trip-hero h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

/* ---------- Explore: the way ride and seat-booking apps show results ----------
   Search stays on screen while scrolling; quick filters (trip types) sit right under it; filters on
   the left; each trip is a scannable row (photo · what and when · seats and price), not a photo grid,
   so people compare time, seats left and price down one column. */
.ex-head { position: sticky; top: var(--hd); z-index: 40; padding-block: 14px 12px; background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom: 1px solid var(--line); }
.ex-head .search { max-width: none; box-shadow: none; border: 1px solid var(--line); border-radius: 16px; padding: 4px; grid-template-columns: 1fr 1fr 1fr .6fr; }
.ex-head .search label { padding: 6px 14px; }
.ex-head .filter-btn { display: none; }
#fRail { margin-top: 10px !important; }
#fRail .cat { min-height: 0; padding: 7px 14px 7px 11px; font-size: .84rem; }
.ex-head + .section { padding-top: 20px; }
.ex-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
.filters { top: calc(var(--hd) + 182px); max-height: calc(100vh - var(--hd) - 200px); overflow-y: auto; padding: 16px; border-radius: 16px; gap: 16px; }
.ex-bar { margin-bottom: 12px; }
.ex-bar p { font-size: .9rem; }
#exGrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
#exGrid .tcard { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 150px; transition: border-color .15s, box-shadow .15s; }
#exGrid .tcard:hover { border-color: color-mix(in srgb, var(--fg) 22%, var(--line)); box-shadow: var(--shadow); }
#exGrid .tc-media { aspect-ratio: auto; height: 100%; }
#exGrid .tc-hot { top: auto; bottom: 10px; }
#exGrid .tc-save { left: 154px; right: auto; top: 10px; width: 34px; height: 34px; }
#exGrid .tc-body { display: grid; grid-template-columns: minmax(0, 1fr) 170px; grid-auto-rows: min-content; column-gap: 20px; row-gap: 5px; padding: 14px 18px; align-content: center; }
#exGrid .tc-body > * { grid-column: 1; }
#exGrid .tcard h3 { font-size: 1.08rem; }
#exGrid .tc-foot { grid-column: 2; grid-row: 1 / span 6; align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 10px; margin: 0; padding: 0 0 0 20px; border-left: 1px dashed var(--line); }
#exGrid .tc-price b { font-size: 1.45rem; }
#exGrid .strip { max-width: 260px; }

/* ---------- trip page: details left, the booking card stays in view on the right ---------- */
.trip-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
.book { border-radius: 18px; padding: 18px; top: calc(var(--hd) + 16px); }
.book-top { gap: 10px; }
.book-top b { white-space: nowrap; font-size: 1.55rem; }
.book-top .btn-sm { padding: 0 10px; }
.trip-hero-in { padding-block: 120px 26px; }

/* ---------- checkout: the summary and pay button stay in view ---------- */
.co-layout { gap: 28px; }
body[data-page="checkout"] main h1 { font-size: 1.6rem !important; margin: 0 0 16px !important; }
.summary { position: sticky; top: calc(var(--hd) + 16px); border-radius: 18px; }
.co-main > .card { border-radius: 16px; }

/* ---------- narrower windows: the sidebar folds to icons (names show as tooltips) ---------- */
@media (max-width: 1100px) {
  :root { --sb: 72px; }
  .sidebar { padding: 16px 10px 12px; align-items: stretch; }
  .sb-logo { justify-content: center; padding: 2px 0 6px; }
  .sb-logo span, .sb-item > span, .sb-item .ml-val, .sb-label, .sb-legal, .sb-me span { display: none; }
  .sb-item { justify-content: center; padding: 0; min-height: 44px; }
  .sb-item .ic { width: 21px; height: 21px; }
  .sb-pub { padding: 0; }
  .sb-me { justify-content: center; padding: 6px 0; }
  .sb-signin { padding: 0; font-size: 0; min-height: 40px; }
  .sb-signin::before { content: '→'; font-size: 1rem; }
  .sb-more { border-top: 1px solid var(--line); padding-top: 10px; }
  .wrap { padding-inline: 22px; }
}

/* ---------- the "More" list on the profile page isn't needed (it's the sidebar) ---------- */
.ac-more { display: none; }
