/* Request a Visit: authoritative intake layout */
body[data-page="request-visit"] .request-section {
  background: #f8f6f1;
  padding: 14px 0 26px;
}

.request-layout {
  width: min(calc(100% - 40px), 1080px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 850px) 206px;
  align-items: start;
  gap: 16px;
}

.appointment-form {
  min-width: 0;
  background: #fff;
  border: 1px solid #e1dbe7;
  border-radius: 10px;
  padding: 16px 18px 17px;
  box-shadow: 0 8px 26px rgba(36, 16, 79, .055);
}

.form-intro {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) minmax(330px, 1.3fr);
  align-items: end;
  gap: 18px;
  margin-bottom: 12px;
}

.form-title .kicker {
  margin-bottom: 3px;
  font-size: 9px;
}

.form-title h1 {
  margin: 0;
  color: var(--purple);
  font-family: var(--serif);
  font-size: clamp(25px, 2.1vw, 31px);
  font-weight: 600;
  line-height: 1;
}

.privacy-guidance {
  margin: 0 0 1px;
  padding: 4px 0 4px 9px;
  border-left: 2px solid var(--gold);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.privacy-guidance strong {
  color: var(--purple);
}

.appointment-form .form-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr 1fr;
  gap: 9px 10px;
}

.appointment-form .form-grid > label {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.appointment-form .form-grid .full,
.form-section-title {
  grid-column: 1 / -1;
}

.appointment-form .form-grid .field-wide {
  grid-column: span 2;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding-top: 8px;
  border-top: 1px solid #e7e1ea;
}

.form-section-title > span {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: #9a7017;
  font-size: 8.5px;
  font-weight: 850;
}

.form-section-title h3 {
  margin: 0;
  color: var(--purple);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
}

.form-section-title p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.appointment-form .form-grid label > span:first-child {
  margin-bottom: 3px;
  color: #40384a;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
}

.appointment-form .form-grid label > span small {
  color: #77707e;
  font-size: .88em;
  font-weight: 600;
}

.appointment-form .form-grid input:not([type="checkbox"]),
.appointment-form .form-grid textarea {
  width: 100%;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  border: 1px solid #d6cfdd;
  border-radius: 6px;
  background-color: #fff;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.appointment-form .form-grid textarea {
  height: 76px;
  min-height: 76px;
  max-height: 140px;
  resize: vertical;
}

.appointment-form .form-grid input::placeholder,
.appointment-form .form-grid textarea::placeholder {
  color: #8a8490;
}

.appointment-form .form-grid input:not([type="checkbox"]):hover,
.appointment-form .form-grid textarea:hover {
  border-color: #bdb1c9;
}

.appointment-form .form-grid input:focus-visible,
.appointment-form .form-grid textarea:focus-visible,
.appointment-form .form-grid input[aria-invalid="true"]:focus-visible,
.appointment-form .form-grid textarea[aria-invalid="true"]:focus-visible {
  outline: 0;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(50, 22, 111, .14);
}

.appointment-form .form-grid input[aria-invalid="true"],
.appointment-form .form-grid textarea[aria-invalid="true"] {
  border-color: #a33a46;
  background: #fffafa;
}

/* Premium AthenaCare dropdown system */
.premium-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.premium-select__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.premium-select__button {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px 7px 11px;
  border: 1px solid #d6cfdd;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(250, 248, 252, .98));
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(69, 32, 95, .025);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  line-height: 1.25;
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    background-color .16s ease;
}

.premium-select__button:hover {
  border-color: #b8a9c7;
  background: #fff;
}

.premium-select__button:focus-visible,
.premium-select.is-open .premium-select__button {
  outline: 0;
  border-color: var(--purple);
  box-shadow:
    0 0 0 3px rgba(90, 42, 124, .13),
    0 7px 18px rgba(69, 32, 95, .08);
}

.premium-select__button[aria-invalid="true"] {
  border-color: #a33a46;
  background: #fffafa;
}

.premium-select__button[aria-invalid="true"]:focus-visible,
.premium-select.is-open .premium-select__button[aria-invalid="true"] {
  box-shadow: 0 0 0 3px rgba(163, 58, 70, .12);
}

.premium-select.has-placeholder .premium-select__value {
  color: #817988;
}

.premium-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.premium-select__chevron {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(200, 149, 34, .34);
  border-radius: 7px;
  background: rgba(234, 211, 154, .18);
  color: var(--gold);
}

.premium-select__chevron span {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .16s ease;
}

.premium-select.is-open .premium-select__chevron span {
  transform: translateY(2px) rotate(225deg);
}

.premium-select__list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 236px;
  display: grid;
  gap: 3px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #ddd3e6;
  border-radius: 12px;
  background: rgba(255, 255, 255, .985);
  box-shadow:
    0 18px 42px rgba(69, 32, 95, .17),
    0 2px 8px rgba(69, 32, 95, .08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) scale(.985);
  transform-origin: top center;
  transition:
    opacity .14s ease,
    visibility .14s ease,
    transform .14s ease;
}

.premium-select.is-open .premium-select__list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.premium-select__option {
  width: 100%;
  min-height: 37px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #393143;
  cursor: pointer;
  text-align: left;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
}

