/* Roster-only controls, team crests, and tier badges. */
.mc-roster-filters {
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid #293044;
  border-radius: 12px;
  background: linear-gradient(145deg, #151926, #10131e);
  color: #f1f5f9;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .14);
}

.mc-roster-filters__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.mc-roster-filters__heading > div {
  min-width: 0;
}

.mc-roster-filters__eyebrow {
  margin: 0 0 3px;
  color: #fbbf24;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.mc-roster-filters h2 {
  margin: 0;
  color: #fff;
  font: 700 1.2rem/1.35 'Space Grotesk', sans-serif;
}

.mc-filter-reset {
  flex-shrink: 0;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #394156;
  border-radius: 6px;
  color: #cbd5e1;
  background: #191e2c;
  font: 600 .77rem/1.4 'Inter', sans-serif;
  cursor: pointer;
}

.mc-filter-reset:hover {
  color: #fff;
  border-color: #fbbf24;
}

.mc-roster-filters__controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr) minmax(130px, .8fr);
  gap: 14px;
}

.mc-filter-field {
  min-width: 0;
}

.mc-filter-field label,
.mc-filter-label {
  display: block;
  margin-bottom: 7px;
  color: #dbe3ef;
  font: 700 .74rem/1.4 'Inter', sans-serif;
  letter-spacing: .02em;
}

.mc-roster-filters .mc-search-wrap {
  max-width: none;
}

.mc-roster-filters .mc-search-wrap input,
.mc-filter-field select {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  border: 1px solid #343c52;
  border-radius: 7px;
  color: #f1f5f9;
  background: #0c101b;
  font: 500 .88rem/1.4 'Inter', sans-serif;
}

.mc-roster-filters .mc-search-wrap input {
  border-color: #343c52 !important;
  background: #0c101b !important;
  box-shadow: none;
}

.mc-roster-filters .mc-search-wrap .mc-search-icon {
  color: #a8b5c8;
  font: 600 1.65rem/1 monospace;
  opacity: 1;
}

.mc-filter-field select {
  padding: 10px 34px 10px 12px;
  color-scheme: dark;
  cursor: pointer;
}

.mc-filter-field select:focus-visible,
.mc-roster-filters .mc-search-wrap input:focus-visible {
  border-color: #fbbf24 !important;
  outline: 2px solid #fbbf24 !important;
  outline-offset: 3px;
}

.mc-team-filter-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 20px 0 9px;
}

.mc-team-filter-heading .mc-filter-label {
  margin: 0;
}

.mc-team-filter-heading p {
  margin: 0;
  color: #9ba8bc;
  font-size: .74rem;
}

.mc-team-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-team-chip,
.mc-card-team {
  --team-color: #c6d0df;
  --team-rgb: 198, 208, 223;
  --team-symbol: '✦';
}

