/* TownLink 2026-11 redesign: the component layer for every screen (homeowner, provider, admin, console, join, agreements).
   Loads after every feature stylesheet. Tokens live in app.css (Light + Dark); this file only uses them.
   Principles: glass chrome (header, tab bar, sheets) with a 1px top highlight; hairline-bordered cards with soft layered shadows;
   pill controls; spring easing (--ease-spring is a CSS linear() spring) on transform only; 3px focus rings; AA contrast in both themes.
   Reduced motion: app.css zeroes every transition and animation. */

/* ---------- theme toggle (header) ---------- */
.theme-tg{appearance:none;flex:none;display:inline-grid;place-items:center;width:40px;height:40px;margin-inline-start:auto;padding:0;border-radius:999px;cursor:pointer;
  color:var(--foreground);background:color-mix(in srgb,var(--card) 72%,transparent);border:1px solid color-mix(in srgb,var(--foreground) 10%,transparent);
  box-shadow:var(--glass-hi),var(--sh-xs);-webkit-tap-highlight-color:transparent;
  transition:transform .55s var(--ease-spring),background-color .25s var(--ease-out),border-color .25s var(--ease-out)}
.theme-tg:hover{background:var(--card);border-color:color-mix(in srgb,var(--foreground) 16%,transparent)}
.theme-tg:active{transform:scale(.9);transition-duration:.12s}
.theme-tg:focus-visible{outline:0;box-shadow:var(--ring-shadow)}
.theme-tg .tg-ic{width:20px;height:20px;overflow:visible;transform-origin:center;transition:transform .8s var(--ease-spring)}
.theme-tg .tg-core{transform-box:fill-box;transform-origin:center;transition:transform .8s var(--ease-spring)}
.theme-tg .tg-bite{transition:transform .8s var(--ease-spring)}
.theme-tg .tg-rays line{transform-box:fill-box;transform-origin:center;transition:transform .6s var(--ease-spring) calc(var(--i) * 22ms + 80ms),opacity .3s var(--ease-out) calc(var(--i) * 22ms + 80ms)}
/* sun -> moon: rays retract one by one (clockwise), the disc swells and a "bite" slides in; the glyph turns a little. Transform + opacity only. */
:root[data-theme=dark] .theme-tg .tg-ic{transform:rotate(-40deg)}
:root[data-theme=dark] .theme-tg .tg-core{transform:scale(1.5)}
:root[data-theme=dark] .theme-tg .tg-bite{transform:translate(-7.5px,4.5px)}
:root[data-theme=dark] .theme-tg .tg-rays line{transform:scale(0);opacity:0;transition-delay:calc(var(--i) * 14ms),calc(var(--i) * 14ms)}
.top .theme-tg+.langsel{margin-inline-start:8px}
@media(max-width:420px){.theme-tg{width:36px;height:36px}.langsel{max-width:34vw}}
/* Theme switch (ui.js tfSetTheme): the old page snapshot fades out over the new one (opacity only, one composited layer),
   the toggle cross-fades on its own layer above it while its live sun / moon morph keeps playing. */
html.theme-vt .theme-tg{view-transition-name:tf-theme-tg}
html.theme-vt::view-transition-group(root){animation:none}
html.theme-vt::view-transition-new(root){animation:none;mix-blend-mode:normal}
html.theme-vt::view-transition-old(root){z-index:2;mix-blend-mode:normal;animation:tfThemeOut .48s cubic-bezier(.4,0,.2,1) both}
html.theme-vt::view-transition-group(tf-theme-tg){z-index:3;animation:none}
html.theme-vt::view-transition-old(tf-theme-tg){animation:tfThemeOut .48s cubic-bezier(.4,0,.2,1) both}
html.theme-vt::view-transition-new(tf-theme-tg){animation:tfThemeIn .48s cubic-bezier(.4,0,.2,1) both}
@keyframes tfThemeOut{from{opacity:1}to{opacity:0}}
@keyframes tfThemeIn{from{opacity:0}to{opacity:1}}
/* no View Transitions: a veil in the old ground colour fades out over the new theme */
.theme-veil{position:fixed;inset:0;z-index:2147483646;pointer-events:none;opacity:1;will-change:opacity;transition:opacity .48s cubic-bezier(.4,0,.2,1)}
.theme-veil.out{opacity:0}
@media (prefers-reduced-motion:reduce){.theme-veil{display:none}.theme-tg .tg-ic,.theme-tg .tg-core,.theme-tg .tg-bite,.theme-tg .tg-rays line{transition:none}}

