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

.xselect {
  position: relative;
  width: 100%;
}

.xselect__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  min-height: 42px;

  border-radius: 12px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, rgba(226, 232, 240, 0.96));

  cursor: pointer;
  outline: none;

  transition:
    transform 0.08s ease,
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.xselect__btn:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.32);
}

.xselect__btn:active {
  transform: translateY(1px);
}

.xselect.is-open .xselect__btn {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.xselect.is-disabled .xselect__btn,
.xselect__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.xselect__value {
  text-align: left;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.xselect__caret {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  opacity: 0.9;

  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;

  transition: transform 0.12s ease, margin-top 0.12s ease, opacity 0.12s ease;
}

.xselect.is-open .xselect__caret {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.xselect__menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  max-width: calc(100vw - 16px);
  z-index: 9999;

  border-radius: 14px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(14px);

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);

  padding: 8px;
  display: grid;
  gap: 8px;

  transform-origin: top;
  animation: xselect-in 120ms ease-out;
}

.xselect__menu[hidden] {
  display: none !important;
}

.xselect__menu[data-placement="top"] {
  transform-origin: bottom;
  animation: xselect-in-up 120ms ease-out;
}

@keyframes xselect-in {
  from {
    transform: translateY(-4px) scale(0.99);
    opacity: 0.0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1.0;
  }
}

@keyframes xselect-in-up {
  from {
    transform: translateY(4px) scale(0.99);
    opacity: 0.0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1.0;
  }
}

@media (prefers-color-scheme: light) {
  .xselect__menu {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.14);
  }
}

.xselect__search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, rgba(226, 232, 240, 0.96));
  outline: none;
}

.xselect__search::placeholder {
  color: var(--muted, rgba(148, 163, 184, 0.9));
}

.xselect__list {
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  gap: 4px;
  padding-right: 2px;
}

.xselect__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;

  color: var(--text, rgba(226, 232, 240, 0.96));
  background: transparent;

  transition: background 0.12s ease, border-color 0.12s ease;
}

.xselect__opt:hover {
  background: rgba(37, 99, 235, 0.14);
}

.xselect__opt.is-active {
  background: rgba(37, 99, 235, 0.18);
  outline: 1px solid rgba(96, 165, 250, 0.35);
}

.xselect__opt.is-selected {
  background: rgba(96, 165, 250, 0.14);
}

.xselect__opt.is-selected::after {
  content: "✓";
  font-weight: 900;
  opacity: 0.92;
}

.xselect__opt.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.xselect__empty {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted, rgba(148, 163, 184, 0.9));
}
