/* V11 focused regression fixes: dropdown stacking, State 261 chips, and tier identity accents. */

/* Keep searchable dropdowns above sticky/table content while they are open. */
.field:has(.v8-combobox-menu:not([hidden])),
.field:has(.v8-player-menu:not([hidden])),
.field:has(.v7-combobox-menu:not([hidden])) {
  position: relative;
  z-index: 10000 !important;
}

.v8-state-combobox:has(.v8-combobox-menu:not([hidden])),
.v8-player-picker:has(.v8-player-menu:not([hidden])),
.v8-themed-combobox:has(.v7-combobox-menu:not([hidden])) {
  position: relative;
  z-index: 10010 !important;
}

.v8-combobox-menu,
.v8-player-menu,
.v8-themed-combobox .v7-combobox-menu {
  z-index: 10020 !important;
}

.card:has(.v8-combobox-menu:not([hidden])),
.card:has(.v8-player-menu:not([hidden])),
.card:has(.v7-combobox-menu:not([hidden])) {
  overflow: visible !important;
}

/* Defensive fallback for the old state-enhancer bug inside destination chips. */
.chip > input[type="checkbox"].v8-combobox-source,
.chip > input[type="radio"].v8-combobox-source {
  position: static !important;
  width: 16px !important;
  height: 16px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

.chip > input[type="checkbox"] + .v8-state-combobox,
.chip > input[type="radio"] + .v8-state-combobox {
  display: none !important;
}

/* Tier-colored identity card: a calm solid pastel surface with dark readable text. */
.player-identity-card {
  --identity-accent: #94a3b8;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #dbe4ef;
  border-left: 5px solid var(--identity-accent);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}
.player-identity-card.v9-tier-regular { --identity-accent: #94a3b8; background: #f8fafc; }
.player-identity-card.v9-tier-medium { --identity-accent: #60a5fa; background: #f3f8ff; }
.player-identity-card.v9-tier-advanced { --identity-accent: #a78bfa; background: #f8f6ff; }
.player-identity-card.v9-tier-elite { --identity-accent: #eab84f; background: #fffcf3; }
.player-identity-card.v9-tier-unscored { --identity-accent: #cbd5e1; background: #fff; }
.player-identity-card h2 { color: #0f172a; margin-bottom: 0; overflow-wrap: anywhere; }
.player-identity-card > div:first-child { align-items: center; flex-wrap: wrap; }
.player-identity-card .v9-primary-rank { margin-top: 8px; }
.player-identity-card small { color: #64748b; }
.player-identity-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.player-identity-stat { min-width: 0; padding: 10px; border: 1px solid rgba(148, 163, 184, .28); border-radius: 12px; background: rgba(255, 255, 255, .82); }
.player-identity-stat span { display: block; color: #64748b; font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.player-identity-stat strong { display: block; margin-top: 4px; color: #111827; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.player-identity-card .player-identity-id { display: block; margin-top: 12px; overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .player-identity-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
