/* Allgood Cycling - small additions to Tailwind */

html {
  scroll-padding-top: 5rem;
}

.font-heading {
  font-family: Montserrat, system-ui, sans-serif;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #1B2430;
  color: #ffffff;
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #F28C28;
  outline-offset: 3px;
}
#main:focus {
  outline: none;
}

/* Legal dialogs */
.legal-dialog {
  width: min(42rem, calc(100% - 2rem));
  max-height: min(85vh, 48rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #ffffff;
  color: #1B2430;
  box-shadow: 0 25px 50px -12px rgba(27, 36, 48, 0.35);
  overflow: hidden;
}
.legal-dialog[open] {
  display: flex;
  flex-direction: column;
}
.legal-dialog::backdrop {
  background: rgba(27, 36, 48, 0.65);
}
.legal-dialog .legal-body {
  overflow-y: auto;
}
.legal-body h3 {
  margin-top: 1.25rem;
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #1B2430;
}

body.dialog-open {
  overflow: hidden;
}

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