/* Matches table styles (shared) - used by player recent matches and team recent matches */
.team-recent-matches{padding:1rem 0}
.matches-table tr{border-bottom:1px solid #eee;transition:background-color 0.2s ease}
.matches-table tr:hover{background-color:#f9f9f9}
.matches-table tr:last-child{border-bottom:none}
.matches-table td{padding:1.25rem 1rem;vertical-align:middle}
.matches-table td:first-child{width:140px;text-align:center;min-width:140px}
.matches-table td:nth-child(2){flex:1;min-width:350px}
.matches-table td:last-child{width:150px;text-align:center}

@media (max-width:768px){
  .matches-table td{padding:0.75rem 0.5rem}
  .matches-table td:first-child{width:110px;font-size:0.9rem}
  .matches-table td:last-child{width:120px;font-size:0.9rem}
}

/* Standings form with logos */
.standings-form{display:inline-flex;gap:4px;align-items:center}
.standings-form.logos{display:flex;gap:6px}
.form-logo{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border:2px solid transparent;background:#f3f4f6}
.form-logo.win{border-color:#16a34a}
.form-logo.loss{border-color:#ef4444}
.form-logo img{width:100%;height:100%;object-fit:cover}

@media (max-width:480px){
  .matches-table td:first-child small{display:block}
  .matches-table td:nth-child(2){min-width:280px}
}

/* Recent matches widget (shared with team/tournament) */
.recent-matches-wrapper{display:flex;gap:20px;width:100%;align-items:flex-start}.matches-list{flex:1;display:flex;flex-direction:column;gap:0px}.matches-group{display:flex;flex-direction:column;gap:0px}.matches-group-title{font-weight:700;color:#111827;font-size:14px}.matches-toggle{align-self:stretch;width:100%;padding:10px 14px;border-radius:10px;border:1px solid #cbd5e1;background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%);cursor:pointer;font-weight:700;color:#0f172a;letter-spacing:0.01em;transition:all 0.2s ease}.matches-toggle:hover{background:linear-gradient(135deg,#e2e8f0 0%,#cbd5e1 100%);box-shadow:0 4px 12px rgba(0,0,0,0.08);transform:translateY(-1px)}.empty-group{color:#9ca3af;font-size:13px}.matches-sidebar{width:320px;flex-shrink:0;display:flex;justify-content:flex-end;align-self:flex-start;position:sticky;top:20px}.matches-sidebar .ad-sky{width:300px;height:600px;display:flex;align-items:center;justify-content:center}.game-widget{display:flex;align-items:center;gap:8px;justify-content:center;position:relative}.gw-team{display:flex;align-items:center;width:auto;gap:6px}.team-link{display:inline-flex;align-items:center;gap:6px;color:inherit;text-decoration:none}.team-link:hover .team-name{text-decoration:underline}.team-link:focus-visible{outline:2px solid #94a3b8;outline-offset:2px;border-radius:6px}.gw-team-local{justify-content:flex-end}.gw-teamLogo{width:24px;height:24px;flex-shrink:0;border-radius:4px}.gw-team-local .gw-teamLogo{order:2;margin-left:4px}.gw-team:not(.gw-team-local) .gw-teamLogo{margin-right:4px}.team-name{line-height:30px;max-width:180px;min-width:60px;display:inline-block;text-align:left;text-shadow:1px 0 0 currentColor;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#000;font-size:14px}.team-name.team-name-short{display:none}.gw-team-local .team-name{text-align:right}.match-card{border-radius:10px;padding:10px 14px 3px;background:#fff;transition:background-color 0.2s ease,box-shadow 0.2s ease}.match-card:hover{background:var(--fourth-color);box-shadow:0 4px 12px rgba(0,0,0,0.08)}.match-card-line{display:flex;align-items:center;gap:12px}.match-meta{width:100px;flex-shrink:0;font-size:12px;color:#4b5563;display:flex;flex-direction:column;gap:2px}.match-card-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;position:relative;overflow:visible !important}.match-card-body .game-widget{justify-content:space-between}.match-card-body .game-widget .gw-center{display:flex;flex-direction:column;align-items:center;gap:6px}.match-broadcast{width:100px;flex-shrink:0;display:flex;justify-content:flex-end}.broadcast-placeholder{width:100%;height:50px;border:0}.game-score-widget{display:flex}.game-score-team{padding:6px 0;border:1px solid;width:35px;text-align:center;font-weight:700;background-color:var(--white);font-size:18px;text-shadow:1px 0 0 currentColor}.game-score-winner{background-color:var(--third-color)}.gw-date{font-size:12px}.gw-competition{font-size:12px;font-weight:700;color:#111827;line-height:1.4}.match-card-body .gw-competition{position:absolute;left:50%;top:0;transform:translate(-50%,-16px);z-index:9999;white-space:nowrap}.gw-competition-inline{text-align:center}.gw-day,.gw-hour{font-size:12px}.gw-tooltip{position:absolute;top:-10px;left:50%;transform:translate(-50%,-110%);background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,0.08);padding:8px 10px;min-width:180px;opacity:0;pointer-events:none;transition:opacity 0.2s ease,transform 0.2s ease;z-index:20;display:grid;gap:6px}.game-widget:hover .gw-tooltip{opacity:1;transform:translate(-50%,-120%)}.gw-tooltip-team{display:flex;align-items:center;gap:8px;font-weight:700;color:#111827}.gw-tooltip-team img{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#f3f4f6}.gw-tooltip-score{text-align:center;font-weight:800;font-size:16px}@media screen and (max-width:1024px){.recent-matches-wrapper{flex-direction:column}.matches-list,.matches-sidebar{flex:0 0 100%}.matches-sidebar{width:100%;justify-content:center}}@media screen and (max-width:900px){.match-card-line{flex-wrap:wrap;gap:10px}.match-meta{width:auto;flex-direction:row;gap:10px;order:1}.match-card-body{order:2;width:100%}.match-broadcast{display:none}}@media screen and (max-width:700px){.match-card{padding:8px 10px 6px}.match-card-line{display:grid;grid-template-columns:auto auto 1fr;grid-template-areas:"meta comp comp" "home score away";row-gap:6px;column-gap:8px;align-items:center}.match-meta{grid-area:meta;display:flex;align-items:center;gap:6px}.match-card-body,.match-card-body .game-widget,.match-card-body .game-widget .gw-center{display:contents}.match-card-body .gw-competition{grid-area:comp;position:static;transform:none;margin:0;text-align:left;justify-self:start}.match-card-body .game-score-widget{grid-area:score;justify-self:center}.gw-team{width:auto;justify-content:flex-start}.match-card-line .gw-team.gw-team-local{grid-area:home}.match-card-line .gw-team:not(.gw-team-local){grid-area:away;justify-content:flex-end}.team-name{max-width:80px;white-space:nowrap;line-height:1.2}.team-name.team-name-full{display:none}.team-name.team-name-short{display:inline-block}.game-score-team{width:30px;font-size:16px}}

/* Tooltip visibility on focus/active (mobile) */
.game-widget:focus-within .gw-tooltip,
.game-widget:active .gw-tooltip {
  opacity: 1;
  transform: translate(-50%, -120%);
}

/* Live match styles */
.match-card.is-live {
  border: 1px solid #f97316;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 65%);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.15);
}
.match-card.is-live .game-score-team {
  border-color: #f97316;
}
.gw-day {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gw-live-indicator {
  display: none;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #b91c1c;
}
.match-card.is-live .gw-day-text {
  display: none;
}
.match-card.is-live .gw-live-indicator {
  display: inline-flex;
}
.match-card.is-live .gw-hour {
  display: none !important;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: liveDotPulse 1.2s ease-in-out infinite;
}
.live-clock {
  font-size: 13px;
  letter-spacing: 0.02em;
}
.game-score-team.score-flash {
  animation: scoreFlash 0.6s ease;
}
.game-score-team {
  position: relative;
  overflow: visible;
}
.score-delta {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px) scale(0.9);
  pointer-events: none;
}
.score-delta-animate {
  animation: scoreDeltaRise 0.9s ease forwards;
}
@keyframes scoreDeltaRise {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(1.05);
  }
}
@keyframes liveDotPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  70% {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}
@keyframes scoreFlash {
  0% {
    background-color: #fff7ed;
  }
  100% {
    background-color: var(--white);
  }
}
