/* ═══════════════════════════════════════════════════════════
   EP Gegner – Frontend CSS
   Angepasst an das Theme "Eislöwen-Power". Farben laufen über
   --epg-* Variablen, die das Theme (Design → DCL Einstellungen →
   Gegner-Farben) überschreibt. Ohne Theme greifen die Fallbacks.
═══════════════════════════════════════════════════════════ */

.epg-wrap {
  --epg-card:      var(--dcl-card,        #12233b);
  --epg-card-2:    var(--dcl-anthracite2, #1a2f4a);
  --epg-navy:      var(--dcl-black,       #060b14);
  --epg-accent:    var(--dcl-accent,      #e0293f);
  --epg-border:    var(--dcl-border,      #23405f);
  --epg-text:      var(--dcl-text,        #eef3f9);
  --epg-muted:     var(--dcl-muted,       #93a5bd);
  --epg-ice:       var(--dcl-ice,         #cfe3f7);

  /* einzeln überschreibbar */
  --epg-logo-bg:   var(--epg-card-2);
  --epg-name:      var(--epg-text);
  --epg-arena:     var(--epg-muted);
  --epg-km:        var(--epg-accent);
  --epg-km-bg:     var(--epg-navy);

  --epg-fh: var(--dcl-font-head, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  --epg-fb: var(--dcl-font-body, 'Inter', 'Segoe UI', Arial, sans-serif);

  font-family: var(--epg-fb);
  color: var(--epg-text);
}

/* ── Grid ────────────────────────────────────────────────
   Mobile-first: 1 Spalte. Mehr erst ab Breakpoint – so kann
   keine Spaltenangabe die Media Queries aushebeln.
──────────────────────────────────────────────────────── */
.epg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .epg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .epg-grid.epg-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .epg-grid.epg-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .epg-grid.epg-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Gegner-Karte ───────────────────────────────────────── */
.epg-card {
  display: block;
  background: var(--epg-card);
  border: 1px solid var(--epg-border);
  border-top: 3px solid var(--epg-accent);
  padding: 22px 20px 0;
  min-width: 0;
  text-align: center;
  text-decoration: none !important;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
a.epg-card:hover {
  transform: translateY(-4px);
  border-color: var(--epg-accent);
  box-shadow: 0 16px 36px rgba(0,0,0,.4);
}

.epg-card-logo {
  width: 78px; height: 78px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--epg-logo-bg);
  border: 1px solid var(--epg-border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.epg-card-logo img {
  width: 72%; height: 72%;
  object-fit: contain;
}
.epg-card-ph {
  font-family: var(--epg-fh);
  font-size: 2rem; font-weight: 800;
  color: var(--epg-ice);
}

.epg-card-name {
  font-family: var(--epg-fh);
  font-size: 1.15rem; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
  color: var(--epg-name) !important;
  margin: 0 0 8px;
  line-height: 1.2;
}
.epg-card-arena {
  font-size: .85rem;
  color: var(--epg-arena);
  margin: 0 0 2px;
  line-height: 1.4;
}
.epg-card-city {
  font-size: .78rem;
  color: var(--epg-arena);
  opacity: .75;
  margin: 0 0 16px;
}

/* Entfernungs-Band am Kartenfuß */
.epg-card-km {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  margin: 0 -20px;
  padding: 12px 16px;
  background: var(--epg-km-bg);
  border-top: 1px solid var(--epg-border);
}
.epg-km-num {
  font-family: var(--epg-fh);
  font-size: 1.7rem; font-weight: 800; font-style: italic;
  color: var(--epg-km);
  line-height: 1;
}
.epg-km-lbl {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--epg-muted);
}

/* ── Tabellen-Ansicht ───────────────────────────────────── */
.epg-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--epg-card);
  border: 1px solid var(--epg-border);
}
.epg-table thead th {
  background: var(--epg-navy);
  color: var(--epg-muted);
  font-family: var(--epg-fb);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 2px solid var(--epg-accent);
}
.epg-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--epg-border);
  font-size: .9rem;
  color: var(--epg-text);
  vertical-align: middle;
}
.epg-table tbody tr:last-child td { border-bottom: none; }
.epg-table tbody tr:hover { background: var(--epg-card-2); }

.epg-t-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.epg-t-team img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.epg-t-team span {
  font-family: var(--epg-fh);
  font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  color: var(--epg-name);
}
.epg-t-ph {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--epg-logo-bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--epg-fh); font-weight: 700;
  color: var(--epg-ice); flex-shrink: 0;
}
.epg-t-arena { color: var(--epg-arena); }
.epg-t-arena small { display: block; opacity: .7; font-size: .78rem; }
.epg-table .epg-num { text-align: right; white-space: nowrap; }
.epg-table .epg-num b {
  font-family: var(--epg-fh);
  font-size: 1.2rem; font-style: italic;
  color: var(--epg-km);
}

/* ── Hinweis / Leer ─────────────────────────────────────── */
.epg-note {
  margin-top: 14px;
  font-size: .74rem;
  color: var(--epg-muted);
  opacity: .8;
  text-align: center;
}
.epg-empty { color: var(--dcl-muted, #93a5bd); font-size: 13px; padding: 16px; }

/* Theme-Headline-Regeln nicht durchschlagen lassen */
.epg-wrap h1, .epg-wrap h2, .epg-wrap h3 { font-style: normal; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 700px) {
  .epg-grid { gap: 10px; }
  .epg-card { padding: 18px 16px 0; }
  .epg-card-logo { width: 64px; height: 64px; margin-bottom: 10px; }
  .epg-card-name { font-size: 1rem; }
  .epg-card-km { margin: 0 -16px; padding: 10px 12px; }
  .epg-km-num { font-size: 1.45rem; }

  /* Tabelle: Stadt-Zeile bleibt, Padding enger */
  .epg-table td, .epg-table thead th { padding: 9px 10px; font-size: .82rem; }
  .epg-t-team img, .epg-t-ph { width: 26px; height: 26px; }
}
