/* Civic Concierge — Base + small utility layer
   Used alongside Tailwind Play CDN during prototyping. */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  color: var(--on-surface);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Hide content until i18n has applied translations (prevents flash of English). */
  opacity: 0;
  transition: opacity 120ms ease;
}

body.i18n-ready {
  opacity: 1;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--surface-tint);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--tertiary-fixed);
  color: var(--on-tertiary-fixed);
}

/* Remove default details marker for custom accordion */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* Hide an element until JS decides otherwise */
[hidden] { display: none !important; }

/* Bottom-nav spacer so content is never hidden behind it on mobile */
@media (max-width: 767px) {
  body { padding-bottom: 88px; }
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Glass panel */
.glass-panel {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Status dot */
.status-dot {
  width: 8px; height: 8px; border-radius: 9999px;
  display: inline-block; margin-right: 6px;
}
[dir="rtl"] .status-dot { margin-right: 0; margin-left: 6px; }
.status-dot.open { background: var(--tertiary-fixed-dim); box-shadow: 0 0 0 4px rgba(78,222,163,0.2); }
.status-dot.closed { background: var(--outline); }

/* Material Symbols helper */
.msi {
  font-family: var(--font-icon);
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}
.msi.fill { font-variation-settings: "FILL" 1; }

/* Subtle prose wrapper for legal / long content */
.prose-civic { max-width: 68ch; }
.prose-civic h2 { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-top: 2rem; margin-bottom: 0.75rem; }
.prose-civic h3 { font-size: 1.15rem; font-weight: 600; color: var(--primary); margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose-civic p { color: var(--secondary); line-height: 1.7; margin: 0 0 1rem; }
.prose-civic ul { color: var(--secondary); line-height: 1.7; padding-left: 1.2rem; margin: 0 0 1rem; }
[dir="rtl"] .prose-civic ul { padding-left: 0; padding-right: 1.2rem; }
.prose-civic li { margin-bottom: 0.25rem; }

/* Toast */
.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: var(--on-primary);
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 0.9rem; box-shadow: var(--shadow-card);
  z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity 200ms ease;
}
.toast.show { opacity: 1; }
