/* =========================
   Race Result
   ========================= */

.race-result-highlight {
  align-items: center;
  background-color: var(--color-background-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  color: var(--color-text);
  display: flex;
  font-size: 1.4rem;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 20px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.race-result-highlight .label {
  letter-spacing: 0.05em;
}

.race-result-highlight .value {
  line-height: 1.1;
}

/* =========================
   Stage Results List
   ========================= */

/* Spacing between the two-column layout on the race results page */
.results-ranking-layout {
  margin-top: calc(var(--spacing-unit) * 2);
}

.result-rider-stack {
  line-height: 1.2;
}

.result-rider-name {
  color: var(--color-text);
}

.result-team-name {
  color: var(--color-text-muted);
  text-align: start;
}

.result-points-value {
  background: color-mix(
    in srgb,
    var(--color-accent) 75%,
    transparent
  );
  border: 1px solid color-mix(
    in srgb,
    var(--color-accent) 90%,
    rgba(255, 255, 255, 0.2)
  );
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.9rem;
  text-transform: uppercase;
}

/* Flags reused outside .card */
.result-card .flag {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  display: block;
  height: 20px;
  object-fit: cover;
  width: 32px;
}

@media (max-width: 576px) {
  .team-header-row {
    position: static !important;          /* disable the absolute-centering context */
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    gap: 0.75rem;
  }

  /* Total points block: remove absolute centering and flow normally */
  .team-header-row .position-absolute.start-50.translate-middle-x {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
  }

  /* Rewards area: remove ms-auto push, center it */
  .team-header-row .ms-auto {
    margin-left: 0 !important;
  }

  .team-header-row .claim-reward-button {
    width: auto; /* or 100% if you want full-width button on mobile */
  }
}