.mc-team-red { --team-color: #ff9090; --team-rgb: 255, 144, 144; --team-symbol: '♦'; }
.mc-team-blue { --team-color: #8ab4ff; --team-rgb: 138, 180, 255; --team-symbol: '♜'; }
.mc-team-purple { --team-color: #c7a0ff; --team-rgb: 199, 160, 255; --team-symbol: '✧'; }
.mc-team-green { --team-color: #80dba0; --team-rgb: 128, 219, 160; --team-symbol: '♣'; }
.mc-team-yellow { --team-color: #f7df71; --team-rgb: 247, 223, 113; --team-symbol: '☀'; }
.mc-team-orange { --team-color: #ffb16e; --team-rgb: 255, 177, 110; --team-symbol: '◆'; }
.mc-team-pink { --team-color: #f6a4d4; --team-rgb: 246, 164, 212; --team-symbol: '♥'; }
.mc-team-aqua,
.mc-team-cyan { --team-color: #80e1ed; --team-rgb: 128, 225, 237; --team-symbol: '❖'; }
.mc-team-lime { --team-color: #b7ed75; --team-rgb: 183, 237, 117; --team-symbol: '✿'; }
.mc-team-white { --team-color: #f1f5f9; --team-rgb: 241, 245, 249; --team-symbol: '♖'; }
.mc-team-black { --team-color: #b7bdcf; --team-rgb: 183, 189, 207; --team-symbol: '♠'; }
.mc-team-gray { --team-color: #b8c6d7; --team-rgb: 184, 198, 215; --team-symbol: '⬡'; }
.mc-team-gold { --team-color: #f4c66d; --team-rgb: 244, 198, 109; --team-symbol: '♛'; }
.mc-team-brown { --team-color: #d6ac89; --team-rgb: 214, 172, 137; --team-symbol: '▰'; }
.mc-team-neutral { --team-color: #c6d0df; --team-rgb: 198, 208, 223; --team-symbol: '✦'; }

.mc-team-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(var(--team-rgb), .26);
  border-radius: 6px;
  color: var(--team-color);
  background: rgba(var(--team-rgb), .055);
  font: 700 .76rem/1.4 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.mc-team-chip::before,
.mc-card-team::before {
  content: var(--team-symbol);
  display: inline-block;
  color: var(--team-color);
  font: 900 1rem/1 Georgia, serif;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}

.mc-team-chip:hover {
  border-color: rgba(var(--team-rgb), .8);
  background: rgba(var(--team-rgb), .13);
}

.mc-team-chip[aria-pressed="true"] {
  border-color: var(--team-color);
  background: rgba(var(--team-rgb), .18);
  box-shadow: inset 0 -3px 0 rgba(var(--team-rgb), .3);
}

.mc-team-chip[aria-pressed="true"]::after {
  content: '✓';
  font-size: .74rem;
  font-weight: 900;
}

.mc-team-chip-count {
  opacity: .76;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}

.mc-roster-filters__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 22px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #293044;
}

#roster-filter-summary {
  margin: 0;
  color: #dce5f2;
  font: 600 .76rem/1.6 'Inter', sans-serif;
}

#roster-tier-method {
  max-width: 560px;
  margin: 0;
  color: #9ba8bc;
  font: 400 .72rem/1.6 'Inter', sans-serif;
}

.mc-card-tier,
.mc-card-team,
.mc-card-season {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin-top: 6px;
  vertical-align: middle;
  font: 600 .7rem/1.4 'Inter', sans-serif;
}

.mc-card-team {
  color: var(--team-color);
  overflow-wrap: anywhere;
}

.mc-card-season {
  color: #9ba8bc;
}

.mc-tier-basis {
  display: block;
}

.mc-card-tier {
  margin-right: 7px;
}

.mc-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 23px;
  box-sizing: border-box;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: #bdc9d8;
  background: #1c2431;
  font: 900 .72rem/1.3 'Space Grotesk', monospace;
  letter-spacing: .02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.mc-tier-badge[data-tier^="S"] {
  color: #ffe084;
  background: #3c2b16;
  box-shadow: inset 0 -2px 0 rgba(251, 191, 36, .22);
}

.mc-tier-badge[data-tier^="A"] { color: #d0adff; background: #2d203f; }
.mc-tier-badge[data-tier^="B"] { color: #8fc8ff; background: #192c43; }
.mc-tier-badge[data-tier^="C"] { color: #96dfb8; background: #17372d; }
.mc-tier-badge[data-tier^="D"] { color: #d5dce5; background: #29313d; }
.mc-tier-badge[data-tier^="E"] { color: #edc7a7; background: #3b2a20; }
.mc-tier-badge[data-tier^="F"] { color: #f1abb3; background: #40232c; }
.mc-tier-badge[data-tier="Unranked"] { font-size: .65rem; }

.mc-toolbar .mc-btn-tiers {
  color: #f0e5ff;
  border: 1px solid #9270bf;
  background: linear-gradient(180deg, #65458d, #4b316a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.mc-roster-filters button:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 3px;
}

.mc-auto-tier-panel {
  box-sizing: border-box;
  max-width: 1040px;
}

.mc-auto-tier-panel .mc-admin-title {
  margin-top: 0;
}

.mc-auto-tier-panel .mc-field-select {
  box-sizing: border-box;
  max-width: 360px;
}

.mc-tier-note {
  margin: 10px 0;
  color: var(--mc-text-dim, #9ba8bc);
  font: 400 .76rem/1.65 'Inter', sans-serif;
}

#auto-tier-summary {
  padding: 11px 14px;
  border: 1px solid rgba(251, 191, 36, .25);
  border-left: 3px solid #fbbf24;
  border-radius: 5px;
  color: var(--mc-text, #e2e8f0);
  background: rgba(251, 191, 36, .07);
  font: 600 .8rem/1.6 'Inter', sans-serif;
}

.mc-tier-preview-scroll {
  max-height: 55vh;
  overflow: auto;
  margin: 16px 0;
  border: 1px solid #30394b;
  border-radius: 7px;
  scrollbar-color: #526179 #141a26;
}

.mc-tier-preview-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  color: var(--mc-text, #e2e8f0);
  font: 400 .76rem/1.5 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

.mc-tier-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px;
  color: #dce6f4;
  background: #1c2332;
  text-align: left;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: inset 0 -1px 0 #3c465b;
}

.mc-tier-preview-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(139, 158, 186, .14);
  vertical-align: top;
}

.mc-tier-preview-table tr:last-child td {
  border-bottom: 0;
}

.mc-tier-preview-table tbody tr:nth-child(even) {
  background: rgba(139, 158, 186, .04);
}

.mc-tier-preview-table td:first-child {
  max-width: 190px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mc-auto-tier-panel #auto-tier-apply:disabled {
  opacity: .5;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .mc-roster-filters__controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mc-filter-field--search { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .mc-roster-filters { padding: 17px; }
  .mc-roster-filters__heading { gap: 10px; }
  .mc-roster-filters h2 { font-size: 1.1rem; }
  .mc-filter-reset { padding-inline: 9px; font-size: .71rem; }
  .mc-team-filters { gap: 7px; }
  .mc-team-chip { flex-grow: 1; min-height: 42px; padding-inline: 9px; font-size: .73rem; }
  .mc-auto-tier-panel { padding: 22px 16px 18px; }
  .mc-tier-preview-table th,
  .mc-tier-preview-table td { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .mc-team-chip { transition: none; }
}
