:root {
  --clr-base:            #0A0C10;
  --clr-panel:       #12151C;
  --clr-panel-alt:   #1A1F29;
  --clr-line:        #232935;
  --clr-line-strong: #303847;
  --clr-brand:        #E51B23;
  --clr-brand-soft:   rgba(229,27,35,.14);
  --clr-brand-dark:   #B31018;
  --clr-ink:          #F3F5F8;
  --clr-ink-dim:      #A2A9B5;
  --clr-ink-faint:    #656D7A;
  --rad-sm:     6px;
  --rad-md:     10px;
  --rad-lg:     16px;
  --fx-card:   0 1px 0 rgba(255,255,255,.03) inset, 0 10px 28px rgba(0,0,0,.45);
  --fx-hover:  0 12px 34px rgba(229,27,35,.18);
  --ff-display:  'Lexend', sans-serif;
  --ff-body:     'Plus Jakarta Sans', sans-serif;
  --lay-page-max:      1200px;
}

.blc-scope, .blc-scope *, .blc-scope *::before, .blc-scope *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Scoped to our own markup only (breadcrumbs + roster page) — never the theme's header/footer,
   which are siblings of .blc-scope inside the same <body> and must keep the theme's own styling. */
.blc-scope {
  background: var(--clr-base);
  color: var(--clr-ink);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.roster-page img { display: block; max-width: 100%; }

/* Breadcrumbs */
.breadcrumbs { background: var(--clr-base); border-bottom: 1px solid var(--clr-line); padding: 10px 24px; }
.breadcrumbs-inner {
  max-width: var(--lay-page-max); margin: 0 auto; display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--clr-ink-faint);
  font-family: var(--ff-display); font-weight: 600; letter-spacing: .2px;
}
.breadcrumbs-inner a { color: var(--clr-ink-faint); text-decoration: none; }
.breadcrumbs-inner a:hover { color: var(--clr-brand); }
.breadcrumb-sep { opacity: .5; font-family: var(--ff-body); font-weight: 400; }

.roster-page { max-width: var(--lay-page-max); margin: 0 auto; padding: 36px 24px 60px; }

.roster-hero { margin-bottom: 32px; }
.roster-hero h1 {
  font-family: var(--ff-display); font-size: clamp(28px, 4vw, 46px); font-weight: 700;
  color: var(--clr-ink); letter-spacing: -1.5px; line-height: 1.05; margin: 0 0 10px;
}
.roster-hero h1 span { color: var(--clr-brand); }
.roster-hero-sub { font-size: 15px; color: var(--clr-ink-dim); max-width: 560px; margin: 0; }

/* Filters bar — borderless, single row */
.roster-filters {
  background: none; border: none; border-bottom: 1px solid var(--clr-line); border-radius: 0;
  padding: 0 0 20px; margin-bottom: 28px; box-shadow: none;
}
.roster-filters-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.roster-filter-group { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 160px; }
.filter-label { display: none; }
.roster-filter-group .dd-wrap, .roster-filter-group .roster-filter-control { flex: 1; min-width: 0; }
.roster-filters-meta { display: flex; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; color: var(--clr-ink-dim); }
.roster-filters-meta span { display: none; }
.roster-filters-meta strong { color: var(--clr-ink); }
.roster-filters-reset { background: none; border: none; cursor: pointer; font-family: var(--ff-body); font-size: 13px; color: var(--clr-brand); font-weight: 600; padding: 0; display: none; }
.roster-filters-reset.visible { display: inline; }
.roster-filters-reset:hover { color: var(--clr-brand-dark); }

