/* Xevendi mockup v5 — the frame: header shortcuts (desktop), phone tab bar, shared modal, footer note.
   Owner 2026-11-16: no left rail ("we dont want to copy Zillow 100%"), so the five shortcuts sit in the header.
   Every class is prefixed rl-. Tokens come from styles.css. */
:root { --tabbar-h: 56px; }

/* ---------- headings: Figtree carries the heavy display weights (owner: "use the free font for now") ---------- */
.hero-title { font-weight: 900; letter-spacing: -.025em; }
.page-title, .section-title, .hr-title, .results-title, .ag-h2, .im-h2, .filters-head h2, .area-name, .duo-title, .action-title { font-weight: 800; }
.wordmark { font-weight: 800; }

/* ---------- header shortcuts: desktop only (phones and tablets use the bottom tab bar) ---------- */
.rl-quick { display: none; }
@media (min-width: 1024px) {
  .rl-quick { display: flex; align-items: center; gap: 2px; height: 100%; margin-right: 10px; padding-right: 12px; border-right: 1px solid var(--line); }
  .rl-quick .rl-item { min-width: 48px; padding: 4px 4px 3px; gap: 1px; }
  .rl-quick .rl-ico { width: 40px; height: 30px; }
}

/* ---------- header dropdown menus (content from country.js; desktop only, where the main nav shows) ---------- */
.rl-mega-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 41;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 32px rgb(19 18 17 / .10);
}
.rl-mega-panel[hidden] { display: none; }
.rl-mega-inner { display: flex; gap: 0; padding: 22px var(--gutter) 26px var(--mega-x, var(--gutter)); }
.rl-mega-col { padding-right: 48px; }
.rl-mega-col + .rl-mega-col { padding-left: 48px; border-left: 1px solid var(--line); }
.rl-mega-h { margin-bottom: 12px; font: 700 14px/1.3 var(--font-ui); color: var(--text-1); }
.rl-mega-col ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 40px; }
.rl-mega-col a { font-size: 15px; color: var(--sea-700); text-decoration: none; }
.rl-mega-col a:hover { color: var(--sea-800); text-decoration: underline; }
.main-nav a[aria-expanded="true"] { color: var(--sea-700); }
@media (max-width: 1199px) { .rl-mega { display: none; } }

/* ---------- shortcut and tab bar items ---------- */
.rl-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0;
  font: 500 11px/1.2 var(--font-ui); color: var(--stone-700); text-decoration: none; text-align: center;
}
.rl-item:hover { text-decoration: none; color: var(--text-1); }
.rl-ico {
  position: relative; display: grid; place-items: center; width: 44px; height: 32px; border-radius: 10px;
  transition: background-color var(--d1) var(--ease);
}
.rl-item:hover .rl-ico { background: var(--stone-100); }
.rl-item[aria-current="page"] { color: var(--sea-700); font-weight: 700; }
.rl-item[aria-current="page"] .rl-ico { background: var(--sea-50); }
.rl-item:focus-visible { outline: none; }
.rl-item:focus-visible .rl-ico { outline: 2px solid var(--focus); outline-offset: 2px; }
.rl-count {
  position: absolute; top: -5px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  border: 2px solid var(--bg); background: var(--clay-500); color: #fff; font: 700 10px/14px var(--font-ui);
  display: inline-grid; place-items: center; box-sizing: content-box;
}
.rl-count[hidden] { display: none; }

.rl-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgb(19 18 17 / .06);
}
.rl-tabs .rl-item { padding: 5px 0 0; gap: 1px; }
.rl-tabs .rl-ico { height: 28px; width: 40px; }
body[data-tabbar="off"] .rl-tabs, body:has(dialog[open]) .rl-tabs { display: none; }
@media (min-width: 1024px) { .rl-tabs { display: none; } }

/* Phones and tablets: leave room for the tab bar, and lift the floating controls above it. */
@media (max-width: 1023px) {
  body[data-tabbar="on"] { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  body[data-tabbar="on"] .search-page {
    height: calc(100dvh - var(--banner-h) - var(--header-h) - var(--filter-h) - var(--tabbar-h)
      - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
  body[data-tabbar="on"] .view-toggle { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }
  body[data-tabbar="on"] .toast-region { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); }
  body[data-page="search"][data-tabbar="on"] .toast-region { bottom: calc(var(--tabbar-h) + 72px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- shared modal ---------- */
.rl-modal {
  border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: var(--e4); color: var(--text-1);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: hidden;
}
.rl-modal--sm { width: min(420px, calc(100vw - 24px)); }
.rl-modal::backdrop { background: var(--scrim); }
.rl-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.rl-modal-head h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.rl-modal-body { padding: 20px; overflow-y: auto; max-height: calc(100dvh - 32px - 62px); display: grid; gap: 14px; }
.rl-switch { font-weight: 600; }

/* ---------- footer: recommendations note and link groups ---------- */
.rl-recs { max-width: 1200px; margin: 0 auto 28px; display: grid; gap: 8px; justify-items: start; }
.rl-recs h2 { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 800; color: var(--text-1); }
.rl-recs p { max-width: 80ch; line-height: 1.55; }
.rl-groups {
  max-width: 1200px; margin: 0 auto 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.rl-groups details { padding: 4px 0; }
.rl-groups summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 4px; font-weight: 600; color: var(--text-1);
}
.rl-groups summary::-webkit-details-marker { display: none; }
.rl-groups summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--sea-600); border-bottom: 2px solid var(--sea-600); transform: rotate(45deg) translateY(-2px); transition: transform var(--d2) var(--ease); }
.rl-groups details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.rl-groups details > div { display: flex; flex-direction: column; gap: 8px; padding: 0 4px 14px; }
.rl-groups a { color: var(--text-2); text-decoration: none; }
.rl-groups a:hover { color: var(--text-1); text-decoration: underline; }
