/* View Transitions — MPA cross-fade (Chrome 111+, no-op in Firefox/Safari) */
@view-transition {
  navigation: auto;
}

/* Named elements for cross-fade continuity */
.activity-hero-image {
  view-transition-name: activity-hero;
}

.site-logo {
  view-transition-name: site-logo;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* Accessible visually-hidden utility: present for screen readers / a11y
   landmarks (e.g. a single page <h1> on island pages) but off-screen.
   Defined globally here because plain Django templates use it outside the
   React bundle that scopes its own copy. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Native controls fall back to the browser font unless told otherwise, so a
   <button> or <input> beside text in the product face rendered in Arial. */
button,
input,
select,
textarea {
  font-family: inherit;
}

/* iOS Safari restyles native date and time inputs after the cascade, so no
   author rule (not even !important) can stop it: unless appearance is none it
   replaces the padding and, for a width that is not a fixed length (such as
   width: 100%), sets a minimum width and content-box sizing, so the field ends
   up wider than its parent. appearance: none switches that off. Incident:
   docs/incidents/2026-11-22-create-form-date-box-overflow.md */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
  -webkit-appearance: none;
  appearance: none;
}

/* With appearance none WebKit gives an empty date input no line box, so it is
   shorter than a filled one (WebKit bug 198959). Bootstrap and the Tailwind
   forms plugin carry the same remedy with 1.5em, for their 1.5 line height;
   1.2em is one line at this product's normal line height, so a filled field
   does not grow. Inert in Chromium and Firefox, so untested here. A rule of
   its own: a browser drops a selector list with a pseudo-element it lacks. */
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value,
input[type="week"]::-webkit-date-and-time-value {
  min-height: 1.2em;
}
