/* ============================
   Variablen & Font
   ============================ */
:root {
  --suhv-cyan: #6FCECB;
  --suhv-text: #FFFFFF;
  --suhv-link: #006C6F;
}

@font-face {
  font-family: 'ReplicaProTT-Heavy';
  src: url('../fonts/ReplicaProTT-Heavy.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ============================
   Tabelle & Spielplan – Grundlook
   ============================ */

.suhv-table-container,
.suhv-schedule-container {
  background: var(--suhv-cyan);
  padding: 0;
  margin: 0;
  border: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.suhv-table,
table.suhv-club-getGames,
table.suhv-club-getWeekendGames {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--suhv-cyan) !important;
  font-family: 'ReplicaProTT-Heavy', system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--suhv-text) !important;
  border: none;
  box-shadow: none;
}

/* Header */

table.suhv-table thead tr,
table.suhv-club-getGames thead tr,
table.suhv-club-getWeekendGames thead tr {
  background: var(--suhv-cyan) !important;
  border: none;
}

table.suhv-table thead th,
table.suhv-club-getGames thead th,
table.suhv-club-getWeekendGames thead th {
  color: var(--suhv-text) !important;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 16px;
  padding: 12px 10px;
  border: none !important;
  background: var(--suhv-cyan) !important;
}

/* Body */

table.suhv-table tbody tr,
table.suhv-club-getGames tbody tr,
table.suhv-club-getWeekendGames tbody tr {
  background: var(--suhv-cyan) !important;
  border: none !important;
  box-shadow: none !important;
}

table.suhv-table tbody td,
table.suhv-club-getGames tbody td,
table.suhv-club-getWeekendGames tbody td {
  color: var(--suhv-text) !important;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 10px;
  border: none !important;
  background: var(--suhv-cyan) !important;
  vertical-align: middle !important;
  text-align: left !important;
}

/* Alle Textelemente in Tabellen neutral halten */

table.suhv-table *:not(img):not(svg),
table.suhv-club-getGames *:not(img):not(svg),
table.suhv-club-getWeekendGames *:not(img):not(svg) {
  border: none !important;
  background: transparent;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* ============================
   Links
   ============================ */

table.suhv-table a,
table.suhv-club-getGames a,
table.suhv-club-getWeekendGames a {
  color: var(--suhv-link) !important;
  text-decoration: none !important;
}

table.suhv-table a:hover,
table.suhv-club-getGames a:hover,
table.suhv-club-getWeekendGames a:hover {
  text-decoration: underline;
}

/* ============================
   Teamspalte mit Logo (2. Spalte)
   ============================ */

table.suhv-table tbody td:nth-child(2),
table.suhv-club-getGames tbody td:nth-child(2),
table.suhv-club-getWeekendGames tbody td:nth-child(2) {
  white-space: nowrap;
}

table.suhv-table tbody td:nth-child(2) > *,
table.suhv-club-getGames tbody td:nth-child(2) > *,
table.suhv-club-getWeekendGames tbody td:nth-child(2) > * {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px;
  color: var(--suhv-text) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

/* Logos in der Teamspalte */

.suhv-team-logo,
table.suhv-table tbody td:nth-child(2) img,
table.suhv-club-getGames tbody td:nth-child(2) img,
table.suhv-club-getWeekendGames tbody td:nth-child(2) img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Badges / Chips neutralisieren */

table.suhv-table td:nth-child(2) :is(.badge, .chip, span, em, strong, a, div),
table.suhv-club-getGames td:nth-child(2)
  :is(.badge, .chip, span, em, strong, a, div),
table.suhv-club-getWeekendGames td:nth-child(2)
  :is(.badge, .chip, span, em, strong, a, div) {
  background: transparent !important;
  color: var(--suhv-text) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* ============================
   Mein Team hervorheben
   ============================ */

table.suhv-table tr.suhv-my-team td,
table.suhv-club-getGames tr.suhv-my-team td,
table.suhv-club-getWeekendGames tr.suhv-my-team td {
  background: #006c6f !important;
  color: #ffffff !important;
}

table.suhv-table tr.suhv-my-team td:nth-child(2) :where(*),
table.suhv-club-getGames tr.suhv-my-team td:nth-child(2) :where(*),
table.suhv-club-getWeekendGames tr.suhv-my-team td:nth-child(2) :where(*) {
  background: transparent !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Numerische Spalten rechtsbuendig */

:is(table.suhv-table, table.suhv-club-getGames, table.suhv-club-getWeekendGames)
  :is(td.is-numeric, th.is-numeric) {
  text-align: right !important;
}

/* Hover neutral */

table.suhv-table tbody tr:hover,
table.suhv-club-getGames tbody tr:hover,
table.suhv-club-getWeekendGames tbody tr:hover {
  background: var(--suhv-cyan) !important;
}

/* Tabellen-Caption verstecken */

.suhv-table caption {
  display: none !important;
}

/* ============================
   NAECHSTES / LETZTES SPIEL – Teaser-Box
   ============================ */

/* Aeusserer Kasten */

.game-box.teaser-box {
  background: var(--suhv-cyan) !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 8px !important;
  padding-bottom: 18px !important;
}

/* Innenleben zentrieren */

.game-box.teaser-box .game-box-inner {
  background: transparent !important;
  border: none !important;
  margin: 0 auto;
  width: 100%;
  max-width: 700px;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

/* Body */

.game-box.teaser-box .game-box-body {
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

/* Wrapper um Home – Score – Guest */

.game-box.teaser-box .team-score-wrapper {
  width: 100%;
  max-width: 700px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 30px !important;
}

/* Teams links/rechts */

.game-box.teaser-box .team-home,
.game-box.teaser-box .team-guest {
  flex: 1 1 0;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Score in der Mitte */

.game-box.teaser-box .game-score {
  flex: 0 0 auto;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Logos gross */

.game-box.teaser-box .team-home img,
.game-box.teaser-box .team-guest img {
  width: 150px !important;
  height: 150px !important;
  max-width: 150px !important;
  max-height: 150px !important;
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Teamnamen unter Logos */

.game-box.teaser-box .suhv-match-teamname {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  width: 100%;
}

/* VS / Resultat immer weiss und gross */

.game-box.teaser-box .game-score .vs,
.game-box.teaser-box .game-score span.vs,
.game-score span.vs,
.game-score .vs,
.game-score span,
.game-score {
  color: #ffffff !important;
}

.game-box.teaser-box .game-score .vs,
.game-box.teaser-box .game-score span.vs {
  font-size: 80px !important;
  font-weight: 900 !important;
  letter-spacing: 0.05em;
}

/* Ort unter VS / Resultat */

.game-box.teaser-box .suhv-match-location {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--suhv-link) !important;
  text-decoration: none;
  text-align: center;
}

.game-box.teaser-box .suhv-match-location:hover {
  text-decoration: underline;
}

/* Datum / Uhrzeit */

.game-box.teaser-box .suhv-match-datetime {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
}

/* Label "Next Game" im Teaser + Buttons ausblenden */

.game-box-date-time .next-game,
.game-box-buttons,
.game-box-buttons span,
.game-box-buttons a {
  display: none !important;
}

/* Titel ueber Next Game / Last Game kompakter machen */
.next-game-title,
.last-game-title,
h1.next-game-title,
h1.last-game-title,
h2.next-game-title,
h2.last-game-title {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
  padding: 0 !important;
}

/* Distanz ueber Next/Last Game entfernen */
.elementor-section.next-game-section,
.elementor-section.last-game-section {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Container innerhalb der Section */
.elementor-container.next-game-section,
.elementor-container.last-game-section,
.elementor-widget-container.next-game-section,
.elementor-widget-container.last-game-section {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* =========================================
   FIX: NEXT/LAST GAME = WIE DESKTOP, NUR KLEINER
   ========================================= */

/* Immer Reihen-Layout, nur skalieren */
@media (max-width: 1200px) {
  .game-box.teaser-box .team-score-wrapper {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .game-box.teaser-box .team-home,
  .game-box.teaser-box .team-guest {
    flex: 1 1 0;
    max-width: 40%;
  }

  .game-box.teaser-box .game-score {
    flex: 0 0 auto;
    max-width: 20%;
  }

  .game-box.teaser-box {
    padding-top: 6px !important;
    padding-bottom: 10px !important;
  }

  .game-box.teaser-box .team-home img,
  .game-box.teaser-box .team-guest img {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
  }

  .game-box.teaser-box .game-score span.vs {
    font-size: 64px !important;
  }
}

/* Tablet quer/hoch */
@media (max-width: 992px) {
  .game-box.teaser-box .team-home img,
  .game-box.teaser-box .team-guest img {
    width: 100px !important;
    height: 100px !important;
    max-width: 100px !important;
    max-height: 100px !important;
  }

  .game-box.teaser-box .game-score span.vs {
    font-size: 52px !important;
  }

  .game-box.teaser-box .team-score-wrapper {
    gap: 18px !important;
  }
}

/* Handy */
@media (max-width: 768px) {
  .game-box.teaser-box {
    padding-top: 4px !important;
    padding-bottom: 8px !important;
  }

  .game-box.teaser-box .team-home img,
  .game-box.teaser-box .team-guest img {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
  }

  .game-box.teaser-box .game-score span.vs {
    font-size: 40px !important;
  }

  .game-box.teaser-box .suhv-match-teamname {
    font-size: 12px;
  }

  .game-box.teaser-box .suhv-match-location {
    font-size: 10px;
  }

  .game-box.teaser-box .suhv-match-datetime {
    font-size: 10px;
  }
}

/* Sehr kleine Handys */
@media (max-width: 480px) {
  .game-box.teaser-box .team-home img,
  .game-box.teaser-box .team-guest img {
    width: 68px !important;
    height: 68px !important;
    max-width: 68px !important;
    max-height: 68px !important;
  }

  .game-box.teaser-box .game-score span.vs {
    font-size: 34px !important;
  }
}

/* ============================
   Tabellen im schmalen Container / Responsive
   ============================ */

/* Elementor Shortcode-Widget soll nichts abschneiden */
.elementor-widget-shortcode,
.elementor-widget-shortcode .elementor-widget-container {
  overflow: visible;
}

/* Tabelle darf breiter als der 32%-Container sein */
.suhv-table-container table.suhv-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

/* Allgemeine Responsive-Anpassung: kleinere Schrift / Padding */
@media (max-width: 1200px) {
  .suhv-table-container,
  .suhv-schedule-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.suhv-club-getGames,
  table.suhv-club-getWeekendGames,
  table.suhv-table {
    min-width: 680px;
  }

  table.suhv-table th,
  table.suhv-table td,
  table.suhv-club-getGames th,
  table.suhv-club-getGames td,
  table.suhv-club-getWeekendGames th,
  table.suhv-club-getWeekendGames td {
    padding: 8px 6px;
    font-size: 13px;
  }
}

/* Sehr kleine Handys */
@media (max-width: 600px) {
  table.suhv-table th,
  table.suhv-table td,
  table.suhv-club-getGames th,
  table.suhv-club-getGames td,
  table.suhv-club-getWeekendGames th,
  table.suhv-club-getWeekendGames td {
    padding: 6px 4px;
    font-size: 11px;
  }
}

/* =========================================
   MOBILE: RANGLISTE = NUR RANG / TEAM / PUNKTE
   ========================================= */

@media (max-width: 768px) {
  /* Nur fuer die Ranglisten-Tabelle */
  table.suhv-table.suhv-getTeamRank {
    min-width: 0;
    width: 100%;
    display: table; /* override eventuelle display-aenderungen */
  }

  /* Tordifferenz-Spalte komplett ausblenden */
  table.suhv-table.suhv-getTeamRank th.suhv-diff,
  table.suhv-table.suhv-getTeamRank td.suhv-diff {
    display: none;
  }

  /* Spaltenbreiten + Typo anpassen */
  table.suhv-table.suhv-getTeamRank th,
  table.suhv-table.suhv-getTeamRank td {
    font-size: 12px;
    padding: 6px 4px;
  }

  table.suhv-table.suhv-getTeamRank th.suhv-rank,
  table.suhv-table.suhv-getTeamRank td.suhv-rank {
    width: 12%;
    text-align: center;
  }

  table.suhv-table.suhv-getTeamRank th.suhv-team,
  table.suhv-table.suhv-getTeamRank td.suhv-team {
    width: 64%;
    text-align: left;
  }

  table.suhv-table.suhv-getTeamRank th.suhv-points,
  table.suhv-table.suhv-getTeamRank td.suhv-points {
    width: 24%;
    text-align: right;
  }
}
/* =========================================
   Handy: suhv-getTeamTable = nur Rang / Team / Punkte
   ========================================= */

@media (max-width: 768px) {
  /* Nur die Teamtabelle anpassen */
  table.suhv-table.suhv-getTeamTable {
    width: 100%;
    min-width: 0;
    display: table;
  }

  /* Alle Spalten verstecken, die NICHT Rang, Team oder Punkte sind */
  table.suhv-table.suhv-getTeamTable th:not(.suhv-rank):not(.suhv-team):not(.suhv-points),
  table.suhv-table.suhv-getTeamTable td:not(.suhv-rank):not(.suhv-team):not(.suhv-points) {
    display: none;
  }

  /* In der Teamtabelle gibt es zwei .suhv-points:
     - Punktequotient (vorletzte Spalte)
     - Punkte (letzte Spalte)
     -> hier: Punktequotient ausblenden, nur letzte Spalte behalten */
  table.suhv-table.suhv-getTeamTable th.suhv-points:nth-last-child(2),
  table.suhv-table.suhv-getTeamTable td.suhv-points:nth-last-child(2) {
    display: none;
  }

  /* Typo fuer Handy kompakter */
  table.suhv-table.suhv-getTeamTable th,
  table.suhv-table.suhv-getTeamTable td {
    font-size: 12px;
    padding: 6px 4px;
  }

  /* Rang schmal, zentriert */
  table.suhv-table.suhv-getTeamTable th.suhv-rank,
  table.suhv-table.suhv-getTeamTable td.suhv-rank {
    width: 12%;
    text-align: center;
  }

  /* Team mit Logo breit */
  table.suhv-table.suhv-getTeamTable th.suhv-team,
  table.suhv-table.suhv-getTeamTable td.suhv-team {
    width: 64%;
    text-align: left;
    white-space: nowrap;
  }

  /* Punkte rechtsbuendig */
  table.suhv-table.suhv-getTeamTable th.suhv-points:last-child,
  table.suhv-table.suhv-getTeamTable td.suhv-points:last-child {
    width: 24%;
    text-align: right;
  }
}
/* =========================================
   Handy-Layout: Spielübersicht als Cards
   (Club- & Weekend-Games)
   ========================================= */

@media (max-width: 768px) {

  /* Tabellenkopf ausblenden */
  table.suhv-club-getGames thead,
  table.suhv-club-getWeekendGames thead {
    display: none !important;
  }

  /* Jede Zeile wird eine eigene Card */
  table.suhv-club-getGames tbody tr,
  table.suhv-club-getWeekendGames tbody tr {
    display: block !important;
    background: var(--suhv-cyan) !important;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 6px;
  }

  /* Zellen untereinander statt nebeneinander */
  table.suhv-club-getGames tbody td,
  table.suhv-club-getWeekendGames tbody td {
    display: block !important;
    width: 100%;
    text-align: left !important;
    padding: 2px 0;
    font-size: 12px;
  }

  /* Erste Zelle (meist Datum/Zeit) leicht hervorgehoben */
  table.suhv-club-getGames tbody td:first-child,
  table.suhv-club-getWeekendGames tbody td:first-child {
    font-weight: 700;
    margin-bottom: 2px;
  }

  /* Gegner-Zelle (2. Spalte) fett, mit Logo inline */
  table.suhv-club-getGames tbody td:nth-child(2),
  table.suhv-club-getWeekendGames tbody td:nth-child(2) {
    font-weight: 800;
    margin-bottom: 4px;
    white-space: normal;
  }

  table.suhv-club-getGames tbody td:nth-child(2) img,
  table.suhv-club-getWeekendGames tbody td:nth-child(2) img {
    width: 22px;
    height: 22px;
    margin-right: 6px;
    vertical-align: middle;
    object-fit: contain;
  }

  /* Letzte Zelle (oft Resultat / Ort / Punkte) etwas absetzen */
  table.suhv-club-getGames tbody td:last-child,
  table.suhv-club-getWeekendGames tbody td:last-child {
    margin-top: 2px;
  }
}
/* =========================================
   MOBILE: SPIELUEBERSICHT (TEAM-GETGAMES)
   ========================================= */

@media (max-width: 768px) {

  /* Kein horizontales Scrollen nötig bei der Team-Spielübersicht */
  table.suhv-table.suhv-team-getGames {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  /* Tabellenkopf ausblenden */
  table.suhv-table.suhv-team-getGames thead {
    display: none !important;
  }

  /* Jede Zeile wird eine "Karte" */
  table.suhv-table.suhv-team-getGames tbody tr {
    display: block !important;
    background: var(--suhv-cyan) !important;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 6px;
  }

  /* Zellen untereinander */
  table.suhv-table.suhv-team-getGames tbody td {
    display: block !important;
    width: 100%;
    text-align: left !important;
    padding: 2px 0;
    font-size: 13px;
  }

  /* Gegner (2. Spalte) oben, fett */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(2),
  table.suhv-table.suhv-team-getGames tbody td.suhv-opponent {
    font-weight: 800;
    margin-bottom: 4px;
  }

  /* Logo beim Gegner kleiner */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(2) img {
    width: 22px;
    height: 22px;
    margin-right: 6px;
    vertical-align: middle;
  }

  /* Ort (1. Spalte) mit Label */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(1)::before,
  table.suhv-table.suhv-team-getGames tbody td.suhv-location::before {
    content: "Ort: ";
    font-weight: 700;
    opacity: 0.85;
    margin-right: 2px;
  }

  /* Datum/Zeit (3. Spalte) mit Label */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(3)::before,
  table.suhv-table.suhv-team-getGames tbody td.suhv-date::before {
    content: "Datum / Zeit: ";
    font-weight: 700;
    opacity: 0.85;
    margin-right: 2px;
  }
}
/* =========================================
   MOBILE: SPIELUEBERSICHT (TEAM-GETGAMES)
   ========================================= */

@media (max-width: 768px) {

  /* Tabellenkopf ausblenden */
  table.suhv-table.suhv-team-getGames thead {
    display: none !important;
  }

  /* Jede Zeile wird eine Karte */
  table.suhv-table.suhv-team-getGames tbody tr {
    display: block !important;
    background: var(--suhv-cyan) !important;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 6px;
  }

  /* Zellen untereinander */
  table.suhv-table.suhv-team-getGames tbody td {
    display: block !important;
    width: 100%;
    text-align: left !important;
    padding: 2px 0;
    font-size: 13px;
  }

  /* -----------------------------------------
     Gegner (2. Spalte) mit "Gegner:" Label
     ----------------------------------------- */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(2),
  table.suhv-table.suhv-team-getGames tbody td.suhv-opponent {
    font-weight: 800;
    margin-bottom: 4px;
    white-space: normal;
  }

  /* Label "Gegner:" davor */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(2)::before,
  table.suhv-table.suhv-team-getGames tbody td.suhv-opponent::before {
    content: "Gegner: ";
    font-weight: 700;
    opacity: 0.85;
    margin-right: 4px;
  }

  /* Logo kleiner */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(2) img {
    width: 22px;
    height: 22px;
    margin-left: 4px;
    margin-right: 6px;
    vertical-align: middle;
    object-fit: contain;
  }

  /* Ort (1. Spalte) */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(1)::before {
    content: "Ort: ";
    font-weight: 700;
    opacity: 0.85;
    margin-right: 2px;
  }

  /* Datum/Zeit (3. Spalte) */
  table.suhv-table.suhv-team-getGames tbody td:nth-child(3)::before {
    content: "Datum / Zeit: ";
    font-weight: 700;
    opacity: 0.85;
    margin-right: 2px;
  }
}