/* ---------- chrome: glass header + floating tab bar ---------- */
.top{background:var(--header-bg);-webkit-backdrop-filter:saturate(1.8) blur(22px);backdrop-filter:saturate(1.8) blur(22px);
  border-bottom:1px solid color-mix(in srgb,var(--foreground) 7%,transparent);box-shadow:var(--glass-hi)}
.brand{transition:transform .55s var(--ease-spring)}.brand:active{transform:scale(.97)}
.promise-pill{background:color-mix(in srgb,var(--card) 70%,transparent);border-color:color-mix(in srgb,var(--foreground) 9%,transparent)}
.topnav a{border-radius:999px;transition:color .2s var(--ease-out),background-color .25s var(--ease-out),transform .5s var(--ease-spring)}
.topnav a:active{transform:scale(.96)}
.topnav a.on{background:color-mix(in srgb,var(--foreground) 7%,transparent);color:var(--foreground)}
.acct,.langsel{border-radius:999px;background-color:color-mix(in srgb,var(--card) 72%,transparent);border-color:color-mix(in srgb,var(--foreground) 10%,transparent);box-shadow:var(--glass-hi),var(--sh-xs)}
.acct{transition:transform .55s var(--ease-spring),background-color .25s}.acct:active{transform:scale(.9)}
.tabbar{border-radius:26px;border:1px solid color-mix(in srgb,var(--foreground) 8%,transparent);background:var(--tab-bg);
  -webkit-backdrop-filter:saturate(1.8) blur(24px);backdrop-filter:saturate(1.8) blur(24px);
  box-shadow:var(--glass-hi),0 1px 2px rgba(0,0,0,.06),0 18px 40px -16px rgba(15,24,21,.35)}
:root[data-theme=dark] .tabbar{box-shadow:var(--glass-hi),0 18px 40px -16px rgba(0,0,0,.85)}
.tabbar a .i{transition:background-color .25s var(--ease-out),transform .55s var(--ease-spring)}
.tabbar a:active .i{transform:scale(.86)}
.tabbar a.on .i{background:var(--primary-soft)}
.foot{border-top-color:color-mix(in srgb,var(--foreground) 7%,transparent)}

/* ---------- surfaces ---------- */
.card{border-color:color-mix(in srgb,var(--foreground) 7.5%,transparent);border-radius:var(--r-lg);
  box-shadow:0 1px 2px rgba(15,24,21,.04),0 8px 24px -16px rgba(15,24,21,.16)}
:root[data-theme=dark] .card{box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 1px 2px rgba(0,0,0,.4),0 10px 28px -16px rgba(0,0,0,.7)}
.card.click,a.card{transition:transform .6s var(--ease-spring),box-shadow .4s var(--ease-out),border-color .25s}
@media(hover:hover){.card.click:hover,a.card:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(15,24,21,.05),0 18px 36px -18px rgba(15,24,21,.28)}}
.card.click:active,a.card:active{transform:scale(.985);transition-duration:.14s}
.card.inset{background:var(--surface-inset)}
.modal{background:color-mix(in srgb,var(--popover) 92%,transparent);-webkit-backdrop-filter:saturate(1.6) blur(26px);backdrop-filter:saturate(1.6) blur(26px);
  box-shadow:var(--glass-hi),var(--sh-3);border-color:color-mix(in srgb,var(--foreground) 9%,transparent)}
