/* v1D.3.3a — shared accessibility baseline. */
html {
  scroll-padding-top: 92px;
}

[id] {
  scroll-margin-top: 92px;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 2px solid #0b3d25;
  border-radius: 8px;
  background: #fff;
  color: #0b3d25;
  font-weight: 800;
  box-shadow: 0 8px 24px rgb(15 23 42 / 18%);
}

.skip-link:focus {
  transform: translateY(0);
}

:where(
  a,
  button,
  input,
  select,
  textarea,
  summary,
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 3px solid #17643b;
  outline-offset: 3px;
}

/* WCAG 2.2 AA target-size baseline. Inline text links are intentionally
   excluded because the criterion has an inline-text exception. */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  select,
  summary,
  .button,
  .site-menu-toggle,
  .calendar-category-shortcuts a,
  .organization-jump-nav a,
  .place-photo-thumbnail,
  .map-gallery-arrow
) {
  min-block-size: 24px;
  min-inline-size: 24px;
}

.event-timeframe-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid #d6e0d8;
  border-radius: 999px;
  background: #fff;
}

.event-timeframe-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 16px;
  border-radius: 999px;
  color: #24563a;
  font-weight: 750;
  text-decoration: none;
}

.event-timeframe-tabs a[aria-current="page"] {
  background: #287a4a;
  color: #fff;
}


.event-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 4px;
}

.event-pagination span {
  font-weight: 700;
}

.calendar-past-event-banner {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #d4dfd7;
  border-radius: 12px;
  background: #f4f8f5;
}

.calendar-past-event-banner p {
  margin: 0;
}

.ymu-region-accessible-editor {
  margin-top: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--border-color, #555);
  border-radius: 8px;
}

.ymu-region-accessible-editor summary {
  cursor: pointer;
  font-weight: 700;
}

.ymu-region-accessible-list {
  display: grid;
  gap: .75rem;
  margin-top: .8rem;
}

.ymu-region-accessible-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.25fr) repeat(4, minmax(80px, .75fr)) auto;
  gap: .6rem;
  align-items: end;
}

.ymu-region-accessible-row label {
  display: grid;
  gap: .25rem;
}

.ymu-region-accessible-row input,
.ymu-region-accessible-row select {
  min-height: 36px;
}

@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  [id] { scroll-margin-top: 76px; }

  .ymu-region-accessible-row {
    grid-template-columns: 1fr 1fr;
  }

  .ymu-region-accessible-row label:first-child,
  .ymu-region-accessible-row button {
    grid-column: 1 / -1;
  }
}

@media (pointer: coarse) {
  :where(
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    select,
    summary,
    .button,
    .site-menu-toggle,
    .calendar-category-shortcuts a,
    .organization-jump-nav a,
    .place-photo-thumbnail,
    .map-gallery-arrow
  ) {
    min-block-size: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid Highlight;
  }
}

/* v1D.3.3a2 — smooth in-page navigation and standalone mobile controls. */
html {
  scroll-behavior: smooth;
}

.site-standalone-controls {
  display: none;
}

@media (max-width: 760px) {
  .site-standalone-controls.is-visible {
    display: flex;
    flex: 0 0 auto;
  }

  .site-standalone-control {
    display: inline-grid;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid #d2d9d3;
    border-radius: 999px;
    background: #fff;
    color: #1b3525;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
  }

  .site-standalone-controls.is-visible + .site-logo {
    margin-left: 2px;
  }

}

.ymu-auth-shell {
  display: grid;
  min-height: min(640px, calc(100vh - 180px));
  place-items: start center;
  padding: 38px 16px;
}

.ymu-auth-card {
  width: min(100%, 520px);
}

.ymu-auth-intro {
  margin-bottom: 14px;
  color: #405548;
  font-size: 1.05rem;
}

.ymu-auth-benefits {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 16px 18px 16px 38px;
  border: 1px solid #d9e3db;
  border-radius: 14px;
  background: #f5f9f6;
  color: #244632;
}

