.appointment-page {
  background: #eef0ec;
}

.appointment-main {
  min-height: calc(100vh - 78px);
  padding: 154px 0 112px;
}

.appointment-shell {
  width: min(900px, calc(100% - 96px));
  margin-inline: auto;
}

.appointment-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 78px);
  line-height: 1.05;
}

.appointment-heading p {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.appointment-panel {
  margin-top: 58px;
  padding: 48px;
  border: 1px solid var(--line);
  background: var(--white);
}

.appointment-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 24px;
}

.form-field,
.direction-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 0;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field > span,
.direction-field legend {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.form-field b,
.direction-field b {
  color: #bc3d3d;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(21, 24, 27, 0.28);
  border-radius: 0;
  outline: 0;
  background: #fbfbfa;
  color: var(--ink);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.form-field input {
  height: 54px;
  padding: 0 15px;
}

.form-field textarea {
  min-height: 190px;
  padding: 15px;
  resize: vertical;
  line-height: 1.75;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #92989d;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(21, 94, 239, 0.1);
  background: var(--white);
}

.form-field.is-invalid input,
.form-field.is-invalid textarea,
.direction-field.is-invalid .direction-option span {
  border-color: #bc3d3d;
}

.direction-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.direction-option {
  position: relative;
  cursor: pointer;
}

.direction-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.direction-option span {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(21, 24, 27, 0.28);
  background: #fbfbfa;
  font-size: 13px;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.direction-option:hover span {
  border-color: var(--ink);
}

.direction-option input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.direction-option input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.field-error {
  min-height: 18px;
  margin-top: 7px;
  color: #a52f2f;
  font-size: 11px;
  line-height: 1.5;
}

.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.form-status {
  margin: 24px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(165, 47, 47, 0.35);
  background: rgba(165, 47, 47, 0.06);
  color: #8f2929;
  font-size: 13px;
}

.form-submit-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.appointment-submit {
  min-width: 176px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.appointment-submit:hover:not(:disabled) {
  background: #2b3034;
}

.appointment-submit:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.appointment-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.form-submit-row > small {
  color: #899096;
  font-size: 10px;
  line-height: 1.6;
}

.appointment-success {
  padding: 24px 0;
  outline: 0;
}

.appointment-success h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
}

.appointment-success p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.appointment-footer {
  background: #0b0e11;
  color: rgba(255, 255, 255, 0.62);
}

.appointment-footer > div {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

@media (max-width: 760px) {
  .appointment-main {
    padding: 112px 0 76px;
  }

  .appointment-shell {
    width: calc(100% - 36px);
  }

  .appointment-heading h1 {
    font-size: 44px;
  }

  .appointment-heading p {
    margin-top: 18px;
    font-size: 15px;
  }

  .appointment-panel {
    margin-top: 42px;
    padding: 26px 22px;
  }

  .appointment-fields {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .direction-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .direction-option span {
    width: 100%;
  }

  .form-submit-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .appointment-submit {
    width: 100%;
  }

  .appointment-footer > div {
    min-height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-field input,
  .form-field textarea,
  .direction-option span,
  .appointment-submit {
    transition: none;
  }
}
