/* Shared Headframe-specific styles. */

/* Light-mode lock (issue #1596): Headframe ships light-only. Pin
   color-scheme at every level so browser UA defaults for native form
   controls (textarea, input, select, scrollbars) never flip to dark
   when the OS is in dark mode. */
:root,
html {
  color-scheme: light;
}

textarea,
input,
select,
button {
  color-scheme: light;
}

/* Keep Leaflet maps below page-level overlays.
   Leaflet's internal panes carry large z-index values (tile/overlay panes
   400-700, controls up to 1000). Headframe modals and drawers (the HTMX
   partials swapped into #modal-container, the mobile sidebar, fullscreen
   map wrappers) sit at Tailwind z-50, so an embedded map would paint and
   scroll on top of an open dialog. `isolation: isolate` creates a stacking
   context on the map container, bounding Leaflet's z-indexes inside it;
   `z-index: 0` keeps the whole map at base level in the page order.
   Sibling controls overlaid on maps (fullscreen toggle, legends) still
   stack above the map as before. */
.leaflet-container {
  isolation: isolate;
  z-index: 0;
}

/* Markdown content styling for Headframe dynamic components. */
.prose-markdown {
  max-width: none;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.625;
}

.prose-markdown h2,
.prose-markdown h3 {
  font-weight: 600;
}

.prose-markdown h2 {
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  border-left: 4px solid #3b82f6;
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  background-color: #eff6ff;
  padding: 0.5rem 0.75rem;
  color: #1e40af;
  font-size: 1rem;
}

.prose-markdown h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  border-left: 4px solid #3b82f6;
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  background-color: #f0f9ff;
  padding: 0.5rem 0.75rem;
  color: #374151;
  font-size: 0.875rem;
}

.prose-markdown p {
  margin: 0.5rem 0;
  color: #4b5563;
  font-size: 0.875rem;
  line-height: 1.625;
}

.prose-markdown strong {
  color: #1f2937;
  font-weight: 600;
}

.prose-markdown ul,
.prose-markdown ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.prose-markdown ul {
  list-style: disc;
}

.prose-markdown ol {
  list-style: decimal;
}

.prose-markdown li {
  margin: 0.375rem 0;
  color: #4b5563;
  font-size: 0.875rem;
  line-height: 1.375;
}

.prose-markdown li::marker {
  color: #3b82f6;
}

.prose-markdown li > ul {
  padding-left: 0;
  margin: 0;
  list-style: disc;
}

.prose-markdown li > ol {
  padding-left: 0;
  margin: 0;
  list-style: decimal;
}