@media(min-width:640px){.modal{border-radius:var(--r-xl)}}
.modal-bg{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.toast{border-radius:999px;background:color-mix(in srgb,var(--popover) 88%,transparent);-webkit-backdrop-filter:saturate(1.6) blur(20px);backdrop-filter:saturate(1.6) blur(20px);box-shadow:var(--glass-hi),var(--sh-3)}

/* ---------- controls ---------- */
.btn{transition:transform .55s var(--ease-spring),background-color .2s var(--ease-out),box-shadow .3s var(--ease-out),border-color .2s,color .2s}
.btn:active{transform:scale(.965);transition-duration:.12s}
.btn.primary,.btn.default{box-shadow:var(--primary-sh)}
@media(hover:hover){.btn.primary:hover,.btn.default:hover{box-shadow:var(--primary-sh-hi)}}
.btn.secondary{background:var(--secondary)}
.chip{border-radius:999px;transition:transform .5s var(--ease-spring),background-color .2s var(--ease-out),border-color .2s,color .2s}
.chip:active{transform:scale(.95)}
input,select,textarea{border-radius:var(--r-md);transition:border-color .2s var(--ease-out),box-shadow .25s var(--ease-out),background-color .2s}
input:focus,select:focus,textarea:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 20%,transparent)}
.cat .ic{transition:transform .55s var(--ease-spring),background-color .2s,color .2s}
@media(hover:hover){.cat:hover .ic{transform:translateY(-2px)}}
.cat:active .ic{transform:scale(.94)}

/* ---------- headings ---------- */
.view h1{letter-spacing:-.035em}
.view h2{letter-spacing:-.028em}

/* ---------- dark mode: feature screens that still carried light literals ---------- */
:root[data-theme=dark] .lead-card,:root[data-theme=dark] .side-card{background:var(--card);border-color:var(--border);color:var(--foreground)}
:root[data-theme=dark] .demo-banner a{color:var(--banner-fg)}

