/* ==========================================================================
   WordPress-only additions. The design itself is in style.css and is not
   changed here: this file only covers things the static template never had.
   ========================================================================== */

/* Fixed header and mobile menu sit below the admin bar for logged-in users */
.admin-bar .site-header { top: 32px; }
.admin-bar .mobile-menu { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .mobile-menu { top: 46px; }
}
@media (max-width: 600px) {
  /* WP lets the admin bar scroll away on small screens */
  .admin-bar .site-header, .admin-bar .mobile-menu { top: 0; }
}

/* Honeypot field: off screen for people, still in the DOM for bots */
.form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Form submit: loading state (spinner inside the button) */
.form button[type="submit"] { position: relative; }
.form.is-loading button[type="submit"] { color: transparent; pointer-events: none; }
.form.is-loading button[type="submit"]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: iron-spin .7s linear infinite;
}
@keyframes iron-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .form.is-loading button[type="submit"]::after { animation-duration: 2s; }
}

/* Form error message (server or network) */
.form__error { grid-column: 1 / -1; padding: 14px 16px; border-left: 3px solid var(--red-hot); background: rgba(191, 30, 46, .12); font-size: 15px; }
.form__error[hidden] { display: none; }
.field .input[aria-invalid="true"], .field .select[aria-invalid="true"], .field .textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--red-hot); }

/* Google Maps embed pasted as raw iframe HTML in the options page */
.map iframe { border: 0; }
