/* ═══════════════════════════════════════════
   Score & Badge Styles
   Sommplicity · Score Service UI
════════════════════════════════════════════ */

/* ── Score Badge (Nav) ───────────────────── */

.score-badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px 4px 4px;
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.score-badge:hover {
  background: rgba(107, 39, 55, 0.08);
  transform: scale(1.02);
}

.score-badge-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-badge-icon svg {
  width: 32px;
  height: 32px;
}

.score-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.score-badge-name {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--pr-parchment, #E8E0D4);
  line-height: 1.2;
}

.score-badge-count {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--pr-text-dim, #8b8a88);
  line-height: 1;
  letter-spacing: 0.02em;
}


/* ── Toast Notification ──────────────────── */

.score-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  min-width: 200px;
  max-width: 340px;
  padding: 14px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--cream, #F5F1E8);
  background: var(--ink, #1A1A1A);
  box-shadow: 0 6px 24px rgba(26, 26, 26, 0.22);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.score-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.score-toast--points {
  border-left: 4px solid var(--gold, #B8943E);
}

.score-toast--badge {
  border-left: 4px solid var(--maroon, #722F37);
  background: linear-gradient(135deg, #1A1A1A 70%, #2E1418);
}

.score-toast--role-up {
  border-left: 4px solid var(--gold, #B8943E);
  background: linear-gradient(135deg, #1A1A1A 70%, #2A2312);
  font-weight: 600;
}


/* ── Badge Card ──────────────────────────── */

.badge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 120px;
  padding: 20px 12px 16px;
  border-radius: 12px;
  background: var(--cream, #F5F1E8);
  border: 1px solid var(--border, rgba(114, 47, 55, 0.18));
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 20px rgba(26, 26, 26, 0.10));
}

.badge-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gold, #B8943E);
  background: var(--white, #F9F7F4);
}

.badge-card__name {
  font-family: var(--font-subhead);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #1A1A1A);
  line-height: 1.25;
}

.badge-card__desc {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--ink-light, #6B6B6B);
  line-height: 1.3;
}

.badge-card__date {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--gold-mid, #B8963E);
  font-weight: 500;
}


/* ── Badge States ────────────────────────── */

.badge-locked {
  opacity: 1;
}

.badge-locked .badge-card__icon {
  border-color: var(--cream-dark, #DED8CA);
  background: var(--cream-mid, #EDE8DC);
  filter: grayscale(1);
  opacity: 0.45;
}

.badge-locked .badge-card__name {
  color: var(--ink-light, #6B6B6B);
}

.badge-locked .badge-card__desc {
  color: var(--ink-xlight, #9A9A9A);
}

.badge-earned .badge-card__icon {
  border-color: var(--gold, #B8943E);
  box-shadow: 0 0 0 3px rgba(184, 148, 62, 0.18),
              0 2px 8px rgba(184, 148, 62, 0.12);
}

.badge-earned .badge-card__name {
  color: var(--maroon, #722F37);
}


/* ── Badge Grid (Profile Page Helper) ────── */

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  padding: 8px 0;
}


/* ── Mobile ──────────────────────────────── */

@media (max-width: 480px) {
  .score-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    min-width: 0;
    max-width: none;
    font-size: 13px;
    padding: 12px 16px;
  }

  .badge-card {
    width: 100%;
    min-width: 100px;
    padding: 16px 10px 14px;
  }

  .badge-card__icon {
    width: 48px;
    height: 48px;
  }

  .badge-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }
}
