html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

.anubis-select {
  position: relative;
  width: 100%;
  min-width: 0;
  color: var(--text, #181a27);
  font: inherit;
}

select.anubis-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  opacity: 0 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.anubis-select-trigger {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px 0 14px;
  border: 1px solid var(--border, #e3e6ef);
  border-radius: 12px;
  background: var(--bg, #f5f6fa);
  color: var(--text, #181a27);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
  font: inherit;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  appearance: none;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.anubis-select-trigger:hover {
  border-color: color-mix(in srgb, var(--p, #6c4cff) 58%, var(--border, #e3e6ef));
  background: color-mix(in srgb, var(--bg, #f5f6fa) 92%, var(--p, #6c4cff));
}

.anubis-select-trigger:focus-visible,
.anubis-select.is-open .anubis-select-trigger {
  border-color: var(--p, #6c4cff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--p, #6c4cff) 20%, transparent), 0 8px 22px rgba(16, 17, 27, .08);
}

.anubis-select.is-open .anubis-select-trigger { transform: translateY(-1px); }
.anubis-select-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.anubis-select-chevron {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--p, #6c4cff) 11%, transparent);
  color: var(--p, #6c4cff);
  font-size: 18px;
  transition: transform .2s ease, background .2s ease;
}

.anubis-select.is-open .anubis-select-chevron {
  transform: rotate(180deg);
  background: color-mix(in srgb, var(--p, #6c4cff) 18%, transparent);
}

.anubis-select-trigger:disabled { opacity: .55; cursor: not-allowed; }

.anubis-select-menu {
  position: fixed;
  z-index: 3000;
  display: none;
  min-width: 150px;
  max-height: min(320px, calc(100vh - 24px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--p, #6c4cff) 30%, var(--border, #e3e6ef));
  border-radius: 14px;
  background: var(--surface, var(--card, #fff));
  color: var(--text, #181a27);
  box-shadow: 0 22px 55px rgba(8, 10, 22, .24), 0 0 0 1px rgba(255, 255, 255, .025) inset;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--p, #6c4cff) 50%, transparent) transparent;
  animation: anubis-select-in .15s ease-out;
}

.anubis-select-menu.is-visible { display: block; }
.anubis-select-menu::-webkit-scrollbar { width: 6px; }
.anubis-select-menu::-webkit-scrollbar-thumb { border-radius: 999px; background: color-mix(in srgb, var(--p, #6c4cff) 50%, transparent); }

.anubis-select-option {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text, #181a27);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: color .14s ease, background .14s ease, transform .14s ease;
}

.anubis-select-option:hover,
.anubis-select-option.is-active {
  background: color-mix(in srgb, var(--p, #6c4cff) 12%, transparent);
  color: var(--p, #6c4cff);
}

.anubis-select-option:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--p, #6c4cff) 35%, transparent) inset; }
.anubis-select-option[aria-selected="true"] {
  background: linear-gradient(135deg, color-mix(in srgb, var(--p, #6c4cff) 20%, transparent), color-mix(in srgb, #a83cff 14%, transparent));
  color: var(--p, #6c4cff);
  font-weight: 800;
}
.anubis-select-option[aria-disabled="true"] { opacity: .42; cursor: not-allowed; }
.anubis-select-option-text { min-width: 0; flex: 1; overflow-wrap: anywhere; }

.anubis-select-check {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: var(--p, #6c4cff);
  font-size: 16px;
  opacity: 0;
}

.anubis-select-option[aria-selected="true"] .anubis-select-check {
  background: color-mix(in srgb, var(--p, #6c4cff) 15%, transparent);
  opacity: 1;
}

.anubis-select-group {
  padding: 10px 10px 5px;
  color: var(--muted, #787d91);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.anubis-select.is-invalid .anubis-select-trigger {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .14);
}

html[data-theme="dark"] .anubis-select-trigger {
  background: color-mix(in srgb, var(--bg, #101118) 82%, var(--surface, var(--card, #191b24)));
}

html[data-theme="dark"] .anubis-select-menu {
  background: color-mix(in srgb, var(--surface, var(--card, #191b24)) 96%, #090a10);
  box-shadow: 0 24px 65px rgba(0, 0, 0, .48), 0 0 0 1px rgba(255, 255, 255, .025) inset;
}

.store-login-card label > div:has(.anubis-select) { overflow: visible; }

@keyframes anubis-select-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .anubis-select-trigger,
  .anubis-select-chevron,
  .anubis-select-menu,
  .anubis-select-option { animation: none; transition: none; }
}
