/*
 * BWS 2.0 — Subscription Badges
 * Silver · Gold · Platinum
 * Use: .bws-badge[data-tier="silver|gold|platinum"]
 * Sizes: default (profile) | .bws-badge--sm (thread signature) | .bws-badge--lg (hero)
 */

/* ══ BASE ═══════════════════════════════════════════════════════════════════ */

.bws-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 20px;
  font-family: var(--font-ui, 'Rajdhani', sans-serif);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.bws-badge-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

/* ══ SILVER ══════════════════════════════════════════════════════════════════ */

.bws-badge[data-tier="silver"] {
  background: linear-gradient(135deg, #2e2e2e 0%, #5a5a5a 40%, #8a8a8a 60%, #3d3d3d 100%);
  border: 1px solid rgba(180, 180, 195, .6);
  color: #e8e8f0;
  box-shadow:
    0 1px 4px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -1px 0 rgba(0,0,0,.3);
}

.bws-badge[data-tier="silver"] .bws-badge-icon {
  background: linear-gradient(145deg, #a0a0b0, #606070);
  border: 1px solid rgba(200,200,210,.4);
  color: #f0f0ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

.bws-badge[data-tier="silver"]::after {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-15deg);
  pointer-events: none;
}

/* ══ GOLD ════════════════════════════════════════════════════════════════════ */

.bws-badge[data-tier="gold"] {
  background: linear-gradient(135deg, #3a2200 0%, #8a5800 30%, #d4920a 55%, #f0b820 70%, #9a6200 85%, #5a3800 100%);
  border: 1px solid rgba(220, 175, 40, .75);
  color: #fff8d0;
  box-shadow:
    0 2px 8px rgba(180, 130, 0, .45),
    inset 0 1px 0 rgba(255,240,140,.3),
    inset 0 -1px 0 rgba(0,0,0,.35);
  text-shadow: 0 1px 2px rgba(80,40,0,.6);
}

.bws-badge[data-tier="gold"] .bws-badge-icon {
  background: radial-gradient(circle at 35% 35%, #ffe87a, #c8780a);
  border: 1px solid rgba(255,210,60,.5);
  color: #3a1800;
  font-size: 12px;
  box-shadow:
    0 0 6px rgba(255, 200, 0, .45),
    inset 0 1px 0 rgba(255,255,180,.4);
}

.bws-badge[data-tier="gold"]::after {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  width: 28%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,240,100,.22), transparent);
  transform: skewX(-15deg);
  pointer-events: none;
}

/* ══ PLATINUM ════════════════════════════════════════════════════════════════ */

.bws-badge[data-tier="platinum"] {
  background: linear-gradient(135deg, #1a1a2a 0%, #4a4a6a 30%, #9090b8 55%, #c8c8e8 65%, #6060a0 80%, #1e1e38 100%);
  border: 1px solid rgba(180, 180, 230, .7);
  color: #f0f0ff;
  box-shadow:
    0 2px 10px rgba(120, 120, 220, .35),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(0,0,0,.4);
  text-shadow: 0 1px 3px rgba(0,0,40,.5);
}

.bws-badge[data-tier="platinum"] .bws-badge-icon {
  background: radial-gradient(circle at 35% 35%, #e8e8ff, #8888cc);
  border: 1px solid rgba(200,200,255,.45);
  color: #18182a;
  font-size: 10px;
  box-shadow:
    0 0 8px rgba(180,180,255,.5),
    inset 0 1px 0 rgba(255,255,255,.5);
}

.bws-badge[data-tier="platinum"]::after {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  width: 26%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(220,220,255,.28), transparent);
  transform: skewX(-15deg);
  pointer-events: none;
}

/* ══ SIZES ═══════════════════════════════════════════════════════════════════ */

/* Small — thread/post signature */
.bws-badge--sm {
  font-size: 10px;
  padding: 3px 7px 3px 4px;
  gap: 4px;
}

.bws-badge--sm .bws-badge-icon {
  width: 14px;
  height: 14px;
  font-size: 8px;
}

/* Large — profile hero */
.bws-badge--lg {
  font-size: 14px;
  padding: 7px 16px 7px 10px;
  gap: 8px;
  border-radius: 24px;
}

.bws-badge--lg .bws-badge-icon {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

/* ══ PROFILE BADGE SECTION ═══════════════════════════════════════════════════ */

.profile-badge-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.profile-badge-label {
  font-size: 11px;
  color: var(--text-dim, #7a6040);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-family: var(--font-ui, sans-serif);
  font-weight: 600;
}

/* Badge as avatar — replaces the circular avatar */
.profile-badge-avatar {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-badge-avatar[data-tier="silver"] {
  background: radial-gradient(circle at 40% 35%, #b0b0c8, #404060);
  border: 3px solid rgba(170,170,200,.6);
  box-shadow: 0 0 16px rgba(160,160,200,.3);
}

.profile-badge-avatar[data-tier="gold"] {
  background: radial-gradient(circle at 40% 35%, #ffe060, #8a5000);
  border: 3px solid rgba(220,170,30,.7);
  box-shadow: 0 0 20px rgba(200,150,0,.4);
}

.profile-badge-avatar[data-tier="platinum"] {
  background: radial-gradient(circle at 40% 35%, #d0d0ff, #404080);
  border: 3px solid rgba(180,180,240,.7);
  box-shadow: 0 0 20px rgba(160,160,255,.4);
}

.profile-badge-avatar-icon {
  font-size: 24px;
  line-height: 1;
}

/* ══ THREAD SIGNATURE ════════════════════════════════════════════════════════ */

.thread-author-sig {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* ══ BADGE SETTINGS (profile / account page) ═════════════════════════════════ */

.badge-settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid rgba(200,137,42,.12);
}

.badge-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-light, #c8b898);
  font-family: var(--font-ui, sans-serif);
  cursor: pointer;
}

.badge-toggle-label input[type="checkbox"] {
  accent-color: var(--amber, #c8892a);
  width: 14px;
  height: 14px;
}
