/* Golden Properties NSW Pty Ltd - small additions to Tailwind */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid #C9A227;
  outline-offset: 3px;
  border-radius: 4px;
}

.on-light :focus-visible,
.on-light:focus-visible {
  outline-color: #7A5E0E;
}

/* Modal dialogs */
dialog.legal-dialog {
  padding: 0;
  border: 0;
  border-radius: 1rem;
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100vh - 3rem);
  color: #121826;
  background: #F8F5EE;
  box-shadow: 0 30px 80px rgba(18, 24, 38, 0.45);
}

dialog.legal-dialog::backdrop {
  background: rgba(18, 24, 38, 0.72);
}

dialog.legal-dialog .legal-body h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: #1F2A44;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

dialog.legal-dialog .legal-body p,
dialog.legal-dialog .legal-body li {
  line-height: 1.65;
  color: #2E3442;
}

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

dialog.legal-dialog .legal-body a {
  color: #7A5E0E;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.modal-open {
  overflow: hidden;
}

/* Form error state */
.field[aria-invalid="true"] {
  border-color: #B42318;
  box-shadow: 0 0 0 1px #B42318;
}

/* Respect reduced-motion preferences */
@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;
  }
}

/* Programmatic focus targets (skip link, in-page anchors) need no outline */
[tabindex="-1"]:focus {
  outline: none;
}
