/* Beck Head Property & Finance - small additions to Tailwind */

html {
  scroll-behavior: smooth;
}

main[id],
section[id] {
  scroll-margin-top: 5.5rem;
}

/* Visible keyboard focus */
:focus-visible {
  outline: 3px solid #1F4E5A;
  outline-offset: 3px;
  border-radius: 2px;
}

.on-dark :focus-visible {
  outline-color: #F6F4EF;
}

[tabindex="-1"]:focus {
  outline: none;
}

/* Legal dialogs */
dialog.legal-dialog {
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  border: 0;
  border-radius: 0.75rem;
  padding: 0;
  color: #14232B;
  background: #ffffff;
  box-shadow: 0 25px 60px rgba(20, 35, 43, 0.35);
}

dialog.legal-dialog::backdrop {
  background: rgba(20, 35, 43, 0.72);
}

.legal-body {
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.legal-body h3 {
  margin-top: 1.5rem;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1F4E5A;
}

.legal-body p,
.legal-body ul {
  margin-top: 0.6rem;
  line-height: 1.65;
}

.legal-body ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.legal-body a {
  color: #1F4E5A;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
