/*
 * Desktop adjustments for mobile pages reused inside the web shell (config.ui.WEB_FROM_MOBILE).
 * Spec: docs/web-design/README.md. Scoped by `.web-app` + the mobile page's body class; tokens only.
 */

/* Map tab (§6): full-bleed map, cards along the bottom, list + sheets as floating side panels ---------- */
.web-app.m-map-body .m-main { height: calc(100vh - var(--w-topbar-height)); min-height: 0; }
.web-app .mp-top { right: auto; left: 16px; top: 16px; width: 440px; }
.web-app .mp-search { height: 44px; }
.web-app .mp-round { width: 44px; height: 44px; }

.web-app .mp-panel { bottom: 16px; }
.web-app .mp-strip { align-self: flex-start; gap: var(--space-4); margin: 0 16px 10px; }
.web-app .mp-cards { gap: 14px; padding: 0 16px 4px; scroll-padding: 0 16px; }
.web-app .mp-card {
  flex: 0 0 220px;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  height: 156px;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: none;
  transition: transform 140ms ease, border-color 140ms ease;
}
.web-app .mp-card:hover { transform: translateY(-2px); }
.web-app .mp-card .mp-thumb { width: 100%; height: 92px; border-radius: 0; font-size: 30px; }
.web-app .mp-card .mp-card-text { padding: 8px 12px; gap: 2px; }
.web-app .mp-card .mp-card-text b { font-size: 14px; }
.web-app .mp-card .mp-card-text small { font-size: 12px; }
.web-app .mp-card .mp-card-text .m-eyebrow { font-size: 10px; }

/* "☰ Show list": a full-height panel on the left instead of a bottom sheet */
.web-app .mp-panel[data-mode="list"] {
  top: 76px;
  right: auto;
  bottom: 16px;
  left: 16px;
  width: 440px;
  height: auto;
  max-height: none;
  border-radius: 18px;
}
.web-app .mp-panel[data-mode="list"] .mp-grab { display: none; }
.web-app .mp-panel[data-mode="list"] .mp-strip { height: 48px; }
.web-app .mp-page:has(.mp-panel[data-mode="list"]) .leaflet-bottom { bottom: 0 !important; }
.web-app .mp-page:has(.mp-panel[data-mode="list"]) .mp-top { display: none; }

/* filter + item sheets: floating panels on the right */
.web-app .mp-sheet {
  top: calc(var(--w-topbar-height) + 16px);
  right: 16px;
  bottom: auto;
  left: auto;
  width: 400px;
  max-height: calc(100vh - var(--w-topbar-height) - 32px);
  border-radius: 18px;
  transform: translateX(calc(100% + 24px));
}
.web-app .mp-sheet.is-visible { transform: none; }
.web-app .mp-sheet .m-sheet-grab { display: none; }
.web-app [data-map-backdrop] { background: transparent; }
.web-app .mp-guest-banner { top: 16px; right: auto; bottom: auto; left: 50%; width: auto; padding: 0 18px; transform: translateX(-50%); }
.web-app .mp-page .leaflet-top.leaflet-right { top: 8px; }

/* guest gate pages (§10): a centered card */
.web-app.gate-body .w-main { display: grid; place-items: center; padding: var(--space-8) 0; }
.web-app .gate-page { width: 440px; max-width: calc(100vw - 48px); padding: var(--space-8); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }

