/* ============================================================

   com_spendenrennen – Spendenrennen / Osterrennen

   Tierschutz Helfer | #23BDCB  #91786D  #000000

   Light Theme

   ============================================================ */
/* ── Basis ────────────────────────────────────────────────── */
.spendenrennen-wrap {
  background: #ffffff;
  color: #1a1a2e;
  padding: 28px 24px;
  border-radius: 16px;
  margin: 0 auto;
  box-sizing: border-box;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
}
.spendenrennen-wrap *, .spendenrennen-wrap *::before, .spendenrennen-wrap *::after {
  box-sizing: inherit;
}
/* ── Header ───────────────────────────────────────────────── */
.sr-header {
  text-align: center;
  margin-bottom: 28px;
}
.sr-badge {
  display: inline-block;
  background: #e8f9fb;
  border: 1px solid #b2eaf0;
  color: #1a9aaa;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.sr-title {
  margin: 0 0 6px;
  line-height: 1.2;
}
.sr-subtitle {
  color: #23BDCB;
  font-size: 1.1rem;
  font-weight: 500;
}
.sr-hofname {
  color: #91786D;
  margin: 6px 0 0;
}
/* ── Statistiken ──────────────────────────────────────────── */
.sr-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  background: #f5f8fa;
  border: 1px solid #e4eaee;
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.sr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sr-stat-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: #23BDCB;
  line-height: 1;
}
.sr-stat-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9aabb5;
}
/* ── Rennfeld-Karte ───────────────────────────────────────── */
.sr-race-card {
  background: #f9fbfc;
  border: 1px solid #e0e8ed;
  border-radius: 14px;
  margin-bottom: 20px;
  overflow: hidden;
}
.sr-race-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid #e0e8ed;
  background: #f0f5f8;
}
.sr-race-head span {
  font-size: 1.2rem;
}
.sr-race-head h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #4a6072;
}
.sr-tracks {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* ── Track-Zeile ──────────────────────────────────────────── */
.sr-track-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e8eff3;
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
/* ── Team-Meta (links) ────────────────────────────────────── */
.sr-track-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sr-team-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sr-team-portrait-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  border: none;
  outline: none;
}
.sr-team-portrait-link:focus {
  outline: 2px solid #23BDCB;
  border-radius: 10px;
}
.sr-team-portrait {
  width: 100px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 8px;
  border: 2px solid #e8eff3;
  background: #f5f8fa;
}
.sr-team-name {
  font-weight: 700;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sr-team-motto {
  font-size: 0.8rem;
  color: #9aabb5;
  margin-top: 2px;
}
.sr-crown {
  font-size: 0.8rem;
  background: #fff8e0;
  border: 1px solid #f0d060;
  color: #b8860b;
  padding: 1px 6px;
  border-radius: 10px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
.sr-team-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sr-meters {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}
.sr-chf {
  font-size: 0.7rem;
  color: #9aabb5;
}
/* ── Team-Farben ──────────────────────────────────────────── */
.sr-color-wolle {
  color: #23BDCB;
}
.sr-color-zottel {
  color: #91786D;
}
.sr-color-galopp {
  color: #d4782a;
}
/* ── Track-Bereich (rechts) ───────────────────────────────── */
.sr-track-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}
/* Trophy-Banner */
.sr-trophy-banner {
  display: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b4c00;
  background: linear-gradient(90deg, #ffe066, #ffd700);
  padding: 3px 12px;
  border-radius: 4px;
  text-align: center;
  margin-bottom: 2px;
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}
.sr-trophy-banner.sr-show {
  display: block;
}
/* Track + Avatar */
.sr-race-bar {
  position: relative;
  padding-top: 72px; /* Platz für Avatar oberhalb der Bahn */
}
.sr-lane {
  position: relative;
  height: 38px;
  background: #edd2b4;
  border: 1px solid #b28451;
  border-radius: 8px;
  overflow: hidden;
}
.sr-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
  position: relative;
  display: flex;
  align-items: center;
}
/* Team-spezifische Fill-Farben */
.sr-fill-wolle {
  background: linear-gradient(90deg, #1a9aaa, #23BDCB);
}
.sr-fill-zottel {
  background: linear-gradient(90deg, #6b5045, #91786D);
}
.sr-fill-galopp {
  background: linear-gradient(90deg, #b8601a, #e08030);
}
.sr-fill-label {
  position: absolute;
  right: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  line-height: 38px;
}
/* Ziellinie (Schachbrettmuster) */
.sr-finish-line {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: repeating-linear-gradient(180deg, #555 0px, #555 4px, #dce6ec 4px, #dce6ec 8px);
  opacity: 0.5;
}
/* PNG-Avatar oberhalb der Bahn, folgt dem Spendenstand (left = fill%) */
.sr-avatar {
  position: absolute;
  left: 4%; /* Fallback; wird via JS und inline-style überschrieben */
  bottom: 10px;
  transform: translate(-50%, 0);
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
  z-index: 2;
  pointer-events: none;
  transition: left 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Meter-Skala */
.sr-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #b0bec5;
  padding: 0 2px;
}
/* ── CTA Karte ────────────────────────────────────────────── */
.sr-cta-card {
  background: #f9fbfc;
  border: 1px solid #e0e8ed;
  border-radius: 14px;
  overflow: hidden;
}
.sr-cta-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid #e0e8ed;
  background: #f0f5f8;
}
.sr-cta-head span {
  font-size: 1.2rem;
}
.sr-cta-head h2 {
  margin: 0;
  font-weight: 600;
  color: #4a6072;
}
.sr-cta-body {
  padding: 20px 24px;
}
.sr-cta-body > p {
  color: #6a8090;
  margin: 0 0 16px;
  line-height: 1.6;
}
.sr-lbl {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9aabb5;
  margin-bottom: 12px;
  font-weight: 700;
}
/* Team-Auswahl-Grid */
.sr-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.sr-team-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2px solid #e0e8ed;
  border-radius: 12px;
  padding: 18px 12px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
}
.sr-team-btn:hover, .sr-team-btn:focus {
  text-decoration: none;
  transform: translateY(-3px);
}
.sr-btn-wolle:hover, .sr-btn-wolle:focus {
  border-color: #23BDCB;
  box-shadow: 0 6px 20px rgba(35, 189, 203, 0.15);
}
.sr-btn-zottel:hover, .sr-btn-zottel:focus {
  border-color: #91786D;
  box-shadow: 0 6px 20px rgba(145, 120, 109, 0.15);
}
.sr-btn-galopp:hover, .sr-btn-galopp:focus {
  border-color: #e08030;
  box-shadow: 0 6px 20px rgba(224, 128, 48, 0.15);
}
/* Portrait-Bild im CTA (JPG, mit Rahmen) */
.sr-btn-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e8eff3;
}
.sr-btn-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
}
.sr-btn-sub {
  font-size: 0.7rem;
  color: #9aabb5;
  text-align: center;
}
.sr-btn-go {
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  padding: 7px 18px;
  border-radius: 20px;
  transition: background 0.2s;
  white-space: nowrap;
}
/* Teamfarben für den Spenden-Button */
.sr-btn-go-wolle {
  background: #23BDCB;
}
.sr-btn-go-zottel {
  background: #91786D;
}
.sr-btn-go-galopp {
  background: #e08030;
}
.sr-btn-wolle:hover .sr-btn-go-wolle, .sr-btn-wolle:focus .sr-btn-go-wolle {
  background: #1aabb8;
}
.sr-btn-zottel:hover .sr-btn-go-zottel, .sr-btn-zottel:focus .sr-btn-go-zottel {
  background: #6b5045;
}
.sr-btn-galopp:hover .sr-btn-go-galopp, .sr-btn-galopp:focus .sr-btn-go-galopp {
  background: #b8601a;
}
.sr-pay-note {
  font-size: 0.72rem;
  color: #b0bec5;
  text-align: center;
  margin: 0;
}
/* ── Kein Kampagne ────────────────────────────────────────── */
.sr-no-campaign {
  text-align: center;
  padding: 60px 20px;
  color: #9aabb5;
  font-size: 1rem;
}
/* ── Popup ────────────────────────────────────────────────── */
#sr-popup-area {
  position: fixed;
  bottom: 10px;
  right: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
  max-width: 300px;
}
.sr-popup {
  position: relative;
  background: #ffffff;
  border: 1px solid #23BDCB;
  border-left: 4px solid #23BDCB;
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 220px;
  pointer-events: all;
  animation: sr-slideIn 0.35s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.sr-popup.sr-fade-out {
  animation: sr-fadeOut 0.35s ease forwards;
}
.sr-popup-close {
  position: absolute;
  top: 7px;
  right: 9px;
  background: none;
  border: none;
  box-shadow: none;
  font-size: 1rem;
  line-height: 1;
  color: #aab8b8;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: color 0.15s;
}
.sr-popup-close:hover, .sr-popup-close:focus {
  color: #1a1a2e;
  outline: none;
  background: none;
  box-shadow: none;
}
.sr-popup-title {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #23BDCB;
  font-weight: 700;
  margin-bottom: 4px;
}
.sr-popup-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a1a2e;
}
.sr-popup-donor {
  font-size: 0.76rem;
  color: #7a9090;
  margin-top: 2px;
}
.sr-popup-team {
  font-size: 0.7rem;
  color: #23BDCB;
  margin-top: 4px;
  font-weight: 600;
}
@keyframes sr-slideIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes sr-fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(50px);
  }
}
/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .sr-track-row {
    grid-template-columns: 1fr;
  }
  .sr-track-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .sr-team-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  /* Mobile: Bild + Text oben, Button unten über ganze Breite */
  .sr-team-btn {
    display: grid;
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px 12px;
    padding: 12px 16px;
    align-items: center;
  }
  .sr-btn-img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 64px;
    height: 64px;
  }
  .sr-btn-name {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 1rem;
  }
  .sr-btn-sub {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }
  .sr-btn-go {
    grid-column: 1 / 3;
    grid-row: 3;
    text-align: center;
    display: block;
    padding: 10px 18px;
    margin-top: 4px;
  }
  .sr-stats {
    gap: 16px;
    padding: 12px 16px;
  }
  .sr-stat-val {
    font-size: 1.3rem;
  }
  .sr-title {
    font-size: 1.4rem;
  }
  .sr-avatar {
    width: 56px;
    height: 56px;
  }
  .sr-race-bar {
    padding-top: 50px;
  }
  .spendenrennen-wrap {
    padding: 16px 12px;
  }
  /* Icon im Rennstand-Header auf Mobile ausblenden */
  .sr-race-head > span:first-child, .sr-cta-head > span:first-child {
    display: none;
  }
  /* Race-Head h2 auf Mobile lesbarer */
  .sr-race-head h2 {
    font-size: 1rem;
  }
}