/*
  Address autocomplete (src/address/autocomplete-client.mjs).
  Theme it by setting these custom properties on any ancestor:
    --address-ac-surface   list background            (default warm surface)
    --address-ac-ink       text and border            (default deep teal #1B5F6E)
    --address-ac-active    highlighted row background (default butter #FBE37E)
    --address-ac-accent    highlighted row edge       (default orange #F0552B)
    --address-ac-hover     pointer hover background   (default campaign yellow)
    --address-ac-divider   row separators             (default #D4E3E6)
    --address-ac-radius    corner radius              (default 8px)
    --address-ac-z         stacking order             (default 20)
  Flat colors only.
*/
.address-ac-host {
  position: relative;
}

.address-ac__panel {
  position: absolute;
  z-index: var(--address-ac-z, 20);
  box-sizing: border-box;
  margin-top: 4px;
  overflow: hidden;
  background: var(--address-ac-surface, var(--surface, #FDF2C5));
  color: var(--address-ac-ink, #1B5F6E);
  border: 2px solid var(--address-ac-ink, #1B5F6E);
  border-radius: var(--address-ac-radius, 8px);
  font: inherit;
  text-align: left;
}

.address-ac__panel[hidden] {
  display: none;
}

.address-ac__list {
  max-height: min(60vh, 22rem);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.address-ac__option {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 10px 14px 10px 10px;
  border-left: 4px solid transparent;
  line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
}

.address-ac__option + .address-ac__option {
  border-top: 1px solid var(--address-ac-divider, #D4E3E6);
}

.address-ac__option:hover {
  background: var(--address-ac-hover, var(--yellow, #FBE37E));
}

.address-ac__option[aria-selected="true"] {
  background: var(--address-ac-active, #FBE37E);
  border-left-color: var(--address-ac-accent, #F0552B);
}

.address-ac__main {
  font-weight: 700;
}

.address-ac__secondary {
  font-size: 0.875em;
}

/* Google's attribution rules fix this text: Roboto or sans-serif, weight 400,
   12 to 16px, #5E5E5E on a plain light background. Do not theme it away. */
.address-ac__attribution {
  margin: 0;
  padding: 6px 14px 5px;
  border-top: 1px solid var(--address-ac-divider, #D4E3E6);
  background: var(--address-ac-surface, var(--surface, #FDF2C5));
  color: #5E5E5E;
  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  text-align: right;
}

.address-ac__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

input[aria-busy="true"] {
  cursor: progress;
}

@media (forced-colors: active) {
  .address-ac__panel {
    border-color: CanvasText;
  }

  .address-ac__option[aria-selected="true"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
}
