/* Shared dropdown surface: native controls remain the form's source of truth. */
body {
  --select-border: color-mix(in srgb, var(--accent) 52%, transparent);
  --select-fill: var(--surface);
  --select-ink: var(--accent-ink);
  --select-radius: 12px;
}
.tgv-select { display: block; position: relative; width: 100%; min-width: 0; }
.tgv-select[hidden] { display: none !important; }
/* Two compact, themed dropdowns replace the browser's unstyleable time popup. */
.tgv-time { display: grid; position: relative; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; min-width: 0; width: 100%; }
.tgv-time[hidden] { display: none !important; }
.tgv-time-separator { color: var(--muted); font-weight: 800; }
body .tgv-time > input.tgv-time-source {
  position: absolute !important; width: 1px !important; min-width: 0 !important;
  height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; clip-path: inset(50%) !important; opacity: 0 !important; pointer-events: none !important;
}
body .tgv-select > select.tgv-select-source {
  position: absolute !important; inset: 0 auto auto 0 !important;
  width: 1px !important; min-width: 0 !important; height: 1px !important; min-height: 0 !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important;
  clip-path: inset(50%) !important; opacity: 0 !important; pointer-events: none !important;
}
body .tgv-select .tgv-select-trigger,
body.webapp-page.is-authenticated #dashboard-shopping .shopping-active-card .custom-select-trigger {
  display: flex !important; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-width: 0; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--select-border) !important; border-radius: var(--select-radius) !important;
  background: var(--select-fill) !important; color: var(--select-ink) !important;
  box-shadow: 0 2px 5px color-mix(in srgb, var(--ink) 4%, transparent) !important;
  font: inherit; font-weight: 650; text-align: start; text-decoration: none;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.tgv-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgv-select-arrow { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); flex-shrink: 0; margin: -4px 2px 0 0; }
body .tgv-select-trigger:focus-visible,
body .tgv-select-trigger[aria-expanded="true"] { outline: 2px solid var(--accent-ink); outline-offset: 2px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent) !important; }
body .tgv-select-trigger:disabled { opacity: .55; cursor: not-allowed; }
body .tgv-select-trigger[aria-invalid="true"] { border-color: #b33d3d !important; }
.tgv-select-menu,
body.webapp-page.is-authenticated .custom-select-menu {
  box-sizing: border-box; padding: 6px !important;
  border: 1px solid var(--select-border) !important; border-radius: var(--select-radius) !important;
  background: var(--surface) !important; color: var(--select-ink) !important;
  box-shadow: 0 14px 36px color-mix(in srgb, var(--ink) 19%, transparent) !important;
  overflow-y: auto !important; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.tgv-select-menu { position: fixed; inset: auto; margin: 0; z-index: 2147483000; max-width: calc(100vw - 16px); }
.tgv-select-menu[hidden] { display: none !important; }
.tgv-select-option,
body.webapp-page.is-authenticated .custom-select-option {
  box-sizing: border-box; padding: 11px 12px !important; margin: 2px 0 !important;
  min-height: 44px; border: 1px solid transparent !important; border-radius: 8px !important;
  background: transparent !important; color: var(--select-ink) !important;
  font: inherit; font-weight: 550; line-height: 1.4; text-align: start;
  overflow-wrap: anywhere; cursor: pointer;
}
.tgv-select-option[aria-selected="true"],
body.webapp-page.is-authenticated .custom-select-option.is-active {
  background: var(--accent-soft) !important; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)) !important; font-weight: 750;
}
.tgv-select-option[aria-selected="true"]::after { content: '✓'; float: right; margin-inline-start: 12px; }
.tgv-select-option.is-active,
.tgv-select-option:hover,
body.webapp-page.is-authenticated .custom-select-option:hover { background: var(--accent-soft) !important; outline: 1px solid var(--accent-ink); outline-offset: -1px; transform: none !important; }
.tgv-select-option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.tgv-select-group { padding: 10px 12px 4px; font-size: .8em; font-weight: 750; color: var(--muted); }
body.webapp-page.is-authenticated .multi-select-chip { border-color: var(--select-border); border-radius: var(--select-radius); background: var(--select-fill); color: var(--select-ink); min-height: 44px; }
body.webapp-page.is-authenticated .multi-select-chip.is-selected { background: var(--accent-soft); border-color: var(--accent-ink); color: var(--select-ink); }
@media (max-width: 700px) { .tgv-select-trigger, .tgv-select-menu { font-size: 16px !important; } }
@media (prefers-reduced-motion: reduce) { body .tgv-select-trigger { transition: none; } }
@media (forced-colors: active) {
  body .tgv-select-trigger, .tgv-select-menu, .tgv-select-option { background: Canvas !important; color: CanvasText !important; border-color: ButtonText !important; }
  .tgv-select-option.is-active, .tgv-select-option[aria-selected="true"] { outline: 2px solid Highlight; }
}
