/* Outrider — the desktop layout (step 1b, PROTOTYPE for the mockups, 13 Oct 2026).

   ONLY ON THE WEBSITE, ONLY ON A WIDE SCREEN. Every rule here hangs off
   html.desk, which desktop.js sets when the window is at least 1024 px wide
   and the page is not running inside the phone app. Below that, or in the
   app, none of this applies and the phone layout is exactly what it was.

   THE SHAPE:
     ┌──────────────────────── top bar: OUTRIDER · tabs ─────────────────────┐
     │ panel: title + back           │                                        │
     │ panel: the screen (list,      │            the big map                 │
     │ trail page, event ...)        │                                        │
     └───────────────────────────────┴────────────────────────────────────────┘
   You and Settings have nothing to map, so html.desk-page drops the map and
   gives the screen a wide, centred page instead. */

html.desk { --panel: 440px; }
@media (min-width: 1900px) { html.desk { --panel: 540px; } }

html.desk body { background: var(--ground); }

html.desk #shell {
  max-width: none; width: 100%; height: 100dvh;
  display: grid;
  grid-template-columns: var(--panel) 1fr;
  grid-template-rows: 58px auto 1fr;
  grid-template-areas: "top top" "hd map" "view map";
}

/* ---------------------------------------------------------------- top bar */
/* THE REDESIGN (21 Oct): a white bar, the four tabs in Figtree, the active one
   a gold pill round its icon - the phone's bottom bar, laid along the top. */
html.desk #tabs {
  grid-area: top; position: static; order: 0;
  display: flex; align-items: center; gap: 4px;
  height: 58px; padding: 0 20px 0 24px; margin: 0;
  background: var(--surface); border: 0; border-bottom: 1px solid var(--line);
  box-shadow: none;
}
html.desk #tabs::before {
  content: 'OUTRIDER'; align-self: center; margin-right: 28px;
  font: 800 14px/1 ui-monospace, Consolas, monospace; letter-spacing: .28em;
  color: var(--ink);
}
html.desk #shell #tabs span {
  flex: 0 0 auto; display: flex; flex-direction: row; align-items: center; gap: 6px;
  padding: 0 12px 0 4px; height: 42px; min-height: 0; cursor: pointer;
  color: var(--tab-off); border-radius: 99px;
}
html.desk #shell #tabs span i {
  font-style: normal; font-size: 14px; letter-spacing: 0; text-transform: none;
  font-family: inherit; font-weight: 600;
}
html.desk #shell #tabs span .tp { width: 44px; height: 30px; }
html.desk #shell #tabs span .tp svg { width: 19px; height: 19px; }
html.desk #tabs span:hover { color: var(--ink); background: var(--ground); }
html.desk #shell #tabs span.on { color: var(--ink); font-weight: 700; }
html.desk #tabs span:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
/* Explore is the list here; the big map beside it is the map. */
html.desk #shell #exmap, html.desk #tabs span[data-t="map"] { display: none; }
html.desk #tabs .dk-key {
  margin-left: auto; align-self: center; color: var(--ink-3);
  font: 12px ui-monospace, Consolas, monospace;
}

/* ------------------------------------------------------------------ panel */
html.desk #shell .ph-hd { grid-area: hd; border-right: 1px solid var(--line); }
html.desk #view {
  grid-area: view; border-right: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: thin;
}
html.desk #view::-webkit-scrollbar { width: 8px; }
html.desk #view::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
html.desk .bnr { left: calc(var(--panel) + 24px); right: auto; width: 420px; top: 72px; }

/* the trail page draws its own small map; the big one does that job here */
html.desk #view .trmap, html.desk #view #trmap { display: none !important; }

/* rows answer a mouse */
html.desk #shell .ph-row:hover { background: var(--sunk); }
html.desk #shell .ph-row:focus-visible,
html.desk #shell button:focus-visible { outline: 2px solid var(--act); outline-offset: -2px; }

/* -------------------------------------------------------------------- map */
#dk-map { display: none; }
html.desk #dk-map { display: block; grid-area: map; position: relative; min-height: 0; }
html.desk #dk-map .mapboxgl-map { position: absolute; inset: 0; }
/* MAP LAYERS, a card on the map (28 Oct): the phone sheet's tiles and key,
   bottom left where the old legend was, open to begin with. */