/* select styled as a chip (browse filter bar): keep one chevron, fixed height (was tiling the arrow in Dark) */
select.chip,:root[data-theme=dark] select.chip{background-repeat:no-repeat;background-position:right 12px center;background-size:14px;padding-inline-end:34px;height:44px;align-self:center}
[dir=rtl] select.chip{background-position:left 12px center}
/* browse provider cards */
.pcard{transition:transform .6s var(--ease-spring),box-shadow .4s var(--ease-out),border-color .25s}
@media(hover:hover){.pcard:hover{transform:translateY(-2px)}}
.pcard:active{transform:scale(.985)}
select.chip{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A645F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
:root[data-theme=dark] select.chip{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239DAAA4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
.console-top .theme-tg{margin-inline-start:auto}
.console-top .console-search+.theme-tg{margin-inline-start:12px}

/* =====================================================================================================================
   ROUND 3 (2026-11-28): one type system everywhere (Geist, OFL, self-hosted), calmer chrome, the same 8pt / radius / shadow
   language on the homeowner home, browse and provider home. Arabic keeps Cairo.
   ===================================================================================================================== */
@font-face{font-family:"Geist";src:url("/static/fonts/geist-latin-wght.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
:root{--font-ui:"Geist","Figtree",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
body,input,select,textarea,button{font-family:var(--font-ui);font-feature-settings:"ss01","cv11"}
html[lang=ar] body,html[lang=ar] input,html[lang=ar] select,html[lang=ar] textarea,html[lang=ar] button{font-family:"Cairo",system-ui,sans-serif;font-feature-settings:normal}
.view h1{font-weight:700;letter-spacing:-.045em}
.view h2{font-weight:660;letter-spacing:-.035em}
.view h3{letter-spacing:-.02em}
/* subtle early-version notice: one quiet line, no colour block */
.demo-banner{background:var(--background);color:var(--muted-foreground);border-bottom:1px solid color-mix(in srgb,var(--foreground) 6%,transparent);font-size:12px;font-weight:500;padding:5px 12px}
.demo-banner a{color:var(--foreground)}
:root[data-theme=dark] .demo-banner{background:var(--background);color:var(--muted-foreground)}
/* header: logo, a couple of links, theme toggle, Sign in */
.promise-pill{display:none}
.top{min-height:64px}
.brand{font-weight:700;letter-spacing:-.03em}
@media(min-width:900px){
  .topnav{gap:4px}
  .topnav a{font-size:14.5px;font-weight:540;color:var(--muted-foreground);padding:8px 12px}
  .topnav a[href="#/"],.topnav a[href="#/sales"]{display:none}
  .topnav a[href="#/login"]{margin-inline-start:8px;color:var(--background);background:var(--foreground);padding:8px 16px;font-weight:600}
  .topnav a[href="#/login"]:hover{color:var(--background);background:color-mix(in srgb,var(--foreground) 86%,var(--primary))}
}
.langsel{height:36px;min-height:36px;font-size:13px;font-weight:540}
/* footer: one clean line */
.foot{border-top:1px solid color-mix(in srgb,var(--foreground) 7%,transparent);font-size:13px}
body:has(#view > .lp) .foot{max-width:1200px}

/* ---------- app screens on the same system ---------- */
.view .card{border-radius:20px}
.view .btn{border-radius:999px;font-weight:600;letter-spacing:-.01em}
.view .btn.primary,.view .btn.default{box-shadow:0 1px 2px rgba(15,24,21,.08),0 8px 20px -10px color-mix(in srgb,var(--primary) 70%,transparent)}
.view input,.view select,.view textarea{border-radius:14px}
.pcard{border-radius:20px;box-shadow:0 1px 2px rgba(15,24,21,.05),0 8px 24px -14px rgba(15,24,21,.2)}
:root[data-theme=dark] .pcard{box-shadow:0 1px 2px rgba(0,0,0,.4),0 10px 28px -14px rgba(0,0,0,.75)}
/* round 3: the three promises read as one tidy strip, not loose fragments */
.view .ride-trust{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;padding:14px 16px;margin:0 0 24px;border-radius:20px;
  background:color-mix(in srgb,var(--primary) 6%,var(--card));border:1px solid color-mix(in srgb,var(--primary) 14%,transparent);color:var(--foreground);font-size:13px;font-weight:540;letter-spacing:-.01em}
.view .ride-trust .ride-dot{display:none}
.view .ride-trust > .lc{grid-row:1 / span 3;align-self:start;width:20px;height:20px;margin-top:1px}
.view .ride-trust > span{grid-column:2}
@media(min-width:720px){.view .ride-trust{grid-template-columns:auto repeat(3,auto);justify-content:start;column-gap:18px}.view .ride-trust > .lc{grid-row:auto}.view .ride-trust > span{grid-column:auto}}
/* round 4: the early-version notice is one short line on phones */
.demo-banner .bn-short{display:none}
@media(max-width:600px){
  .demo-banner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:5px 10px;font-size:12px}
  .demo-banner .bn-long{display:none}
  .demo-banner .bn-short{display:inline}
}
/* round 4: the floating "Report a problem" button no longer floats over content.
   Phones: it lives in the header menu (Report a problem) and the page footer, so the tab bar and content stay clear.
   Desktop: a small quiet circle in the corner that opens its label on hover / focus. */
@media(max-width:899px){.tl-help{display:none!important}}
@media(min-width:900px){
  .tl-help{right:20px;bottom:20px;min-height:44px;height:44px;padding:0 12px;gap:0;border-radius:999px;background:var(--card);box-shadow:0 1px 2px rgba(15,24,21,.08),0 8px 20px -10px rgba(15,24,21,.3);opacity:.92;transition:padding .25s var(--ease),gap .25s var(--ease),opacity .2s}
  .tl-help .tl-help-label{max-width:0;overflow:hidden;opacity:0;font-size:13px;font-weight:600;transition:max-width .3s var(--ease),opacity .2s}
  .tl-help:hover,.tl-help:focus-visible{opacity:1;gap:8px;padding:0 16px 0 12px}
  .tl-help:hover .tl-help-label,.tl-help:focus-visible .tl-help-label{max-width:160px;opacity:1}
}