/* Custom searchable dropdown (CSD) */
.dd-wrap { position: relative; user-select: none; }
.dd-trigger {
  width: 100%; height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 32px 0 10px;
  border: none; border-bottom: 1.5px solid var(--clr-line); border-radius: 0; background: var(--clr-panel-alt);
  font-family: var(--ff-body); font-size: 14px; color: var(--clr-ink); cursor: pointer;
  transition: border-color .15s, box-shadow .15s; outline: none; text-align: left; overflow: hidden;
}
.dd-trigger:hover { border-bottom-color: var(--clr-brand); }
.dd-wrap.open .dd-trigger { border-bottom-color: var(--clr-brand); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.dd-trigger-thumb { flex-shrink: 0; display: flex; align-items: center; }
.dd-trigger-thumb img { width: 18px; height: 18px; object-fit: contain; border-radius: 2px; }
.dd-trigger-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-trigger-text.placeholder { color: var(--clr-ink-faint); }
.dd-chevron {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px;
  color: var(--clr-ink-faint); pointer-events: none; flex-shrink: 0; transition: transform .2s;
}
.dd-wrap.open .dd-chevron { transform: translateY(-50%) rotate(180deg); }

.dd-panel {
  position: absolute; top: calc(100% - 1px); left: 0; right: 0; background: var(--clr-panel-alt);
  border: 1.5px solid var(--clr-brand); border-top: none; border-radius: 0 0 var(--rad-md) var(--rad-md);
  box-shadow: 0 12px 28px rgba(0,0,0,.5); z-index: 300; display: none;
}
.dd-wrap.open .dd-panel { display: block !important; }
.roster-filters, .roster-filters-row, .roster-filter-group, .dd-wrap { overflow: visible !important; }

.dd-search-wrap { padding: 7px 8px 6px; border-bottom: 1px solid var(--clr-line); position: relative; }
.dd-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; color: var(--clr-ink-faint); pointer-events: none; }
.dd-search {
  width: 100%; height: 32px; padding: 0 8px 0 28px; border: 1px solid var(--clr-line); border-radius: var(--rad-sm);
  font-family: var(--ff-body); font-size: 13px; color: var(--clr-ink); background: var(--clr-base); outline: none; transition: border-color .15s;
}
.dd-search:focus { border-color: var(--clr-brand); }
.dd-search::placeholder { color: var(--clr-ink-faint); }

.dd-list { max-height: 224px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; }
.dd-list::-webkit-scrollbar { width: 4px; }
.dd-list::-webkit-scrollbar-thumb { background: var(--clr-line-strong); border-radius: 2px; }

.dd-option {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 13.5px; color: var(--clr-ink);
  cursor: pointer; transition: background .1s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dd-option:hover { background: var(--clr-brand-soft); }
.dd-option.active { background: var(--clr-brand-soft); color: var(--clr-brand); font-weight: 600; }
.dd-option.dd-all-opt { font-style: italic; color: var(--clr-ink-faint); border-bottom: 1px solid var(--clr-line); margin-bottom: 2px; }
.dd-option img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; border-radius: 2px; }
.dd-opt-flag { width: 18px; height: 13px; flex-shrink: 0; border-radius: 2px; overflow: hidden; }

.dd-empty { padding: 12px; text-align: center; font-size: 13px; color: var(--clr-ink-faint); display: none; }

/* Nickname search */
.roster-filter-control { position: relative; }
.roster-filter-control input {
  width: 100%; height: 40px; padding: 0 12px 0 34px; border: none; border-bottom: 1.5px solid var(--clr-line); border-radius: 0;
  background: var(--clr-panel-alt); font-family: var(--ff-body); font-size: 14px; color: var(--clr-ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.roster-filter-control input:focus { border-bottom-color: var(--clr-brand); }
.roster-filter-control input:hover { border-bottom-color: var(--clr-brand); }
.roster-filter-control input::placeholder { color: var(--clr-ink-faint); }
.roster-filter-control .roster-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--clr-ink-faint); width: 16px; height: 16px; }

/* Players grid — borderless dark cards, photo badge flag, thin divider */
.roster-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 18px; margin-bottom: 36px; }

.roster-card {
  background: none; border: 1px solid var(--clr-line); border-radius: var(--rad-md);
  overflow: hidden; box-shadow: none; transition: transform .2s, border-color .2s; position: relative;
}
.roster-card:hover { transform: translateY(-4px); border-color: var(--clr-brand); }
.roster-card-link { position: absolute; inset: 0; z-index: 1; }
.roster-card-photo {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--clr-panel-alt); border-bottom: 1px solid var(--clr-line);
}
.roster-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.roster-card:hover .roster-card-photo img { transform: scale(1.06); }
.roster-card-flag {
  position: absolute; bottom: 8px; left: 8px; width: 24px; height: 17px; border-radius: 3px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.roster-card-flag img { width: 100%; height: 100%; object-fit: cover; }
.roster-card-body { padding: 12px 12px 14px; }
.roster-card-nick {
  font-family: var(--ff-display); font-size: 17px; font-weight: 800; color: var(--clr-ink);
  line-height: 1.2; margin-bottom: 6px; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.roster-card-nick a { color: inherit; position: relative; z-index: 2; text-decoration: none; }
.roster-card:hover .roster-card-nick { color: var(--clr-brand); }
.roster-card-country { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--clr-ink-dim); margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--clr-line); }
.roster-card-team { display: flex; align-items: center; gap: 7px; padding: 0; }
.roster-card-team-logo-chip {
  width: 26px; height: 26px; flex-shrink: 0; background: #fff; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.roster-card-team-logo { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.roster-card-team-name { font-size: 12px; font-weight: 600; color: var(--clr-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.roster-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--clr-ink-dim); }
.roster-empty svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: .4; color: var(--clr-ink-faint); }
.roster-empty p { font-size: 15px; }

