/* Public form typography also applies to pickers mounted outside their form.
   Keep this layer above legacy page-level type rules, including on mobile. */
@layer hds-form-type {
  :root {
    --hds-field-caption: 14px;
    --hds-field-value: 16px;
  }

  :where(form label, form legend, form label > span:first-child,
    .claim-field-label, .directory-filter-label, .brief-dates > span,
    .hds-calendar-weekdays span) {
    font-family: "Inter HDS", Inter, Arial, sans-serif !important;
    font-size: var(--hds-field-caption) !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
  }

  :where(form input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="image"]),
    form textarea, form select, form option, form button[type="submit"],
    form label:has(> input:is([type="checkbox"], [type="radio"])),
    form label:has(> input:is([type="checkbox"], [type="radio"])) > span,
    .hds-home-select-trigger, .hds-home-select-value, .hds-home-select-option,
    .hds-date-trigger, .hds-calendar-header strong, .hds-calendar-month h3,
    .hds-calendar-month h3 span, .hds-calendar-day, .hds-calendar-day span,
    .hds-calendar-footer button) {
    font-family: "Inter HDS", Inter, Arial, sans-serif !important;
    font-size: var(--hds-field-value) !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
  }
}

body .hds-calendar, body .hds-home-select-menu {
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 32px rgb(0 0 0 / 12%);
  overflow: auto;
  max-height: 90dvh;
}
.hds-home-select-menu[hidden] { display: none; }
body .hds-home-select-menu { position: fixed; z-index: 160; padding-block: 6px; }
@media (max-width: 700px) {
  body .hds-home-select-menu { inset: auto 0 0 !important; width: 100% !important; }
}
body .hds-home-select-menu .hds-home-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  cursor: pointer;
  text-align: left;
  padding-inline: 16px;
  border: 0;
  background: white;
  color: #111;
}
body .hds-home-select-menu .hds-home-select-option:is(:hover,:focus-visible) { background: #f5f5f5; }
.hds-home-select-option[aria-selected=true]::after {
  content: "";
  width: 6px;
  height: 12px;
  margin-inline: 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
body .hds-calendar .hds-calendar-header { min-height: 0; padding: 8px 12px; border: 0; }
.hds-calendar .hds-calendar-header nav { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.hds-calendar.is-single-month .hds-calendar-month h3 { display: none; }
.hds-calendar:not(.is-single-month) .hds-calendar-header strong { visibility: hidden; }
.hds-calendar .hds-calendar-day.is-outside { visibility: hidden; }
.hds-calendar .hds-calendar-day span { border-radius: 6px; }
.hds-calendar .hds-calendar-day:is(.is-in-range,.is-start,.is-end)::before { background: #f2f2f2; }
.hds-calendar .hds-calendar-footer { border: 0; }
.hds-calendar .hds-calendar-footer .hds-calendar-apply { min-width: 0; padding-inline: 16px; border-radius: 8px; }

@media (max-width: 700px) {
  body .hds-home-select-menu .hds-home-select-option { min-height: 50px; }
}
