/* Progressive form controls for the request page. Native controls remain the no-JavaScript fallback. */
.custom-control__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.custom-select,
.custom-date {
  position: relative;
  width: 100%;
}

.custom-select__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.72rem 0.8rem;
  color: #17231e;
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  text-align: left;
  background: #fbf8ef;
  border: 1px solid var(--muted, #5a645d);
  border-radius: 0.35rem;
  cursor: pointer;
}

.custom-select__button:hover,
.custom-select.is-open .custom-select__button {
  background: #fffdf7;
}

.custom-date__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.25rem;
  min-height: 3.25rem;
  overflow: hidden;
  background: #fbf8ef;
  border: 1px solid var(--muted, #5a645d);
  border-radius: 0.35rem;
}

.custom-date__control:focus-within {
  border-color: #743322;
}

.form-field .custom-date__control .custom-date__input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0.72rem 0.8rem;
  color: #17231e;
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
}

.custom-date__input::placeholder {
  color: #5a645d;
  opacity: 1;
}

.custom-date__input[aria-invalid="true"] {
  color: #7a2f22;
}

.custom-date__button {
  display: grid;
  width: 3.25rem;
  height: 100%;
  min-height: 0;
  padding: 0;
  place-items: center;
  color: #17231e;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line, #cdbda4);
  cursor: pointer;
}

.custom-date__button:hover,
.custom-date.is-open .custom-date__button {
  background: #f2e7c4;
}

.custom-select__button:focus-visible,
.custom-date__button:focus-visible,
.custom-select__option:focus-visible,
.custom-date button:focus-visible {
  outline: 3px solid #9a4e35;
  outline-offset: 3px;
}

.custom-select__button[aria-invalid="true"] {
  border-color: #9a2f24;
}

.custom-date__control:has(.custom-date__input[aria-invalid="true"]) {
  border-color: #9a2f24;
}

.custom-select__icon,
.custom-date__icon {
  flex: 0 0 auto;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.custom-select__icon {
  margin: -0.3rem 0.15rem 0 0;
  transform: rotate(45deg);
}

.custom-select.is-open .custom-select__icon {
  margin-top: 0.3rem;
  transform: rotate(225deg);
}

.custom-date__icon {
  position: relative;
  width: 1.2rem;
  height: 1.1rem;
  border: 2px solid currentColor;
  border-radius: 0.1rem;
}

.custom-date__icon::before {
  content: "";
  position: absolute;
  top: 0.22rem;
  left: 0;
  width: 100%;
  border-top: 2px solid currentColor;
}

.custom-select__menu,
.custom-date__panel {
  position: absolute;
  z-index: 30;
  margin-top: 0.55rem;
  color: #17231e;
  background: #fffdf7;
  border: 1px solid #203b32;
  border-radius: 0.35rem;
}

.custom-select__menu[hidden],
.custom-date__panel[hidden],
.custom-control__error[hidden] {
  display: none;
}

.custom-select__menu {
  right: 0;
  left: 0;
  max-height: min(22rem, 60vh);
  padding: 0.35rem;
  overflow-y: auto;
}

.custom-select__option {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.7rem 0.8rem;
  line-height: 1.3;
  cursor: pointer;
}

.custom-select__option:hover,
.custom-select__option:focus-visible {
  color: #17231e;
  background: #f2e7c4;
}

.custom-select__option[aria-selected="true"] {
  color: #fffdf7;
  font-weight: 700;
  background: #203b32;
}

.custom-select__option[aria-selected="true"]::before {
  content: "✓";
  margin-right: 0.65rem;
  color: #e7cb74;
  font-weight: 800;
}

.custom-control__error {
  margin: 0.65rem 0 0;
  color: #7a2f22;
  font-size: 0.9rem;
  font-weight: 700;
}

.custom-date__panel {
  right: auto;
  left: 50%;
  box-sizing: border-box;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.8rem;
  transform: translateX(-50%);
}

.custom-date__header {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #cbbd9b;
}

.custom-date__month {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.custom-date__nav,
.custom-date__action,
.custom-date__day {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem;
  color: inherit;
  font: inherit;
  border: 0;
  cursor: pointer;
}

.custom-date__nav {
  display: inline-grid;
  place-items: center;
  background: #f2e7c4;
  border: 1px solid #cbbd9b;
}

.custom-date__nav:hover,
.custom-date__action:hover,
.custom-date__day:hover:not(:disabled) {
  background: #e7cb74;
}

.custom-date__nav:disabled,
.custom-date__action:disabled,
.custom-date__day:disabled {
  color: #756f64;
  background: transparent;
  cursor: not-allowed;
  opacity: 0.55;
}

.custom-date__weekdays,
.custom-date__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.custom-date__weekdays {
  margin-top: 0.45rem;
  color: #7a3b28;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.custom-date__weekdays span {
  display: grid;
  min-height: 2rem;
  place-items: center;
}

.custom-date__day {
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
}

.custom-date__day[aria-current="date"] {
  border-color: #9a4e35;
  font-weight: 800;
}

.custom-date__day[aria-pressed="true"] {
  color: #fffdf7;
  font-weight: 800;
  background: #203b32;
  border-color: #203b32;
}

.custom-date__blank {
  min-height: 2.75rem;
}

.custom-date__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #cbbd9b;
}

.custom-date__action {
  min-width: 4.75rem;
  color: #7a3b28;
  font-weight: 800;
  background: #f2e7c4;
  border: 1px solid #cbbd9b;
}

@media (max-width: 36rem) {
  .custom-select__button {
    min-height: 3.25rem;
    padding-inline: 0.8rem;
  }

  .custom-date__panel {
    width: min(20rem, calc(100vw - 1rem));
    padding: 0.55rem;
  }

  .custom-date__nav {
    min-width: 2.75rem;
  }

  .custom-date__day,
  .custom-date__blank {
    min-width: 0;
    min-height: 2.75rem;
  }
}

@media (min-width: 64rem) and (max-width: 71.999rem) {
  .custom-date__panel {
    width: min(20rem, calc(100vw - 1rem));
  }

  .custom-date__day,
  .custom-date__blank {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-select__icon {
    transition: none;
  }
}

@media (forced-colors: active) {
  .custom-select__button,
  .custom-date__control,
  .custom-date__input,
  .custom-date__button,
  .custom-select__menu,
  .custom-date__panel,
  .custom-select__option,
  .custom-date__nav,
  .custom-date__day,
  .custom-date__action {
    color: ButtonText;
    background: Canvas;
    border-color: ButtonText;
    box-shadow: none;
    forced-color-adjust: auto;
  }

  .custom-select__option[aria-selected="true"],
  .custom-date__day[aria-pressed="true"] {
    color: HighlightText;
    background: Highlight;
  }

  .custom-select__button:focus-visible,
  .custom-date__button:focus-visible,
  .custom-select__option:focus-visible,
  .custom-date button:focus-visible {
    outline-color: Highlight;
  }
}
