/* V8 searchable state/player pickers and migration-rank accents. */
.v8-combobox-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.v8-state-combobox,
.v8-player-picker {
  position: relative;
  width: 100%;
}

.v8-combobox-input-wrap {
  position: relative;
}

.v8-state-display,
.v8-player-picker > .input,
.v8-themed-combobox .v7-combobox-input {
  background: #fff !important;
  color: #172033 !important;
}

.v8-state-display,
.v8-player-picker > .input {
  width: 100%;
  padding-right: 42px !important;
}

.v8-combobox-toggle,
.v8-player-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  z-index: 3;
}

.v8-combobox-menu,
.v8-player-menu,
.v8-themed-combobox .v7-combobox-menu {
  position: absolute;
  z-index: 1600;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  scrollbar-color: #b8c5d8 #f5f8fc;
}

.v8-combobox-menu[hidden],
.v8-player-menu[hidden] {
  display: none;
}

.v8-combobox-option,
.v8-player-option,
.v8-themed-combobox .v7-combobox-option {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #fff !important;
  color: #172033 !important;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.v8-combobox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
}

.v8-combobox-option strong {
  min-width: 44px;
}

.v8-combobox-option span {
  color: #64748b;
  font-size: 13px;
}

.v8-player-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
}

.v8-player-option > span > strong,
.v8-player-option > span > small {
  display: block;
}

.v8-player-option > span > small {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.v8-player-option em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.v8-combobox-option:hover,
.v8-combobox-option.active,
.v8-player-option:hover,
.v8-player-option.active,
.v8-themed-combobox .v7-combobox-option:hover,
.v8-themed-combobox .v7-combobox-option.active {
  background: #eaf2ff !important;
}

.v8-combobox-empty,
.v8-themed-combobox .v7-combobox-empty {
  padding: 10px;
  color: #64748b !important;
  background: #fff !important;
  font-size: 13px;
}

.v8-rank-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.v8-rank-badge {
  white-space: nowrap;
}

.v8-tier-row {
  border-left-width: 4px !important;
}

.v8-tier-regular {
  border-left-color: #94a3b8 !important;
  background-image: linear-gradient(90deg, rgba(148, 163, 184, 0.06), rgba(255, 255, 255, 0) 18%);
}

.v8-tier-medium {
  border-left-color: #60a5fa !important;
  background-image: linear-gradient(90deg, rgba(96, 165, 250, 0.07), rgba(255, 255, 255, 0) 18%);
}

.v8-tier-advanced {
  border-left-color: #a78bfa !important;
  background-image: linear-gradient(90deg, rgba(167, 139, 250, 0.08), rgba(255, 255, 255, 0) 18%);
}

.v8-tier-elite {
  border-left-color: #f0b84b !important;
  background-image: linear-gradient(90deg, rgba(240, 184, 75, 0.09), rgba(255, 255, 255, 0) 18%);
}

.v8-tier-unscored {
  border-left-color: #cbd5e1 !important;
}

.field:has(.v8-state-combobox),
.field:has(.v8-player-picker),
.field:has(.v7-combobox) {
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  .v8-player-option {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .v8-player-option em {
    grid-column: 1 / -1;
  }
}
