.ui-select-shell {
  display: block;
  min-width: 0;
  position: relative;
}

.ui-select-shell.is-open {
  z-index: 90;
}

.ui-select-native {
  height: 1px !important;
  left: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  top: 0 !important;
  width: 1px !important;
}

.ui-select-shell > .ui-icon {
  display: none;
}

.ui-select-trigger {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #d8e4f1;
  border-radius: 11px;
  box-shadow: 0 1px 2px rgba(35, 66, 105, 0.03);
  color: #253a57;
  cursor: pointer;
  display: flex;
  font-family: inherit;
  justify-content: space-between;
  min-height: 46px;
  padding: 7px 12px 7px 13px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  width: 100%;
}

.ui-select-trigger:hover:not(:disabled) {
  background: #fff;
  border-color: #a9c8ee;
}

.ui-select-trigger:focus-visible,
.ui-select-trigger[aria-expanded="true"] {
  background: #fff;
  border-color: #72a9ec;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 8px 24px rgba(41, 92, 158, 0.08);
  outline: 0;
}

.ui-select-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ui-select-value {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ui-select-value strong {
  color: #253a57;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select-value small {
  color: #8290a3;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select-trigger .ui-icon {
  color: #7790ad;
  flex: 0 0 auto;
  height: 17px;
  margin-left: 10px;
  transition: color 160ms ease, transform 160ms ease;
  width: 17px;
}

.ui-select-trigger[aria-expanded="true"] .ui-icon {
  color: #2563eb;
  transform: rotate(180deg);
}

.ui-select-menu {
  animation: workspace-select-enter 150ms ease both;
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid #d4e2f2;
  border-radius: 13px;
  box-shadow: 0 20px 48px rgba(31, 65, 111, 0.18), 0 4px 12px rgba(31, 65, 111, 0.08);
  display: grid;
  gap: 4px;
  left: 0;
  max-height: 286px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  position: absolute;
  right: 0;
  scrollbar-color: #bfd0e4 transparent;
  scrollbar-width: thin;
  top: calc(100% + 7px);
  z-index: 100;
}

.ui-select-menu.hidden {
  display: none;
}

.ui-select-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #5e718b;
  cursor: pointer;
  display: flex;
  font-family: inherit;
  gap: 10px;
  justify-content: space-between;
  min-height: 43px;
  padding: 7px 10px 7px 11px;
  text-align: left;
  transition: background 130ms ease, color 130ms ease, box-shadow 130ms ease;
  width: 100%;
}

.ui-select-option > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ui-select-option strong {
  color: #3d536f;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select-option small {
  color: #8998aa;
  font-size: 11.5px;
  font-weight: 560;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select-option > i {
  align-items: center;
  background: #2563eb;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 9px;
  font-style: normal;
  height: 18px;
  justify-content: center;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 130ms ease, transform 130ms ease;
  width: 18px;
}

.ui-select-option:hover,
.ui-select-option:focus-visible {
  background: #f1f6fd;
  box-shadow: inset 3px 0 #80abe4;
  outline: 0;
}

.ui-select-option:hover strong,
.ui-select-option:focus-visible strong {
  color: #1f5fb5;
}

.ui-select-option[aria-selected="true"] {
  background: linear-gradient(100deg, #eaf3ff 0%, #f5f9ff 100%);
  box-shadow: inset 3px 0 #2563eb;
}

.ui-select-option[aria-selected="true"] strong {
  color: #1d5eb7;
}

.ui-select-option[aria-selected="true"] > i {
  opacity: 1;
  transform: scale(1);
}

.ui-select-option:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.match-empty .ui-select-history-empty {
  min-width: min(360px, 100%);
}

.match-history-shell .ui-select-menu {
  left: auto;
  min-width: min(390px, calc(100vw - 36px));
  right: 0;
}

.tv-select-field > span.ui-select-shell {
  background: transparent;
  border: 0;
  height: auto;
}

.tv-source-panel .ui-select-trigger {
  min-height: 40px;
  padding-bottom: 6px;
  padding-top: 6px;
}

.tv-source-panel .ui-select-menu {
  max-height: 260px;
}

.tv-range-row .ui-select-shell {
  flex: 0 0 104px;
}

.tv-range-row .ui-select-trigger {
  border-radius: 8px;
  min-height: 34px;
  padding: 4px 8px 4px 10px;
}

.tv-range-row .ui-select-value strong {
  font-size: 12px;
}

@keyframes workspace-select-enter {
  from { opacity: 0; transform: translateY(-5px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .ui-select-menu,
  .match-history-shell .ui-select-menu {
    left: 0;
    max-width: calc(100vw - 32px);
    min-width: 100%;
    right: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-select-menu { animation: none; }
  .ui-select-trigger,
  .ui-select-trigger .ui-icon,
  .ui-select-option,
  .ui-select-option > i { transition: none; }
}