.premium-select__option:hover,
.premium-select__option:focus-visible {
  outline: 0;
  background: var(--lilac);
  color: var(--purple);
}

.premium-select__option[aria-selected="true"] {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 5px 14px rgba(90, 42, 124, .18);
}

.premium-select__check {
  width: 21px;
  height: 21px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: var(--gold-soft);
  opacity: 0;
  font-size: 12px;
  font-weight: 900;
}

.premium-select__option[aria-selected="true"] .premium-select__check {
  opacity: 1;
}

.premium-select__list::-webkit-scrollbar {
  width: 8px;
}

.premium-select__list::-webkit-scrollbar-track {
  background: transparent;
}

.premium-select__list::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #c9bdd4;
}

@media (max-width: 640px) {
  .premium-select__button {
    min-height: 44px;
    font-size: 13px;
  }

  .premium-select__option {
    min-height: 44px;
    font-size: 13px;
  }

  .premium-select__list {
    max-height: 264px;
  }
}

.field-error {
  min-height: 0;
  margin-top: 3px;
  color: #8f2633;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
}

.field-error:empty {
  display: none;
}

.field-hint,
#reason-help {
  display: block;
  margin-top: 3px;
  color: #77707e;
  font-size: 8.5px;
  line-height: 1.3;
}

.appointment-form .form-grid .consent {
  display: grid;
  grid-template-columns: 17px 1fr;
  align-items: start;
  gap: 8px;
  margin-top: 1px;
  padding: 8px 9px;
  border: 1px solid #e4ddeb;
  border-radius: 6px;
  background: #faf8fc;
}

.appointment-form .form-grid .consent input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--purple);
}

.appointment-form .form-grid .consent > span:first-of-type {
  margin: 0;
  color: #50485a;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.4;
}

.appointment-form .form-grid .consent .field-error {
  grid-column: 2;
}

.submit-button {
  min-height: 42px;
  margin-top: 11px;
  border-radius: 8px;
  padding-inline: 18px;
  box-shadow: none;
}

.submit-button:hover,
.submit-button:focus-visible {
  box-shadow: 0 7px 18px rgba(50, 22, 111, .15);
  transform: translateY(-1px);
}

.form-note {
  max-width: 620px;
  margin: 7px 0 0;
  color: #78717f;
  font-size: 9px;
  line-height: 1.4;
}

.request-aside {
  position: sticky;
  top: 106px;
  min-width: 0;
  border: 1px solid rgba(234, 211, 154, .45);
  border-radius: 9px;
  background: var(--purple-deep);
  color: #fff;
  padding: 14px;
  box-shadow: 0 7px 22px rgba(36, 16, 79, .09);
}

.request-aside h2 {
  margin: 0 0 4px;
  color: #fff;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.request-aside > a {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--gold-soft);
  font-size: 15px;
  font-weight: 800;
}

.request-aside > p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
  line-height: 1.5;
}

.mini-notice {
  display: grid;
  gap: 2px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 9.5px;
  line-height: 1.4;
}

.mini-notice strong {
  color: var(--gold-soft);
}

.request-result {
  border: 1px solid #e1dbe7;
  border-radius: 10px;
  background: #fff;
  padding: 26px;
  box-shadow: 0 8px 26px rgba(36, 16, 79, .055);
}

@media (max-width: 900px) {
  .request-layout {
    width: min(calc(100% - 32px), 780px);
    grid-template-columns: 1fr;
  }

  .appointment-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-form .form-grid .field-wide {
    grid-column: 1 / -1;
  }

  .request-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 18px;
  }

  .request-aside h2,
  .request-aside > a,
  .request-aside > p {
    grid-column: 1;
  }

  .request-aside .mini-notice {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin: 0;
    padding: 3px 0 3px 16px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, .14);
  }
}

@media (max-width: 640px) {
  body[data-page="request-visit"] .request-section {
    padding: 10px 0 20px;
  }

  .request-layout {
    width: min(calc(100% - 20px), 520px);
    gap: 10px;
  }

  .appointment-form {
    padding: 13px 12px 15px;
  }

  .form-intro {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 7px;
    margin-bottom: 10px;
  }

  .form-title h1 {
    font-size: 27px;
  }

  .appointment-form .form-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .appointment-form .form-grid .full,
  .appointment-form .form-grid .field-wide,
  .appointment-form .form-grid .comment-field {
    grid-column: auto;
  }

  .form-section-title {
    gap: 8px;
    margin-top: 2px;
    padding-top: 9px;
  }

  .form-section-title > span {
    width: 24px;
    height: 24px;
  }

  .form-section-title h3 {
    font-size: 16px;
  }

  .appointment-form .form-grid label > span:first-child {
    font-size: 11px;
  }

  .appointment-form .form-grid input:not([type="checkbox"]),
  .appointment-form .form-grid select {
    height: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  .appointment-form .form-grid textarea {
    height: 76px;
    min-height: 76px;
    font-size: 16px;
  }

  .field-error {
    font-size: 10px;
  }

  .submit-button {
    width: 100%;
    min-height: 44px;
  }

  .request-aside {
    display: block;
    padding: 13px 14px;
  }

  .request-aside .mini-notice {
    margin-top: 9px;
    padding: 9px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .14);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .appointment-form *,
  .submit-button {
    transition: none;
  }
}