/* Pagination */
.roster-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 48px; flex-wrap: wrap; }
.roster-page-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px;
  border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none;
  font-family: var(--ff-display); font-size: 14px; font-weight: 700; color: var(--clr-ink-dim);
  cursor: pointer; transition: color .15s, border-color .15s; user-select: none;
}
.roster-page-btn:hover:not(:disabled):not(.active) { color: var(--clr-brand); }
.roster-page-btn.active { color: var(--clr-brand); border-bottom-color: var(--clr-brand); }
.roster-page-btn:disabled { opacity: .35; cursor: default; }
.roster-page-btn svg { width: 14px; height: 14px; }
.roster-page-dots { padding: 0 4px; color: var(--clr-ink-faint); font-size: 16px; line-height: 38px; }

/* WordPress paginate_links() output */
.roster-pagination a.page-numbers,
.roster-pagination span.page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px;
  border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none;
  font-family: var(--ff-display); font-size: 14px; font-weight: 700; color: var(--clr-ink-dim);
  text-decoration: none; transition: color .15s, border-color .15s;
}
.roster-pagination a.page-numbers:hover { color: var(--clr-brand); }
.roster-pagination span.page-numbers.current { color: var(--clr-brand); border-bottom-color: var(--clr-brand); }
.roster-pagination span.page-numbers.dots { border: none; background: transparent; color: var(--clr-ink-faint); }
.roster-pagination a.prev.page-numbers, .roster-pagination a.next.page-numbers { padding: 0 8px; }
.roster-pagination a.prev.page-numbers svg, .roster-pagination a.next.page-numbers svg { width: 14px; height: 14px; }

/* Editorial block — borderless, matching player-profile card style */
.roster-editorial { background: none; border: none; border-top: 1px solid var(--clr-line); border-radius: 0; padding: 28px 0 0; box-shadow: none; }
.roster-editorial h1 { font-family: var(--ff-display); font-size: 30px; font-weight: 800; color: var(--clr-ink); line-height: 1.2; margin: 0 0 18px; }
.roster-editorial h2 { font-family: var(--ff-display); font-size: 22px; font-weight: 800; color: var(--clr-ink); letter-spacing: -.3px; margin: 28px 0 14px; }
.roster-editorial h3 { font-family: var(--ff-display); font-size: 20px; font-weight: 700; color: var(--clr-ink); line-height: 1.3; margin: 22px 0 10px; }
.roster-editorial h4 { font-family: var(--ff-display); font-size: 17px; font-weight: 600; color: var(--clr-ink); line-height: 1.35; margin: 18px 0 8px; }
.roster-editorial h5 { font-family: var(--ff-display); font-size: 15px; font-weight: 600; color: var(--clr-ink); line-height: 1.4; margin: 14px 0 6px; }
.roster-editorial h6 { font-family: var(--ff-display); font-size: 13px; font-weight: 600; color: var(--clr-ink-dim); line-height: 1.4; margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .5px; }
.roster-editorial h1:first-child, .roster-editorial h2:first-child, .roster-editorial h3:first-child { margin-top: 0; }
.roster-editorial p { font-size: 14.5px; color: var(--clr-ink-dim); line-height: 1.75; margin-bottom: 12px; }
.roster-editorial p:last-child { margin-bottom: 0; }
.roster-editorial strong { color: var(--clr-ink); font-weight: 600; }
.roster-editorial ul, .roster-editorial ol { margin: 0 0 16px 22px; padding: 0; }
.roster-editorial ul { list-style: disc; }
.roster-editorial ol { list-style: decimal; }
.roster-editorial li { font-size: 14.5px; color: var(--clr-ink-dim); line-height: 1.75; margin-bottom: 6px; }
.roster-editorial li:last-child { margin-bottom: 0; }
.roster-editorial ul ul, .roster-editorial ol ol, .roster-editorial ul ol, .roster-editorial ol ul { margin: 6px 0 6px 18px; }
.roster-editorial ul ul { list-style: circle; }
.roster-editorial ul ul ul { list-style: square; }

/* Responsive */
@media (max-width: 1024px) {
  .roster-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .roster-filters-row { flex-direction: column; align-items: stretch; }
  .roster-filter-group { width: 100%; }
  .roster-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .roster-editorial { padding: 24px 0 0; }
}
@media (max-width: 480px) {
  .roster-page { padding: 20px 16px 40px; }
  .roster-grid { gap: 10px; }
  .roster-card-body { padding: 10px 10px 12px; }
  .roster-card-nick { font-size: 14px; }
}
