/* Badges page — mirrors iOS UI/Components/Badges/AchievementsListUI.swift. */

.badges-page {
  padding-top: 8px;
  padding-bottom: 64px;
}

.badges-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
}
.badges-header h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.badges-back {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: background-color 0.15s var(--ease);
}
.badges-back:hover { background: color-mix(in srgb, var(--unique) 12%, var(--surface)); color: var(--unique); }

/* ----- Progress card ----- */
.badges-progress {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.badges-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.badges-progress-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.badges-progress-count {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.badges-progress-bar {
  position: relative;
  height: 12px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
}
.badges-progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 999px;
  transition: width 0.4s var(--ease);
}
.badges-progress-legend {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text);
}
.badges-progress-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badges-progress-legend .legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.badges-progress-legend .legend-dot.earned    { background: var(--success); }
.badges-progress-legend .legend-dot.remaining { background: var(--text-muted); opacity: 0.5; }

/* ----- Section header ----- */
.badges-section-title {
  margin: 24px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.bst-label { color: var(--text-muted); }
.bst-count { color: var(--text-muted); opacity: 0.7; font-weight: 500; }

/* ----- Badge list ----- */
.badges-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.badge-row:last-child { border-bottom: 0; }

.badge-thumb {
  width: 72px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.badge-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.badge-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.badge-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
}

.badge-count {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 56px;
  line-height: 1;
}
.badge-count-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--unique);
  letter-spacing: -0.01em;
}
.badge-count-label {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.badge-lock {
  font-size: 18px;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Locked rows: dim image + text */
.badge-row.is-locked .badge-thumb img { filter: grayscale(1) brightness(0.7); }
.badge-row.is-locked .badge-title     { color: color-mix(in srgb, var(--text) 60%, transparent); }
.badge-row.is-locked .badge-subtitle  { color: color-mix(in srgb, var(--text-muted) 70%, transparent); }

@media (max-width: 640px) {
  .badge-row     { gap: 12px; }
  .badge-thumb   { width: 60px; height: 80px; }
  .badge-title   { font-size: 16px; }
  .badge-subtitle { font-size: 13px; }
  .badge-count-value { font-size: 22px; }
  .badges-progress { padding: 16px; }
}
