/* === Trainingsbericht Styles === */

/* Progress Bar */
.tb-progress-wrapper {
  position: relative;
}

.progress.tb-progress {
  height: 18px;
  border-radius: 3px;
  background-color: #e9ecef;
  position: relative;
  overflow: visible !important;
}

.tb-progress .progress-bar {
  transition: none;
  border-radius: 3px;
  font-size: 11px;
  line-height: 18px;
}

/* Hürde-Marker (Erfahrungs-Bar, vertikale Linie) */
.tb-huerde-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #dc3545;
  opacity: 0.6;
  z-index: 2;
  pointer-events: none;
}

.tb-huerde-marker::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -3px;
  width: 8px;
  height: 8px;
  background: #dc3545;
  border-radius: 50%;
  opacity: 0.6;
}

/* Schwelle-Marker (Würfel-Bar, prominente vertikale Linie) */
.tb-schwelle-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: #dc3545;
  z-index: 2;
  pointer-events: none;
}

.tb-schwelle-marker::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -4px;
  width: 11px;
  height: 11px;
  background: #dc3545;
  border-radius: 50%;
}

.tb-schwelle-label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #dc3545;
  font-weight: 600;
  white-space: nowrap;
}

/* Labels */
.tb-progress-label {
  margin-top: 2px;
  line-height: 1.2;
}

/* Aufstieg Glow */
@keyframes tb-glow {
  0% { box-shadow: 0 0 3px rgba(255, 215, 0, 0.3); background-color: transparent; }
  50% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.6); background-color: rgba(255, 215, 0, 0.08); }
  100% { box-shadow: 0 0 3px rgba(255, 215, 0, 0.3); background-color: transparent; }
}

.tb-aufstieg-glow {
  animation: tb-glow 1.5s ease-in-out 2;
}

.tb-aufstieg-row td {
  font-weight: 600;
}

/* Aufstieg Text */
.tb-aufstieg-text {
  color: #28a745;
  font-weight: 600;
}

/* Würfel Animation */
@keyframes tb-dice-spin {
  0% { transform: rotate(0deg) scale(1); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

.tb-dice-roll {
  display: inline-block;
  margin-left: 6px;
  font-size: 16px;
  animation: tb-dice-spin 0.7s ease-in-out;
}

/* Vollbreite-Balken (animierte Spieler) */
.tb-fullbar-wrap {
  position: relative;
}

.tb-fullbar-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  line-height: 32px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5), 0 0 6px rgba(0,0,0,0.3);
  text-align: center;
  z-index: 3;
  pointer-events: none;
}

/* Text-Label über Würfel-Balken (linksbündig, absolut positioniert) */
.tb-bar-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  line-height: 32px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5), 0 0 6px rgba(0,0,0,0.3);
  text-align: left;
  padding-left: 8px;
  z-index: 3;
  pointer-events: none;
}

/* Spieler Tabelle */
.tb-spieler-tabelle {
  table-layout: fixed;
  width: 100%;
}

.tb-spieler-tabelle th {
  font-size: 12px;
  font-weight: 600;
  border-top: none;
  padding: 4px 6px;
}

.tb-spieler-tabelle td {
  padding: 4px 6px;
  font-size: 13px;
  vertical-align: middle;
}

.tb-spieler-tabelle .tb-col-pos { width: 35px; }
.tb-spieler-tabelle .tb-col-name { width: 100px; white-space: nowrap; }
.tb-spieler-tabelle td.tb-col-name-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 577px) {
  .tb-spieler-tabelle .tb-col-name,
  .tb-spieler-tabelle td.tb-col-name-cell { width: 160px; }
}
.tb-spieler-tabelle .tb-col-age { width: 35px; }
.tb-spieler-tabelle .tb-col-st { width: 55px; }
.tb-spieler-tabelle .tb-col-ef { width: 55px; }
.tb-spieler-tabelle .tb-col-delta { width: 95px; }

.tb-spieler-tabelle .progress small {
  line-height: 18px;
  z-index: 1;
}

/* Responsive */
@media (max-width: 576px) {
  .tb-col-ef,
  .tb-col-delta,
  .tb-col-pos,
  .tb-col-age {
    display: none;
  }

  .tb-spieler-tabelle .tb-col-name {
    width: 120px;
  }
}
