/* İlerleme paneli: yolculuk haritası + oyunlaştırma. Renkler styles.css'teki tema değişkenlerinden gelir. */

.stats-title {
  margin: 0 0 16px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--heading, var(--text));
}

.stats-subtitle {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading, var(--text));
}

.stats-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stats-muted { font-size: 0.8rem; color: var(--text-subtle, var(--text-muted)); }

.stats-journey,
.stats-today,
.stats-badges { padding: 16px 0; border-top: 1px solid var(--border); }

.stats-journey { border-top: 0; padding-top: 0; }

/* ---------- yolculuk haritası ---------- */

.stats-route { position: relative; padding-top: 4px; }

.stats-route-track,
.stats-route-fill {
  position: absolute;
  top: 25px;
  height: 4px;
  border-radius: 2px;
}

.stats-route-track {
  background-image: linear-gradient(90deg, var(--gold) 50%, transparent 50%);
  background-size: 10px 4px;
  opacity: 0.55;
}

.stats-route-fill {
  background: var(--primary);
  transition: width 0.6s ease;
}

.stats-stations {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.stats-station {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stats-station-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-subtle, var(--text-muted));
}

.stats-station-dot { position: relative; }

.stats-station-tick {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success-text, var(--success));
  color: #fff;
  border: 2px solid var(--surface);
}

/* styles.css'teki genel ".stats-chart-wrap svg { width: 100% }" kuralını ikonlar için geçersiz kıl. */
.stats-chart-wrap .stats-station-tick svg { width: 10px; height: 10px; }
.stats-chart-wrap .stats-tile dt svg { width: 14px; height: 14px; }
.stats-chart-wrap .stats-badge-icon svg { width: 18px; height: 18px; }
.stats-chart-wrap .stats-ring-svg { width: 104px; height: 104px; }

.stats-station.is-cleared .stats-station-dot {
  background: var(--gold);
  border-color: var(--gold);
  color: #1B2430;
}

.stats-station.is-current .stats-station-dot {
  border-color: var(--primary);
  color: var(--primary-text, var(--primary));
  box-shadow: 0 0 0 4px var(--primary-soft, transparent);
}


.stats-here {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--btn-primary-bg, var(--primary));
  color: var(--on-primary, #fff);
  white-space: nowrap;
}

.stats-journey-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--text);
  text-align: center;
}

/* ---------- bugün: günlük hedef + kutular ---------- */

.stats-today {
  display: flex;
  align-items: center;
  gap: 18px;
}

.stats-goal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stats-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stats-ring-svg { display: block; }
.stats-ring-track { fill: none; stroke: var(--border); }

.stats-ring-bar {
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.stats-ring-bar.is-complete { stroke: var(--gold); }

.stats-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.stats-ring-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--heading, var(--text));
}

.stats-ring-caption { font-size: 0.72rem; color: var(--text-subtle, var(--text-muted)); }

.stats-goal-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-subtle, var(--text-muted));
}

.stats-goal-select select { min-height: 36px; font-size: 0.8rem; }

.stats-tiles {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.stats-tile {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--primary-soft, var(--bg));
}

.stats-tile dt {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-subtle, var(--text-muted));
}

.stats-tile dd {
  margin: 2px 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.stats-tile.is-hot dt,
.stats-tile.is-hot dd { color: var(--gold-text, var(--gold)); }

/* ---------- rozetler ---------- */

.stats-badges { padding-bottom: 0; }

.stats-badge-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stats-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  text-align: center;
  opacity: 0.72;
}

.stats-badge.is-earned {
  opacity: 1;
  border: 1px solid var(--gold);
  background: var(--surface);
}

.stats-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-subtle, var(--text-muted));
}

.stats-badge.is-earned .stats-badge-icon {
  background: var(--gold);
  color: #1B2430;
}

.stats-badge-name { font-size: 0.72rem; font-weight: 600; color: var(--text); line-height: 1.2; }

.stats-badge .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 420px) {
  .stats-today { flex-direction: column; }
  .stats-tiles { width: 100%; }
  .stats-station-dot { width: 38px; height: 38px; }
  .stats-route-track, .stats-route-fill { top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .stats-ring-bar, .stats-route-fill { transition: none; }
}