.ymu-auth-continue-note {
  font-weight: 700;
}

.event-filter-error {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: #a11d16;
  font-weight: 750;
}

.place-directions-menu {
  position: relative;
}

.place-directions-menu > summary {
  list-style: none;
  cursor: pointer;
}

.place-directions-menu > summary::-webkit-details-marker {
  display: none;
}

.place-directions-options {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 210px;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d5ded7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(20 45 28 / 18%);
}

.place-directions-options a,
.place-directions-options button {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1c5835;
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
}

.place-directions-options a:hover,
.place-directions-options button:hover,
.place-directions-options a:focus-visible,
.place-directions-options button:focus-visible {
  background: #eef6f0;
}

.place-directions-copy-status {
  min-height: 1.25rem;
  padding: 0 10px 4px;
  color: #486052;
  font-size: .85rem;
}

@media (max-width: 760px) {
  .place-directions-options {
    right: auto;
    left: 0;
    width: min(82vw, 280px);
  }
}

.place-directions-menu {
  position: relative;
}

.place-directions-menu > summary {
  list-style: none;
  cursor: pointer;
}

.place-directions-menu > summary::-webkit-details-marker {
  display: none;
}

.place-directions-options {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 210px;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d5ded7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(20 45 28 / 18%);
}

.place-directions-options a,
.place-directions-options button {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1c5835;
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
}

.place-directions-options a:hover,
.place-directions-options button:hover,
.place-directions-options a:focus-visible,
.place-directions-options button:focus-visible {
  background: #eef6f0;
}

.place-directions-copy-status {
  min-height: 1.25rem;
  padding: 0 10px 4px;
  color: #486052;
  font-size: .85rem;
}

@media (max-width: 760px) {
  .place-directions-options {
    right: auto;
    left: 0;
    width: min(82vw, 280px);
  }
}

@media (max-width: 760px) {
  body.is-standalone-webapp .site-header-inner {
    gap: 8px;
    padding-inline: 10px;
  }

  body.is-standalone-webapp .site-menu-toggle {
    padding-inline: 10px;
  }
}


/* v1D.3.3a5 — mobile form usability and account onboarding. */
.ymu-auth-help {
  color: #5f6f64;
  font-size: .88rem;
}

.ymu-auth-help ul {
  margin: 4px 0 0;
  padding-left: 20px;
}

.ymu-auth-field-error {
  color: #a11d16;
  font-size: .9rem;
  font-weight: 700;
}

.ymu-auth-switch {
  margin: 18px 0 0;
  text-align: center;
}

@media (max-width: 760px) {
  :where(
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
    select,
    textarea
  ) {
    font-size: 16px;
  }
}

/* v1D.3.3a10 — use the same directions-provider menu on cards and maps. */
.place-directions-menu--compact {
  display: inline-block;
}

.place-directions-menu--compact > summary {
  color: var(--accent);
  font-weight: 700;
  line-height: 1.5;
}

.place-directions-menu--compact > summary:hover,
.place-directions-menu--compact > summary:focus-visible {
  text-decoration: underline;
}

.card-actions .place-directions-options {
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
  left: auto;
}

/*
 * Keep the provider menu inside the Leaflet popup's normal document flow.
 * Leaflet clips overflow outside .leaflet-popup-content-wrapper.
 */
.map-popup-actions .place-directions-menu {
  width: 100%;
}

.map-popup-actions .place-directions-options {
  position: static;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}


/* v1D.3.3a12 ? keep compact Directions chooser on-screen on mobile. */
@media (max-width: 760px) {
  .card-actions
  .place-directions-options {
    position: fixed;
    z-index: 1200;
    top: auto;
    right: auto;
    bottom: max(
      12px,
      env(safe-area-inset-bottom)
    );
    left: 50%;
    width: min(
      360px,
      calc(100vw - 24px)
    );
    min-width: 0;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    margin: 0;
    transform: translateX(-50%);
  }
}
