/* =============================================================
   POWERLIFTING TAB
   Visual barbell + plate renderer, plate grid selector,
   and 1RM / meet-prep stat cards.
   Depends on: tokens.css
   ============================================================= */

/* ── Barbell visualiser ─────────────────────────────────────── */

.plate-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 90px;
  margin: 20px 0;
  overflow-x: auto;
}

/* Bar sleeves (the ends of the barbell) */
.bar-sleeve {
  height: 14px;
  width: 40px;
  background: #9e9e9e;
  border-radius: 4px 0 0 4px;
  flex-shrink: 0;
}

.bar-sleeve.right {
  border-radius: 0 4px 4px 0;
}

/* Collars */
.bar-collar {
  height: 28px;
  width: 10px;
  background: #757575;
  flex-shrink: 0;
}

/* Central shaft */
.bar-shaft {
  height: 10px;
  flex: 1;
  min-width: 60px;
  max-width: 120px;
  background: #bdbdbd;
}

/* Individual weight plates (on the bar) */
.plate {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18), 0 2px 4px rgba(0,0,0,0.35);
}

.plate:hover {
  opacity: 0.8;
  transform: scaleY(1.05);
}

.plate:active {
  opacity: 0.65;
}

/* ── Plate grid selector ────────────────────────────────────── */

.plate-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.plate-add-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2.5px solid rgba(255,255,255,0.18);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
  margin: 0;
  min-width: 52px;
  transition: transform 0.1s, box-shadow 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.plate-add-btn .plate-btn-weight {
  font-size: 1rem;
  line-height: 1;
}

.plate-add-btn .plate-btn-unit {
  font-size: 0.6rem;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.04em;
}

/* Count badge — shows how many of this plate are loaded */
.plate-add-btn .plate-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #fff;
  color: #222;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 99px;
  min-width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  line-height: 1;
}

.plate-add-btn.has-plates .plate-count-badge {
  display: flex;
}

.plate-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

.plate-add-btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ── 1RM / meet-prep stat cards ─────────────────────────────── */

.pl-stat-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pl-stat-card {
  flex: 1 1 130px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}

.pl-stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pl-stat-card .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
}

/* Meet-week highlight chip */
.meet-week-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--highlight);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
}
