/* ==========================================================================
   Homestead Outdoor Products – Appointment Request Form
   Form rules are scoped under .appt; the static hero override uses .appt-hero.

   BRANDING: The primary blue (#5f9ab8) is the site's published theme color.
   Fonts and remaining values are close approximations. To match the live
   site exactly, edit ONLY the variables in the block below.
   ========================================================================== */

.appt {
  /* Brand tokens */
  --hop-primary: #5f9ab8;        /* site theme color */
  --hop-primary-dark: #467c99;   /* hover / links (meets contrast on white) */
  --hop-primary-deep: #2f5f79;   /* pressed state, dark accents */
  --hop-primary-tint: #eaf3f8;   /* soft backgrounds */
  --hop-text: #333a40;
  --hop-muted: #5e6871;
  --hop-border: #c5cfd6;
  --hop-bg: #ffffff;
  --hop-surface: #f5f8fa;
  --hop-error: #b3261e;
  --hop-error-bg: #fdf0ef;
  --hop-success: #2e7d4f;
  --hop-success-bg: #edf7f1;

  --hop-font: "Open Sans", Arial, Helvetica, sans-serif;
  --hop-font-heading: "Montserrat", "Open Sans", Arial, sans-serif;

  --hop-radius: 4px;
  --hop-space: 1.5rem;
  --hop-control-height: 3rem;

  font-family: var(--hop-font);
  color: var(--hop-text);
  line-height: 1.5;
  padding: 3rem 1rem;
  background: var(--hop-surface);
}

.appt *, .appt *::before, .appt *::after { box-sizing: border-box; }

.appt__inner {
  max-width: 760px;
  margin: 0 auto;
  background: var(--hop-bg);
  border-top: 5px solid var(--hop-primary);
  border-radius: var(--hop-radius);
  padding: 2.5rem;
  box-shadow: 0 2px 14px rgba(30, 50, 60, 0.1);
}

/* ---------- Header ---------- */
.appt__title {
  margin: 0 0 0.75rem;
  font-family: var(--hop-font-heading);
  font-size: 2rem;
  line-height: 1.2;
  color: var(--hop-primary-deep);
}
.appt__intro { margin: 0 0 2rem; max-width: 62ch; color: var(--hop-muted); font-size: 1.0625rem; }
.appt__note { margin: 0 0 1.25rem; font-size: 0.875rem; color: var(--hop-muted); }

/* ---------- Layout ---------- */
.appt__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hop-space);
}
@media (min-width: 640px) {
  .appt__grid { grid-template-columns: 1fr 1fr; column-gap: 1.75rem; }
  .appt__field--full { grid-column: 1 / -1; }
}

/* ---------- Fields ---------- */
.appt__field { min-width: 0; }
fieldset.appt__field { margin: 0; padding: 0; border: 0; }
.appt__label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.9375rem;
}
.appt__req { color: var(--hop-error); }
.appt__opt { font-weight: 400; color: var(--hop-muted); font-size: 0.8125rem; }

.appt__control {
  display: block;
  width: 100%;
  min-height: var(--hop-control-height);
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 1rem;              /* 16px prevents iOS zoom on focus */
  color: var(--hop-text);
  background: #fff;
  border: 1px solid var(--hop-border);
  border-radius: var(--hop-radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.appt__control::placeholder { color: #8a949c; }
.appt__control:hover { border-color: var(--hop-primary); }
.appt__control--textarea { resize: vertical; min-height: 7rem; }
.appt__control--select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23467c99' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}

/* Visible focus (keyboard + mouse) */
.appt__control:focus,
.appt__button:focus-visible,
.appt a:focus-visible {
  outline: 3px solid var(--hop-primary-tint);
  outline-offset: 0;
  border-color: var(--hop-primary-dark);
  box-shadow: 0 0 0 3px var(--hop-primary);
}
.appt__button:focus-visible, .appt a:focus-visible { outline: 3px solid var(--hop-primary-deep); outline-offset: 2px; box-shadow: none; }

/* Hints & errors */
.appt__hint { margin: 0.35rem 0 0; font-size: 0.8125rem; color: var(--hop-muted); }
.appt__error { margin: 0.35rem 0 0; min-height: 0; font-size: 0.875rem; font-weight: 600; color: var(--hop-error); }
.appt__error:empty { display: none; }

.appt__choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}
.appt__choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--hop-border);
  border-radius: var(--hop-radius);
  background: #fff;
  cursor: pointer;
}
.appt .appt__choice input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  opacity: 1;
  accent-color: var(--hop-primary-dark);
  flex: 0 0 auto;
}
.appt__choice:focus-within { outline: 3px solid var(--hop-primary-tint); outline-offset: 1px; }

/* Invalid state (set by script.js via .is-invalid) */
.appt__field.is-invalid .appt__choice { border-color: var(--hop-error); background-color: var(--hop-error-bg); }
.appt__field.is-invalid .appt__control {
  border-color: var(--hop-error);
  background-color: var(--hop-error-bg);
}
.appt__field.is-invalid .appt__control:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.35); }

/* ---------- Button ---------- */
.appt__actions { margin-top: 2rem; }
.appt__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 2rem;
  font-family: var(--hop-font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  background: var(--hop-primary-dark);
  border: 0;
  border-radius: var(--hop-radius);
  cursor: pointer;
  transition: background-color 0.15s;
}
@media (min-width: 640px) { .appt__button { width: auto; min-width: 16rem; } }
.appt__button:hover { background: var(--hop-primary-deep); }
.appt__button:active { background: #234a5f; }
.appt__button[disabled] { opacity: 0.7; cursor: progress; }
.appt__button.is-loading::after {
  content: "";
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: appt-spin 0.7s linear infinite;
}
@keyframes appt-spin { to { transform: rotate(360deg); } }

/* ---------- Success / error banners ---------- */
.appt__banner {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  border-left: 5px solid;
  border-radius: var(--hop-radius);
}
.appt__banner[hidden] { display: none; }
.appt__banner p { margin: 0; }
.appt__banner-title { margin: 0 0 0.35rem; font-family: var(--hop-font-heading); font-size: 1.125rem; }
.appt__banner a { color: inherit; font-weight: 700; }
.appt__banner--success { background: var(--hop-success-bg); border-color: var(--hop-success); color: #1d5233; }
.appt__banner--error { background: var(--hop-error-bg); border-color: var(--hop-error); color: #7d1a15; }
.appt__banner:focus { outline: none; }

/* ---------- Utilities ---------- */
.appt__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 480px) {
  .appt { padding: 1.25rem 0.75rem; }
  .appt__inner { padding: 1.5rem 1.25rem; }
  .appt__title { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .appt *, .appt *::before, .appt *::after { animation-duration: 0.01ms !important; transition: none !important; }
}

.appt-hero .flexslider .slides > li { display: block; }

.request-appointment-page .home-wrap.interior.appt-hero { margin-bottom: 0; }
.request-appointment-page .footer { margin-top: 0; }
.request-appointment-page section.appt {
  padding-top: calc(3rem + 40px);
  padding-bottom: calc(3rem + 65px);
}
@media (max-width: 767px) {
  .request-appointment-page section.appt { padding-bottom: calc(3rem + 30px); }
}
@media (max-width: 480px) {
  .request-appointment-page section.appt {
    padding: calc(1.25rem + 40px) 0.75rem calc(1.25rem + 30px);
  }
}
