/* ================================================================
   RITSCHI — Strava Widget Styles
   Matches the existing Beyond Limits dark theme
   ================================================================ */

/* --- Powered by Strava badge --- */
.strava-powered {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(252, 76, 2, 0.08);
  border: 1px solid rgba(252, 76, 2, 0.15);
  color: #FC4C02;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

/* --- Stats Cards --- */
.strava-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.strava-stats__card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.strava-stats__card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.strava-stats__icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.strava-stats__value {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text, #fff);
  line-height: 1.2;
}

.strava-stats__label {
  font-size: 0.75rem;
  color: var(--color-text-muted, rgba(255,255,255,0.5));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* --- Discipline Stats --- */
.strava-discipline-stats {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.strava-discipline-stats__title {
  font-family: 'Clash Display', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted, rgba(255,255,255,0.5));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}

.strava-discipline-stats__grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.strava-discipline-stats__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.strava-discipline-stats__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.strava-discipline-stats__sport {
  font-weight: 500;
  font-size: 0.9rem;
}

.strava-discipline-stats__data {
  font-size: 0.85rem;
  color: var(--color-text-muted, rgba(255,255,255,0.5));
}

.strava-discipline-stats__ytd {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.strava-discipline-stats__ytd-label {
  font-size: 0.8rem;
  color: var(--color-text-muted, rgba(255,255,255,0.5));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.strava-discipline-stats__ytd-value {
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-accent, #FC4C02);
}

/* --- Activities Title --- */
.strava-activities__title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-muted, rgba(255,255,255,0.5));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1.25rem;
}

/* --- Activities Grid --- */
.strava-activities__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* --- Activity Card --- */
.strava-activity {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.strava-activity:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.strava-activity__map {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.strava-activity__map svg {
  width: 100%;
  height: auto;
  max-height: 140px;
}

.strava-activity__content {
  padding: 1rem 1.25rem 1.25rem;
}

.strava-activity__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.strava-activity__sport {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.strava-activity__date {
  font-size: 0.75rem;
  color: var(--color-text-muted, rgba(255,255,255,0.4));
}

.strava-activity__name {
  font-family: 'Clash Display', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--color-text, #fff);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strava-activity__metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.strava-activity__metric {
  display: flex;
  flex-direction: column;
}

.strava-activity__metric-value {
  font-family: 'Clash Display', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text, #fff);
}

.strava-activity__metric-label {
  font-size: 0.65rem;
  color: var(--color-text-muted, rgba(255,255,255,0.4));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.strava-activity__hr {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  color: var(--color-text-muted, rgba(255,255,255,0.5));
}

.strava-activity__hr-max {
  opacity: 0.5;
  font-size: 0.7rem;
}

/* --- Footer --- */
.strava-footer {
  text-align: center;
  padding-top: 1rem;
}

.strava-footer .btn {
  gap: 8px;
}

/* --- Loading --- */
.strava-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4rem 0;
  color: var(--color-text-muted, rgba(255,255,255,0.5));
  font-size: 0.9rem;
}

.strava-loading__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #FC4C02;
  border-radius: 50%;
  animation: strava-spin 0.8s linear infinite;
}

@keyframes strava-spin {
  to { transform: rotate(360deg); }
}

.strava-error {
  text-align: center;
  padding: 3rem 0;
  color: var(--color-text-muted, rgba(255,255,255,0.4));
  font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .strava-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .strava-activities__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .strava-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .strava-stats__card {
    padding: 1rem 0.75rem;
  }
  .strava-stats__value {
    font-size: 1.2rem;
  }
  .strava-activities__grid {
    grid-template-columns: 1fr;
  }
  .strava-activity__map {
    min-height: 100px;
  }
}
