/* Streetwise Software Online Site Engine 2.0 — shared components (demo notice, breadcrumbs, policy pages, map,
   mobile bar, cookie banner, consent checkbox). Each site maps the --sw-* tokens to its own theme
   in site.css, which loads after this file. */

:root {
  --sw-ink: #1f2328;
  --sw-paper: #ffffff;
  --sw-muted: #4a5058;
  --sw-line: rgba(0, 0, 0, 0.16);
  --sw-accent: #1f5f8b;
  --sw-accent-ink: #ffffff;
  --sw-notice-bg: #1f2328;
  --sw-notice-ink: #ffffff;
  --sw-radius: 10px;
  --sw-display: inherit;
  --sw-measure: 70ch;
  --sw-bar-h: 0px;
}

/* Visually hidden helpers */
.sw-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Demo notice */
.sw-demo {
  background: var(--sw-notice-bg);
  color: var(--sw-notice-ink);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
  padding: 0.4rem 1rem;
}
.sw-demo p { margin: 0; }
.sw-demo a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sw-demo a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Breadcrumbs */
.sw-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}
.sw-crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  opacity: 0.7;
}
.sw-crumbs a {
  color: inherit;
  display: inline-block;
  min-height: 24px;
  text-underline-offset: 2px;
}

/* Policy, thank-you and 404 pages */
.sw-doc__head,
.sw-doc__body {
  width: min(100% - 2.5rem, var(--sw-measure));
  margin-inline: auto;
}
.sw-doc__head { padding-top: clamp(2rem, 6vw, 4rem); }
.sw-doc__title {
  font-family: var(--sw-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
}
.sw-doc__intro { font-size: 1.125rem; color: var(--sw-muted); margin: 0; }
.sw-doc__body { padding: 1.5rem 0 clamp(3rem, 8vw, 5rem); line-height: 1.65; }
.sw-doc__body h2 { font-family: var(--sw-display); font-size: 1.375rem; margin: 2rem 0 0.5rem; }
.sw-doc__body h3 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; }
.sw-doc__body ul:not(.sw-doc__links) { list-style: disc; padding-left: 1.25rem; margin: 0 0 1em; }
.sw-doc__body li + li { margin-top: 0.35rem; }
.sw-doc__body a { color: inherit; text-underline-offset: 2px; }
.sw-doc__date { font-size: 0.875rem; color: var(--sw-muted); }
.sw-doc__promise { font-weight: 700; }
.sw-doc__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.sw-doc__links a {
  display: inline-block;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius);
  text-decoration: none;
}
.sw-doc__links li + li { margin-top: 0; }

/* Shared buttons */
.sw-btn {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--sw-accent);
  border-radius: var(--sw-radius);
  background: var(--sw-accent);
  color: var(--sw-accent-ink);
  cursor: pointer;
}
.sw-btn:hover { filter: brightness(1.08); }
.sw-btn:focus-visible,
.sw-linkish:focus-visible,
.sw-bar a:focus-visible,
.sw-map__link:focus-visible {
  outline: 3px solid var(--sw-ink);
  outline-offset: 3px;
}
.sw-linkish {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  min-height: 24px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Footer legal links */
.sw-legal-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sw-legal-nav a,
.sw-legal-nav .sw-linkish {
  display: inline-block;
  min-height: 24px;
  color: inherit;
  text-underline-offset: 2px;
}

/* Click-to-load map */
.sw-map {
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px dashed var(--sw-line);
  border-radius: var(--sw-radius);
}
.sw-map p { margin: 0; }
.sw-map__addr { font-weight: 700; }
.sw-map__note { font-size: 0.875rem; color: var(--sw-muted); }
.sw-map__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.sw-map__link { color: inherit; text-underline-offset: 2px; }
.sw-map iframe {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: var(--sw-radius);
}

/* Required consent checkbox on forms */
.sw-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
  line-height: 1.45;
}
.sw-agree input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--sw-accent);
}
.sw-agree a { color: inherit; text-underline-offset: 2px; }

/* Mobile call-to-action bar: phones only; the body gets matching bottom padding so nothing is hidden */
.sw-bar { display: none; }
@media (max-width: 760px) {
  :root { --sw-bar-h: calc(3.5rem + env(safe-area-inset-bottom, 0px)); }
  body:has(.sw-bar) { padding-bottom: var(--sw-bar-h); }
  .sw-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: flex;
    gap: 0.5rem;
    height: var(--sw-bar-h);
    padding: 0.4rem 0.75rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
    background: var(--sw-paper);
    border-top: 1px solid var(--sw-line);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
  }
  .sw-bar a {
    flex: 1;
    display: grid;
    place-items: center;
    border-radius: var(--sw-radius);
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--sw-accent);
    color: var(--sw-ink);
  }
  .sw-bar .sw-bar__action { background: var(--sw-accent); color: var(--sw-accent-ink); }
}

/* Cookie banner (only rendered when analytics is configured) */
.sw-consent {
  position: fixed;
  inset: auto 1rem calc(var(--sw-bar-h) + 1rem) 1rem;
  z-index: 70;
  max-width: 34rem;
  padding: 1.25rem;
  background: var(--sw-paper);
  color: var(--sw-ink);
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}
.sw-consent[hidden] { display: none; }
.sw-consent__title { font-family: var(--sw-display); font-size: 1.125rem; margin: 0 0 0.4rem; }
.sw-consent__title:focus { outline: none; }
.sw-consent p { margin: 0 0 0.75rem; font-size: 0.9375rem; line-height: 1.5; }
.sw-consent a { color: inherit; text-underline-offset: 2px; }
.sw-consent fieldset { border: 1px solid var(--sw-line); border-radius: var(--sw-radius); margin: 0 0 0.75rem; padding: 0.5rem 0.9rem 0.75rem; }
.sw-check { display: flex; align-items: center; gap: 0.5rem; min-height: 32px; }
.sw-check input { width: 1.15rem; height: 1.15rem; accent-color: var(--sw-accent); }
.sw-consent__prefs { margin-bottom: 0.75rem; }
.sw-consent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
}
.sw-consent__actions .sw-btn { flex: 1 1 10rem; }

/* Generic reviews / team blocks (used only by sites without their own design) */
.sw-reviews ul,
.sw-team ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}
.sw-review { margin: 0; padding: 1.25rem; border: 1px solid var(--sw-line); border-radius: var(--sw-radius); }
.sw-review blockquote { margin: 0 0 0.75rem; }
.sw-review__meta { color: var(--sw-muted); }
.sw-team img { width: 100%; height: auto; border-radius: var(--sw-radius); }
.sw-team__name { font-weight: 700; margin: 0.5rem 0 0; }
.sw-team__role { color: var(--sw-muted); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .sw-btn { transition: none; }
}
