/* TVP Spielplan – Design passend zu handball-pfullendorf.de (Vereinsrot, klare Karten) */
.tvp-sp {
  --tvp-accent: #DD3333;
  --tvp-dark: #111111;
  --tvp-muted: #6b6f76;
  --tvp-line: #e8e8ea;
  --tvp-soft: #f6f6f7;
  --tvp-radius: 14px;
  font-family: inherit;
  color: var(--tvp-dark);
  max-width: 900px;
  margin: 0 auto 2rem;
}
.tvp-sp *, .tvp-sp *::before, .tvp-sp *::after { box-sizing: border-box; }
.tvp-sp [hidden], .tvp-sp .is-hidden { display: none !important; }

.tvp-sp__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin: 0 0 1rem;
}
.tvp-sp__title::after {
  content: ""; display: block; width: 48px; height: 4px;
  background: var(--tvp-accent); border-radius: 2px; margin-top: .5rem;
}

/* Mannschafts-Tabs */
.tvp-sp__tabs {
  display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem;
  margin-bottom: .9rem; scrollbar-width: none;
}
.tvp-sp__tabs::-webkit-scrollbar { display: none; }
.tvp-tab {
  flex: 0 0 auto; border: 1px solid var(--tvp-line); background: #fff; color: var(--tvp-dark);
  padding: .5rem 1rem; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.tvp-tab:hover { border-color: var(--tvp-accent); color: var(--tvp-accent); }
.tvp-tab.is-active { background: var(--tvp-accent); border-color: var(--tvp-accent); color: #fff; }

/* Filterleiste */
.tvp-sp__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: 1.25rem;
}
.tvp-seg { display: inline-flex; background: var(--tvp-soft); border-radius: 999px; padding: 4px; }
.tvp-seg__btn {
  border: 0; background: transparent; font: inherit; font-size: .88rem; font-weight: 600;
  padding: .45rem .95rem; border-radius: 999px; cursor: pointer; color: var(--tvp-muted);
}
.tvp-seg__btn.is-active { background: #fff; color: var(--tvp-dark); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tvp-switch { display: inline-flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 600; cursor: pointer; user-select: none; }
.tvp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.tvp-switch__track {
  width: 40px; height: 22px; border-radius: 999px; background: #d3d4d7; position: relative; transition: background .15s;
}
.tvp-switch__dot {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.tvp-switch input:checked + .tvp-switch__track { background: var(--tvp-accent); }
.tvp-switch input:checked + .tvp-switch__track .tvp-switch__dot { transform: translateX(18px); }
.tvp-switch input:focus-visible + .tvp-switch__track { outline: 2px solid var(--tvp-accent); outline-offset: 2px; }

/* Tage */
.tvp-day { margin-bottom: 1.25rem; }
.tvp-day__label {
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--tvp-muted); margin: 0 0 .5rem .25rem;
}

/* Spielkarte */
.tvp-game {
  display: grid; grid-template-columns: 72px 1fr 24px; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--tvp-line); border-radius: var(--tvp-radius);
  padding: .9rem 1rem; margin-bottom: .5rem; text-decoration: none !important; color: inherit !important;
  position: relative; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.tvp-game:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.07); border-color: #d6d6d9; }
.tvp-game.is-tvp { border-left: 4px solid var(--tvp-accent); padding-left: calc(1rem - 3px); }
.tvp-game.is-tvp { background: linear-gradient(90deg, color-mix(in srgb, var(--tvp-accent) 5%, #fff), #fff 40%); }

.tvp-game__time { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.tvp-game__clock { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }

.tvp-badge {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; padding: .2rem .5rem; border-radius: 6px;
  background: var(--tvp-soft); color: var(--tvp-muted);
}
.tvp-badge--live { background: var(--tvp-accent); color: #fff; }
.tvp-badge--finished { background: var(--tvp-dark); color: #fff; }
.tvp-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: tvp-pulse 1.2s infinite; }
@keyframes tvp-pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

.tvp-game__teams { min-width: 0; }
.tvp-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .1rem 0; }
.tvp-row__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvp-row__score { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; color: var(--tvp-muted); }
.tvp-row.is-win .tvp-row__score { color: var(--tvp-dark); }
.tvp-row.is-club .tvp-row__name { font-weight: 800; color: var(--tvp-accent); }

.tvp-game__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .45rem; font-size: .78rem; color: var(--tvp-muted); }
.tvp-chip { background: var(--tvp-soft); padding: .12rem .45rem; border-radius: 5px; font-weight: 600; }
.tvp-chip--team { background: color-mix(in srgb, var(--tvp-accent) 12%, #fff); color: var(--tvp-accent); }
.tvp-game__hall { display: inline-flex; align-items: center; gap: .25rem; min-width: 0; }
.tvp-game__arrow { color: #b8b9bd; display: flex; }
a.tvp-game:hover .tvp-game__arrow { color: var(--tvp-accent); }
.tvp-game.is-finished:not(.is-tvp) { opacity: .85; }

.tvp-sp__empty, .tvp-sp__error {
  text-align: center; color: var(--tvp-muted); padding: 2rem 1rem;
  background: var(--tvp-soft); border-radius: var(--tvp-radius); margin: 0;
}
.tvp-sp__error { margin-top: .5rem; padding: 1rem; font-size: .9rem; }

/* Tabellen-Button */
.tvp-sp__tables { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.5rem; }
.tvp-btn {
  display: inline-flex; align-items: center; gap: .5rem; background: var(--tvp-accent); color: #fff !important;
  text-decoration: none !important; font-weight: 700; font-size: .95rem; padding: .75rem 1.4rem;
  border-radius: 999px; transition: filter .15s, transform .15s;
}
.tvp-btn:hover { filter: brightness(.92); transform: translateY(-1px); }

@media (max-width: 560px) {
  .tvp-game { grid-template-columns: 58px 1fr 16px; gap: .7rem; padding: .8rem .8rem; }
  .tvp-game.is-tvp { padding-left: calc(.8rem - 3px); }
  .tvp-game__clock { font-size: 1rem; }
  .tvp-sp__bar { flex-direction: column; align-items: stretch; }
  .tvp-seg { justify-content: stretch; }
  .tvp-seg__btn { flex: 1; }
}