/* New memory / edit (§9): the mobile wizard as a page under the top bar -------------------------------- */
.web-app.wz-body .w-main { min-height: calc(100vh - var(--w-topbar-height)); }
.web-app .wz { width: min(1120px, calc(100vw - 96px)); margin: 0 auto; padding-bottom: 0; }
.web-app .wz-head { top: var(--w-topbar-height); grid-template-columns: 1fr auto 40px; padding: var(--space-6) 0 var(--space-3); background: var(--bg); border-bottom: 0; }
.web-app .wz-head .wz-close { order: 3; }
.web-app .wz-title small { font-size: 12px; }
.web-app .wz-title strong { font-size: 26px; line-height: 1.25; }
.web-app .wz-step-label { order: 2; font-size: 14px; }
.web-app .wz-tabs { top: calc(var(--w-topbar-height) + 88px); padding: 0; }
.web-app .wz-tabs .m-tab { flex: none; margin-right: var(--space-8); }
.web-app .wz-errors { padding: 0; }
.web-app .wz-panel { padding: var(--space-6) 0; }
.web-app .wz-intro h1 { font-size: 22px; }
.web-app .wz-masonry { --wz-cols: 5; }
.web-app .wz-pick { padding: var(--space-8) var(--space-4); border-style: dashed; }
.web-app .wz-pick:hover, .web-app .wz-pick.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.web-app [data-wz-panel="details"] { max-width: 720px; }
.web-app [data-wz-panel="review"] { max-width: 720px; }
.web-app .wz-map { height: 420px; }
.web-app .wz-foot {
  position: sticky;
  right: auto;
  left: auto;
  justify-content: flex-end;
  padding: var(--space-4) 0 var(--space-5);
  background: var(--bg);
  border-top: 1px solid var(--line);
  backdrop-filter: none;
}
.web-app .wz-foot .m-btn { flex: 0 0 auto; min-width: 120px; }
.web-app .wz-foot [data-wz-prev] { flex: 0 0 auto; }
.web-app .wz-sheet {
  top: calc(var(--w-topbar-height) + 16px);
  right: 16px;
  bottom: auto;
  left: auto;
  width: 420px;
  max-height: calc(100vh - var(--w-topbar-height) - 32px);
  border-radius: 18px;
  transform: translateX(calc(100% + 24px));
}
.web-app .wz-sheet.is-visible { transform: none; }
.web-app .wz-sheet .m-sheet-grab { display: none; }
/* Leaflet controls sit at z-index 1000: keep the wizard's sheets and their backdrop above the route map. */
.web-app .wz-sheet { z-index: 1100; }
.web-app [data-wz-backdrop] { z-index: 1090; }

/* Profile (§8): centered column (~680px) ---------------------------------------------------------------- */
.web-app .pf-page { width: min(680px, calc(100vw - 48px)); margin: 0 auto; padding-bottom: var(--space-8); }
.web-app .pf-head { padding-top: var(--space-8); }
.web-app .pf-avatar { width: 96px; height: 96px; font-size: 42px; }
.web-app .pf-head h1 { font-size: 24px; }
.web-app .pf-bio { max-width: 520px; }
.web-app .pf-stats { max-width: 520px; }
.web-app .pf-gear { top: var(--space-8); right: 0; }
.web-app .pf-sticky { top: var(--w-topbar-height); }
.web-app .pf-tabs { justify-content: flex-start; gap: var(--space-6); }
.web-app .pf-tabs .m-tab { flex: none; }
.web-app .pf-chips { padding: 0; }
.web-app .pf-panel { padding: 0; }
.web-app .pf-map-panel .mp-page { height: calc(100vh - var(--w-topbar-height) - 101px); border-radius: var(--radius-card); }

/* Followers / following / requests lists reuse the mobile page */
.web-app .fl-page { width: min(680px, calc(100vw - 48px)); margin: 0 auto; }

/* Login / sign up (§10): the full-bleed photo stays; copy + actions sit in one centered frosted card ------- */
.web-app.au-body .w-main { min-height: 100vh; }
.web-app .au-page { display: grid; grid-template-rows: auto 1fr auto auto 1fr; justify-items: center; min-height: 100vh; }
.web-app .au-top { grid-row: 1; width: 100%; padding: 24px 40px 0; }
.web-app .au-copy,
.web-app .au-actions {
  width: 440px;
  max-width: calc(100vw - 48px);
  background: rgba(12, 12, 13, 0.68);
  backdrop-filter: blur(16px) saturate(140%);
}
.web-app .au-copy { grid-row: 3; margin: 0; padding: 40px 40px var(--space-5); border-radius: 22px 22px 0 0; }
.web-app .au-copy h1 { font-size: 32px; }
.web-app .au-actions { grid-row: 4; margin-top: -1px; padding: 1px 40px 36px; border-radius: 0 0 22px 22px; }
.web-app .au-google, .web-app .au-toggle { min-height: 50px; cursor: pointer; }
