/* Service Co. design-system custom select — matches the token-driven form fields.
   Self-contained (no Tailwind purge dependency): every color reads the same CSS
   variables as the rest of the UI, so it tracks all 10 skins + light/dark. */
.ds-select { position: relative; width: 100%; }

/* Closed trigger mirrors the native field: 1px input border, bg-background,
   text-sm, px-4 py-3, rounded-md — plus an accent chevron on the right. */
.ds-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-align: left;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ds-select-trigger:hover { border-color: hsl(var(--accent)); }
.ds-select.is-open .ds-select-trigger,
.ds-select-trigger:focus-visible {
  outline: none;
  border-color: hsl(var(--accent));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.25);
}
.ds-select-trigger.is-placeholder .ds-select-label { color: hsl(var(--muted-foreground)); }
.ds-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-select-chevron {
  display: inline-flex;
  color: hsl(var(--accent));
  transition: transform 0.18s ease;
  flex: none;
}
.ds-select.is-open .ds-select-chevron { transform: rotate(180deg); }

/* Open menu: popover surface, hairline border, soft cool shadow, rounded. */
.ds-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px -8px hsl(var(--primary) / 0.28), 0 2px 8px -2px hsl(var(--primary) / 0.16);
}
.ds-select-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  color: hsl(var(--foreground));
}
.ds-select-option[aria-disabled] { color: hsl(var(--muted-foreground)); cursor: default; }
.ds-select-option.is-active { background: hsl(var(--muted)); }
.ds-select-option.is-selected {
  background: hsl(var(--accent) / 0.14);
  color: hsl(var(--accent-foreground));
  font-weight: 600;
}
.dark .ds-select-option.is-selected,
[data-theme="dark"] .ds-select-option.is-selected { color: hsl(var(--foreground)); }
.ds-select-option.is-selected::after {
  content: "";
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: hsl(var(--accent));
  flex: none;
}
