/* ============================================================================
   SELECT1 — bespoke, accessible custom dropdown (Hyde Park Pharmacy).
   Progressive enhancement over a native <select data-hpp-select>: the real
   <select> stays the source of truth (form value + change events keep firing),
   a styled ARIA combobox/listbox is overlaid. Brand teal/lime/cream, Proxima
   Nova, tabular-nums prices, 44px targets, focus ring, reduced-motion-aware.
   Innovative-but-credible (regulated healthcare): solid surfaces, no glass.
   ============================================================================ */
.hpp-sel { position: relative; font-family: 'Proxima Nova', -apple-system, sans-serif; }

/* native <select> kept in the DOM for value/change/form, hidden from view + AT (the combobox is AT-facing) */
.hpp-sel__native { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; }

/* trigger */
.hpp-sel__btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; cursor: pointer;
  background: #fff; border: 1.6px solid #d8ddd9; border-radius: 13px; padding: 10px 14px;
  font: inherit; font-size: 15px; color: #0A2E36; text-align: left; line-height: 1.2;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.hpp-sel__btn:hover { border-color: #0f5257; background: #fbfdfc; }
.hpp-sel__btn:focus-visible,
.hpp-sel.is-open .hpp-sel__btn {
  outline: none; border-color: #0f5257;
  box-shadow: 0 0 0 3px rgba(167, 205, 58, .34), 0 10px 26px rgba(10, 46, 54, .12);
}
.hpp-sel__val { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hpp-sel__price { flex: none; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  font-weight: 800; font-size: 14px; color: #0f5257; background: #eef5ec; border-radius: 999px; padding: 3px 10px; }
.hpp-sel__chev { flex: none; color: #0f5257; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.hpp-sel.is-open .hpp-sel__chev { transform: rotate(180deg); }

/* panel (listbox) */
.hpp-sel__panel {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 90; margin: 0; padding: 6px;
  list-style: none; background: #FAF7F2; border: 1px solid #e6e0d6; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(10, 46, 54, .28); max-height: min(340px, 60vh); overflow: auto;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.985); transform-origin: top center;
  transition: opacity .18s ease, transform .18s cubic-bezier(.2,.8,.2,1), visibility .18s;
}
.hpp-sel.is-open .hpp-sel__panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* options */
.hpp-sel__opt {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  cursor: pointer; color: #0A2E36; position: relative; transition: background .12s ease, color .12s ease;
}
.hpp-sel__opt-l { flex: 1; min-width: 0; font-weight: 600; }
.hpp-sel__opt-p { flex: none; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  font-weight: 700; font-size: 13.5px; color: #4a5652; }
.hpp-sel__opt.is-active { background: rgba(15, 82, 87, .07); }              /* keyboard/pointer highlight */
.hpp-sel__opt.is-active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px; background: #A7CD3A; }                    /* lime rail */
.hpp-sel__opt[aria-selected="true"] { background: #0f5257; }
.hpp-sel__opt[aria-selected="true"] .hpp-sel__opt-l,
.hpp-sel__opt[aria-selected="true"] .hpp-sel__opt-p { color: #FAF7F2; }
.hpp-sel__opt[aria-selected="true"].is-active::before { background: #A7CD3A; }
.hpp-sel__tick { flex: none; opacity: 0; color: #A7CD3A; transition: opacity .12s ease; }
.hpp-sel__opt[aria-selected="true"] .hpp-sel__tick { opacity: 1; }
.hpp-sel__opt:active { transform: scale(.99); }

@media (prefers-reduced-motion: reduce) {
  .hpp-sel__chev, .hpp-sel__panel, .hpp-sel__opt { transition: none; }
  .hpp-sel__panel { transform: none; }
}

/* SELECT1 v2 — chip-source overlay + per-unit price */
.hpp-sel__chips-src { display: none !important; }            /* the old pill group: hidden, still functional */
.hpp-sel__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: none; line-height: 1.12; }
.hpp-sel__per { font-size: 11px; font-weight: 700; color: #6b7a76; white-space: nowrap;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
/* in the list the price is plain teal (the lime chip is reserved for the trigger) */
.hpp-sel__opt .hpp-sel__price { background: none; padding: 0; color: #0f5257; font-size: 14px; }
.hpp-sel__opt[aria-selected="true"] .hpp-sel__price { color: #FAF7F2; }
.hpp-sel__opt[aria-selected="true"] .hpp-sel__per { color: rgba(250, 247, 242, .82); }
