/* ParlayDesk themed select menu (2026-10-12) — see /pd-select.js.
   Same visual language as the Builder Game picker (.game-select in
   /apps/styles.css): dark surface, 10px radius, 5px inset, 7px rows,
   accent-colored current choice. Tokens fall back to the app palette so
   the menu looks the same on pages that don't define them. */
.pd-select-menu {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10050;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px;
  margin: 0;
  background: var(--bg0, #0b1220);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  color: var(--text, #e5e7eb);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.3;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.pd-select-menu[hidden] { display: none; }
.pd-select-menu::-webkit-scrollbar { width: 6px; }
.pd-select-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 6px; }

.pd-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 38px;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  min-width: 0;
}
.pd-select-option-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.pd-select-check {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}
.pd-select-option.is-active { background: rgba(255, 255, 255, 0.06); }
.pd-select-option.is-current { color: var(--accent2, #60a5fa); font-weight: 600; }
.pd-select-option.is-current .pd-select-check { visibility: visible; }
.pd-select-option.is-disabled { opacity: 0.4; cursor: default; }
.pd-select-option.is-disabled.is-active { background: none; }

.pd-select-group-label {
  flex: 0 0 auto;
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #9ca3af);
}
.pd-select-group-label:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1)); padding-top: 10px; }
.pd-select-empty { padding: 10px; font-size: 12px; opacity: 0.6; }

/* Touch: comfortable targets (Apple HIG 44pt). */
@media (pointer: coarse) {
  .pd-select-option { min-height: 44px; }
}

/* The select whose menu is open reads as the open trigger, like the Game
   picker's accent border. */
select.pd-select-open { border-color: var(--accent, #3b82f6) !important; }