html.desk #dk-keypanel {
  left: 16px; right: auto; bottom: 28px; width: 372px; z-index: 3;
  max-height: calc(100% - 120px); border-radius: 16px; padding: 12px 14px 12px;
  box-shadow: 0 8px 24px rgba(20,16,10,.18);
}
html.desk #dk-keypanel .kh span { display: flex; gap: 4px; }
html.desk #dk-keypanel .otiles { grid-template-columns: repeat(2, minmax(0, 1fr)); display: grid; }
html.desk .dk-lyrbtn {
  position: absolute; left: 16px; bottom: 28px; z-index: 3; height: 44px; width: 44px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; box-shadow: 0 6px 18px rgba(20,16,10,.14);
}
html.desk .dk-lyrbtn[hidden] { display: none; }
html.desk .dk-pop .mapboxgl-popup-content { border-radius: 12px; padding: 10px 30px 10px 12px; font: inherit; }
html.desk .dk-pop b { display: block; font-size: 15px; color: #1F1C17; }
html.desk .dk-pop span { display: block; font-size: 12.5px; color: #6B655C; margin-top: 2px; }

/* ----------------------------------------------- You, Settings: a page */
html.desk.desk-page #shell {
  grid-template-columns: 1fr;
  grid-template-areas: "top" "hd" "view";
}
html.desk.desk-page #dk-map { display: none; }
html.desk.desk-page #shell .ph-hd,
html.desk.desk-page #view { border-right: 0; }
html.desk.desk-page #shell .ph-hd > *,
html.desk.desk-page #view > * {
  max-width: 880px; margin-left: auto; margin-right: auto;
}
html.desk.desk-page #view { padding: 8px 24px 40px; }
/* the top bar already says OUTRIDER */
html.desk #shell .ph-hd .k { display: none; }

/* sections side by side (desktop.js groups them) */
html.desk.desk-page #view > .dk-cols {
  max-width: 1180px; display: grid; gap: 8px 40px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}
html.desk.desk-page .dk-group { min-width: 0; }
html.desk.desk-page #shell .ph-hd > * { max-width: 1180px; }
html.desk.desk-page #shell .ph-hd { padding-left: max(24px, calc(50% - 590px)); padding-right: max(24px, calc(50% - 590px)); }

/* the horse cards use the width */
html.desk.desk-page .hstrip { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; display: grid !important; }


/* compact rows: more trails beside the map */
html.desk #view .br-row { padding-top: 8px; padding-bottom: 8px; }

/* NOTHING TO RECORD ON A COMPUTER (owner, 13 Oct): the recording log and the
   trail-count switch are phone things. Hidden, not removed - they are the
   same Settings screen, and on a phone they are where they always were. */
html.desk #view #rlog, html.desk #view #contrib { display: none !important; }

/* GET THE APP, on a computer: top right of the map, clear of the key */
html.desk #getapp { left: auto !important; right: 24px !important; top: 74px !important;
  bottom: auto !important; margin: 0 !important; width: 430px; }

/* YOU, SIGNED IN: profile left, the rest right (desktop.js) */
html.desk.desk-page #view > .dk-you {
  max-width: 1180px; display: grid; gap: 0 48px; align-items: start;
  grid-template-columns: minmax(340px, 420px) 1fr;
}
html.desk.desk-page .dk-you > .you-prof {
  position: sticky; top: 8px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); padding-bottom: 12px; margin-top: 12px;
}
html.desk.desk-page .dk-you-r { min-width: 0; }

/* YOU, SIGNED IN (step 3): the profile card on the left, everything else on
   the right. The banner sits in the card; the top bar already says OUTRIDER. */
html.desk.desk-page #view > .you-page {
  max-width: 1180px; display: grid; gap: 0 40px; align-items: start;
  grid-template-columns: minmax(360px, 420px) 1fr; padding-top: 16px;
}
html.desk.desk-page .you-page > .you-prof {
  position: sticky; top: 8px; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; background: var(--surface); padding-bottom: 14px;
}
html.desk #shell .you-cover::before { display: none; }
html.desk #shell .you-cover-btn { top: 10px; }
html.desk.desk-page .you-page > .you-rest { min-width: 0; }
/* the card holds the left column; everything else (the follow-request card,
   the numbers, the Rides / Posts / Events tabs) stacks on the right. The
   request card used to take the right of row one and push the rest under
   the card (found 21 Oct). */
html.desk.desk-page .you-page > .you-prof { grid-column: 1; grid-row: 1 / span 6; }
html.desk.desk-page .you-page > :not(.you-prof) { grid-column: 2; }
html.desk.desk-page .you-page .you-bar { margin-left: 0; margin-right: 0; }
html.desk.desk-page .you-page .rx-ptabs { padding-left: 0; }
html.desk.desk-page .you-page .you-bar { margin-top: 0; }
html.desk #shell .you-face { border-color: var(--surface); background: var(--surface); }

/* THE JOIN SCREEN ON A COMPUTER (28 Oct): the photograph on the left, the
   form beside it, one card - the phone's screen, side by side. */
html.desk.desk-page #view > .jn {
  display: grid; grid-template-columns: 1.15fr 1fr; max-width: 1080px; margin-top: 24px;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface);
}
html.desk.desk-page #shell .jn-hero { position: relative; height: auto; min-height: 460px; }
html.desk.desk-page #shell .jn-hero img { position: absolute; inset: 0; }
html.desk.desk-page #shell .jn-body { padding: 48px 44px; align-self: center; }
html.desk.desk-page #shell .jn-body h1 { font-size: 40px; }

/* the one line when the base map does not load (28 Oct) */
html.desk .dk-noted { position: absolute; left: 16px; right: 70px; top: 12px; z-index: 3; margin: 0; padding: 10px 14px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }

