/* dbv-rangliste.css — DBV-Rangliste U19/O19
   Mobile-first: Karten <760px, Tabelle ab 760px.
   Nutzt die globalen Design-Tokens aus main.css. */

.dbv-rangliste { padding-bottom: 3rem; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.dbv-hero {
  background: linear-gradient(145deg, var(--primary), var(--primary-dk));
  color: #fff;
  padding: 2rem 0 1.5rem;
  margin-bottom: 1.25rem;
}
.dbv-hero .eyebrow {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .12em;
  opacity: .8; font-weight: 700; margin: 0 0 .25rem;
}
.dbv-hero h1 {
  font-size: 1.75rem; line-height: 1.1; margin: 0 0 .5rem;
}
@media (min-width: 760px) {
  .dbv-hero h1 { font-size: 2.4rem; }
  .dbv-hero    { padding: 2.75rem 0 2rem; }
}
.dbv-hero .lead {
  font-size: .9rem; line-height: 1.45; opacity: .85; margin: 0; max-width: 65ch;
}
.dbv-hero .lead a { color: #fff; text-decoration: underline; }

/* ── Tabs U19 / O19 ───────────────────────────────────────────────────────── */
.dbv-tabs {
  display: flex; gap: .5rem; margin-top: 1rem;
}
.dbv-tabs a {
  flex: 1; max-width: 200px;
  padding: .65rem 1rem; text-align: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; color: #fff; text-decoration: none;
  font-weight: 700; font-size: .95rem;
  background: rgba(255,255,255,.06);
  transition: var(--transition);
}
.dbv-tabs a.active,
.dbv-tabs a:hover { background: #fff; color: var(--primary); border-color: #fff; }

/* ── Disziplin-Tabs (primärer Filter, kicker.de-Stil) ─────────────────────── */
.dbv-discipline-tabs {
  display: flex; gap: .35rem; overflow-x: auto;
  margin: .25rem 0 .75rem;
  padding-bottom: .25rem;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--gray-200);
}
.dbv-discipline-tabs .dis-tab {
  flex: 0 0 auto;
  display: inline-flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--gray-700);
  padding: .55rem .9rem; border-radius: 8px 8px 0 0;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  min-width: 5.5rem;
}
.dbv-discipline-tabs .dis-tab:hover { background: var(--gray-50); color: var(--primary); }
.dbv-discipline-tabs .dis-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--gray-50);
}
.dbv-discipline-tabs .dis-tab__code { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.dbv-discipline-tabs .dis-tab__label { font-size: .7rem; color: var(--gray-600); margin-top: .15rem; white-space: nowrap; }
.dbv-discipline-tabs .dis-tab.active .dis-tab__label { color: var(--primary); }

/* ── Altersklassen-Tabs ───────────────────────────────────────────────────── */
.dbv-age-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin: 0 0 .9rem;
}
.dbv-age-tabs .age-tab {
  display: inline-block;
  padding: .35rem .8rem;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: #fff;
  color: var(--gray-700);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: var(--transition);
}
.dbv-age-tabs .age-tab:hover { background: var(--gray-50); color: var(--primary); }
.dbv-age-tabs .age-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── Filter ──────────────────────────────────────────────────────────────── */
.dbv-filters { margin-bottom: 1rem; }
.dbv-filters .filter-row {
  display: grid; grid-template-columns: 1fr; gap: .5rem;
}
@media (min-width: 760px) {
  .dbv-filters .filter-row {
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: center;
  }
}
.dbv-filters input[type="search"],
.dbv-filters select,
.dbv-filters .btn-apply {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: .6rem .75rem;
  background: #fff;
  font: inherit;
  color: var(--gray-800);
}

/* Such-Modus-Zeile: kleiner Toggle UNTERHALB der Filter-Row, links bündig.
   So bleiben Suchfeld + Dropdowns + Button auf gleicher Höhe in einer Zeile. */
.dbv-filters .search-mode-row {
  display: flex; align-items: center; gap: .6rem;
  margin-top: .55rem; padding-left: 2px;
}
.dbv-filters .search-mode-label {
  font-size: .8rem; color: var(--gray-600); font-weight: 600;
}
.dbv-filters .search-mode {
  display: inline-flex; gap: 0;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 2px;
}
.dbv-filters .search-mode label {
  cursor: pointer;
  padding: .3rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-700);
  border-radius: 999px;
  transition: var(--transition);
  white-space: nowrap;
}
.dbv-filters .search-mode label:hover { color: var(--primary); }
.dbv-filters .search-mode label.active {
  background: var(--primary); color: #fff;
}
.dbv-filters .search-mode input[type="radio"] {
  /* Radio-Inputs visuell verstecken, Label-Klick toggelt */
  position: absolute; opacity: 0; width: 0; height: 0;
}
.dbv-filters .btn-apply {
  background: var(--primary); color: #fff; border-color: var(--primary);
  font-weight: 700; cursor: pointer;
}
.dbv-filters .btn-apply:hover { background: var(--primary-dk); }

.lv-chips {
  display: flex; gap: .4rem; overflow-x: auto;
  padding: .25rem 0 .5rem; margin-top: .5rem;
  -webkit-overflow-scrolling: touch;
}
.lv-chips .chip {
  flex: 0 0 auto;
  padding: .35rem .65rem; border-radius: 999px;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  color: var(--gray-700); font-size: .8rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.lv-chips .chip:hover { background: var(--gray-200); }
.lv-chips .chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.lv-chips .chip-count { opacity: .65; margin-left: .25rem; font-weight: 500; }
.lv-chips .chip.active .chip-count { opacity: .85; color: #fff; }

/* ── Ergebnisse ──────────────────────────────────────────────────────────── */
.dbv-results { padding-top: .5rem; }
.dbv-meta { color: var(--gray-600); font-size: .85rem; margin: 0 0 .75rem; }
.dbv-empty { padding: 2rem; text-align: center; color: var(--gray-600); }
.dbv-info {
  background: var(--blue-light); color: var(--blue-text);
  padding: .55rem .75rem; border-radius: 6px;
  margin: 0 0 .9rem; font-size: .85rem; line-height: 1.45;
  border-left: 3px solid var(--blue-text);
}

/* Karten (mobile) */
.dbv-cards { display: grid; gap: .75rem; }
@media (min-width: 760px) { .dbv-cards { display: none; } }

.dbv-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: .9rem 1rem;
  box-shadow: var(--shadow-sm);
}
.dbv-card .topline {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: .75rem;
}
.dbv-card .rank {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--primary); display: block;
}
.dbv-card .prev { font-size: .75rem; color: var(--gray-600); display: block; }
.dbv-card .name { font-weight: 700; font-size: 1rem; margin-top: .5rem; }

/* Verlinkte Spielernamen: dezent unterstrichen, Hover hebt hervor.
   Wird gerendert, wenn der Spieler einen Eintrag in players.dbv_licence_nr hat
   (siehe public/_app/controllers/dbv_rangliste.php → $_renderName). */
.dbv-player-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--gray-400);
  transition: var(--transition);
}
.dbv-player-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.dbv-card .club { color: var(--gray-700); font-size: .85rem; line-height: 1.35; margin-top: .15rem; }
.dbv-card .club .lv { color: var(--gray-600); font-size: .78rem; }
.dbv-card .meta { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .55rem; }
.dbv-card .pill {
  background: var(--gray-100); color: var(--gray-700);
  font-size: .72rem; padding: .2rem .55rem; border-radius: 999px; font-weight: 600;
}
.pill-type {
  background: var(--accent) !important; color: #fff !important;
}
.dbv-card .metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .65rem;
}
.dbv-card .metrics > div {
  background: var(--gray-50); border-radius: 8px; padding: .55rem;
}
.dbv-card .metrics b { display: block; font-size: 1rem; color: var(--gray-800); }
.dbv-card .metrics span { font-size: .7rem; color: var(--gray-600); }
.dbv-card .player-id {
  margin-top: .55rem; font-size: .7rem; color: var(--gray-600); font-family: ui-monospace, monospace;
}

/* Delta-Badges */
.delta {
  display: inline-block; padding: .15rem .5rem;
  border-radius: 999px; font-weight: 700; font-size: .8rem;
  background: var(--gray-100); color: var(--gray-700);
}
.delta.up   { background: var(--green-light); color: var(--success); }
.delta.down { background: #fee2e2; color: var(--danger); }
.delta.neu  { background: var(--blue-light); color: var(--blue-text); }

/* Tabelle (desktop) */
.dbv-table { display: none; }
@media (min-width: 760px) {
  .dbv-table {
    display: table; width: 100%; border-collapse: collapse; font-size: .9rem;
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow-sm);
  }
  .dbv-table th, .dbv-table td {
    padding: .65rem .75rem; text-align: left; border-bottom: 1px solid var(--gray-200);
  }
  .dbv-table th {
    background: var(--gray-50); font-size: .75rem; color: var(--gray-700);
    font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  }
  .dbv-table tbody tr:hover { background: var(--gray-50); }
  .dbv-table small { display: block; color: var(--gray-600); font-family: ui-monospace, monospace; font-size: .72rem; }
}

/* Pagination */
.dbv-pagination {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin: 1.5rem 0; font-size: .9rem; color: var(--gray-700);
}
.dbv-pagination a {
  text-decoration: none; color: var(--primary); font-weight: 700;
  padding: .4rem .9rem; border: 1px solid var(--gray-300); border-radius: var(--radius);
  background: #fff;
}
.dbv-pagination a:hover { background: var(--gray-50); }

/* Wochenarchiv */
.dbv-week-archive {
  margin-top: 2rem; padding: .75rem 1rem;
  background: var(--gray-50); border-radius: 8px; border: 1px solid var(--gray-200);
}
.dbv-week-archive summary { cursor: pointer; font-weight: 700; color: var(--gray-800); }
.dbv-week-archive ul { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.dbv-week-archive a {
  display: inline-block; padding: .3rem .65rem;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 999px;
  text-decoration: none; color: var(--gray-700); font-size: .8rem; font-weight: 600;
}
.dbv-week-archive a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.dbv-week-archive a.current { background: var(--accent); color: #fff; border-color: var(--accent); }
