/* Plate Calculator Modal & Visualizer Styles — Project Signature Black & Neon Green */
.plate-calc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.plate-calc-overlay.is-active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.plate-calc-card {
  width: 100%;
  max-width: 440px;
  background: #0d1110;
  border: 1px solid rgba(0, 240, 118, 0.2);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 240, 118, 0.08);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.plate-calc-overlay.is-active .plate-calc-card {
  transform: scale(1);
}

.plate-calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.plate-calc-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.plate-calc-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s ease;
}

.plate-calc-close:hover {
  color: #00f076;
}

/* Weight input row */
.plate-calc-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.plate-calc-weight-val {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 110px;
  flex: 0 0 auto;
}

.plate-calc-weight-num {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: #00f076;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  letter-spacing: -0.02em;
  text-shadow: 0 0 16px rgba(0, 240, 118, 0.4);
  text-align: center;
}

.plate-calc-weight-unit {
  font-size: 13px;
  font-weight: 800;
  color: #00f076;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-top: 4px;
  text-align: center;
}

.plate-calc-step-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.plate-calc-step-btn:hover {
  border-color: rgba(0, 240, 118, 0.4);
  color: #00f076;
  background: rgba(0, 240, 118, 0.1);
}

.plate-calc-step-btn:active {
  transform: scale(0.92);
  background: rgba(0, 240, 118, 0.2);
}

/* Bar options (20kg / 15kg / dumbbell) */
.plate-calc-bar-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 4px;
}

.plate-calc-bar-tab {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plate-calc-bar-tab.is-active {
  background: linear-gradient(135deg, #00f076, #00ba5b);
  color: #041208;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 240, 118, 0.35);
}

/* Visual Barbell Scheme */
.plate-calc-visualizer {
  width: 100%;
  height: 120px;
  background: #060807;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 0 12px;
}

.plate-calc-bar-rod {
  position: absolute;
  height: 12px;
  width: 94%;
  background: linear-gradient(180deg, #94a3b8 0%, #475569 50%, #1e293b 100%);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Symmetrical Bilateral Barbell */
.plate-calc-barbell-symmetrical {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.plate-calc-sleeve {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  max-width: 140px;
}

.plate-calc-sleeve.left {
  justify-content: flex-end;
}

.plate-calc-sleeve.right {
  justify-content: flex-start;
}

.plate-calc-sleeve-collar {
  width: 8px;
  height: 38px;
  background: #cbd5e1;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  z-index: 3;
}

.plate-calc-sleeve-collar.left {
  margin-right: 0;
  margin-left: 2px;
}

.plate-calc-sleeve-collar.right {
  margin-left: 0;
  margin-right: 2px;
}

.plate-calc-center-bar {
  flex: 0 1 100px;
  min-width: 50px;
  height: 12px;
  background: repeating-linear-gradient(90deg, #334155, #334155 3px, #475569 3px, #475569 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}

.plate-calc-bar-center-label {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.plate-calc-plates-rack {
  display: flex;
  align-items: center;
  z-index: 3;
  gap: 3px;
}

/* Quick step chips */
.plate-calc-quick-steppers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 18px;
}

.plate-calc-step-group {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.plate-calc-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.plate-calc-chip:active {
  transform: scale(0.92);
}

.plate-calc-step-group.minus .plate-calc-chip {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}

.plate-calc-step-group.minus .plate-calc-chip:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

.plate-calc-step-group.plus .plate-calc-chip {
  color: #86efac;
  border-color: rgba(0, 240, 118, 0.25);
  background: rgba(0, 240, 118, 0.06);
}

.plate-calc-step-group.plus .plate-calc-chip:hover {
  background: rgba(0, 240, 118, 0.18);
  border-color: #00f076;
  color: #00f076;
}

/* Colored Bumper / Cast Plates — Olympic High-Def */
.plate-item {
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 8.5px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.4), inset 0 -2px 3px rgba(0, 0, 0, 0.6), 0 3px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  flex-shrink: 0;
  position: relative;
}

.plate-25 { width: 15px; height: 100px; background: linear-gradient(90deg, #b91c1c 0%, #dc2626 50%, #ef4444 100%); border: 1px solid #f87171; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.plate-20 { width: 14px; height: 90px; background: linear-gradient(90deg, #059669 0%, #10b981 50%, #34d399 100%); border: 1px solid #6ee7b7; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.plate-15 { width: 13px; height: 80px; background: linear-gradient(90deg, #ca8a04 0%, #eab308 50%, #facc15 100%); color: #000; border: 1px solid #fef08a; text-shadow: none; }
.plate-10 { width: 12px; height: 70px; background: linear-gradient(90deg, #047857 0%, #059669 50%, #10b981 100%); border: 1px solid #34d399; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.plate-5  { width: 11px; height: 56px; background: linear-gradient(90deg, #cbd5e1 0%, #f8fafc 50%, #ffffff 100%); color: #000; border: 1px solid #94a3b8; text-shadow: none; font-size: 8px; }
.plate-2-5 { width: 10px; height: 44px; background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #475569 100%); border: 1px solid #64748b; font-size: 7.5px; }
.plate-1-25 { width: 8px; height: 34px; background: linear-gradient(90deg, #64748b 0%, #94a3b8 50%, #cbd5e1 100%); border: 1px solid #e2e8f0; color: #000; font-size: 7px; text-shadow: none; }

/* Summary badge list */
.plate-calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}

.plate-calc-side-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 240, 118, 0.08);
  border: 1px solid rgba(0, 240, 118, 0.22);
  border-radius: 12px;
  padding: 8px 14px;
}

.plate-calc-side-title {
  font-size: 13px;
  font-weight: 800;
  color: #00f076;
}

.plate-calc-side-val {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.plate-calc-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.plate-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 13px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plate-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ── LIGHT THEME FOR PLATE CALCULATOR ── */
html[data-theme="light"] .plate-calc-overlay,
body.light-theme .plate-calc-overlay,
html[data-theme="light"] #plate-calculator-modal,
body.light-theme #plate-calculator-modal {
  background: rgba(15, 23, 42, 0.45) !important;
}

html[data-theme="light"] .plate-calc-card,
body.light-theme .plate-calc-card,
html[data-theme="light"] #plate-calculator-modal .plate-calc-card,
body.light-theme #plate-calculator-modal .plate-calc-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15) !important;
  color: #000000 !important;
}

html[data-theme="light"] .plate-calc-title,
body.light-theme .plate-calc-title {
  color: #000000 !important;
}

html[data-theme="light"] .plate-calc-close,
body.light-theme .plate-calc-close {
  color: #64748b !important;
}

html[data-theme="light"] .plate-calc-close:hover,
body.light-theme .plate-calc-close:hover {
  color: #000000 !important;
}

html[data-theme="light"] .plate-calc-step-btn,
body.light-theme .plate-calc-step-btn {
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #000000 !important;
}

html[data-theme="light"] .plate-calc-step-btn:hover,
body.light-theme .plate-calc-step-btn:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #000000 !important;
}

html[data-theme="light"] .plate-calc-bar-tabs,
body.light-theme .plate-calc-bar-tabs {
  background: #f1f5f9 !important;
  border: 1.5px solid #e2e8f0 !important;
}

html[data-theme="light"] .plate-calc-bar-tab,
body.light-theme .plate-calc-bar-tab {
  color: #64748b !important;
}

html[data-theme="light"] .plate-calc-bar-tab.is-active,
body.light-theme .plate-calc-bar-tab.is-active {
  background: #00f076 !important;
  color: #000000 !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(0, 240, 118, 0.35) !important;
}

html[data-theme="light"] .plate-calc-visualizer,
body.light-theme .plate-calc-visualizer {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
}

html[data-theme="light"] .plate-calc-bar-rod,
body.light-theme .plate-calc-bar-rod {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 50%, #475569 100%) !important;
}

html[data-theme="light"] .plate-calc-bar-center-label,
body.light-theme .plate-calc-bar-center-label {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .plate-calc-chip,
body.light-theme .plate-calc-chip {
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
}

html[data-theme="light"] .plate-calc-step-group.minus .plate-calc-chip,
body.light-theme .plate-calc-step-group.minus .plate-calc-chip {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}

html[data-theme="light"] .plate-calc-step-group.minus .plate-calc-chip:hover,
body.light-theme .plate-calc-step-group.minus .plate-calc-chip:hover {
  background: #fecaca !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

html[data-theme="light"] .plate-calc-step-group.plus .plate-calc-chip,
body.light-theme .plate-calc-step-group.plus .plate-calc-chip {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #15803d !important;
}

html[data-theme="light"] .plate-calc-step-group.plus .plate-calc-chip:hover,
body.light-theme .plate-calc-step-group.plus .plate-calc-chip:hover {
  background: #bbf7d0 !important;
  border-color: #22c55e !important;
  color: #166534 !important;
}

html[data-theme="light"] .plate-badge,
body.light-theme .plate-badge {
  background: #f1f5f9 !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .plate-calc-weight-num,
body.light-theme .plate-calc-weight-num {
  color: #000000 !important;
  text-shadow: none !important;
}

html[data-theme="light"] .plate-calc-weight-unit,
body.light-theme .plate-calc-weight-unit {
  color: #000000 !important;
  opacity: 0.9 !important;
}

html[data-theme="light"] .plate-calc-side-summary,
body.light-theme .plate-calc-side-summary {
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
}

html[data-theme="light"] .plate-calc-side-title,
body.light-theme .plate-calc-side-title {
  color: #059669 !important;
}

html[data-theme="light"] .plate-calc-side-val,
body.light-theme .plate-calc-side-val {
  color: #334155 !important;
}

/* --- Warm-up Pyramid & Mode Switcher --- */
.plate-calc-mode-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 16px;
  gap: 4px;
}

.plate-calc-mode-btn {
  flex: 1;
  background: none;
  border: none;
  color: rgba(218, 225, 248, 0.65);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.plate-calc-mode-btn.is-active {
  background: #00f076;
  color: #041208;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 240, 118, 0.25);
}

.plate-warmup-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}

.plate-warmup-header-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.plate-warmup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plate-warmup-card {
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.plate-warmup-card:hover {
  border-color: rgba(0, 240, 118, 0.3);
  background: #0c121e;
}

.plate-warmup-card.is-working {
  border-color: rgba(0, 240, 118, 0.4);
  background: rgba(0, 240, 118, 0.06);
  box-shadow: 0 4px 16px rgba(0, 240, 118, 0.1);
}

.plate-warmup-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plate-warmup-step-badge {
  font-size: 11px;
  font-weight: 800;
  color: #00f076;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plate-warmup-pct {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(218, 225, 248, 0.65);
}

.plate-warmup-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plate-warmup-weight-info {
  display: flex;
  flex-direction: column;
}

.plate-warmup-weight-val {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  line-height: 1.1;
}

.plate-warmup-weight-val small {
  font-size: 12px;
  color: #00f076;
  font-weight: 700;
}

.plate-warmup-weight-sub {
  font-size: 11px;
  color: rgba(218, 225, 248, 0.6);
  font-weight: 500;
  margin-top: 2px;
}

.plate-warmup-apply-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.plate-warmup-apply-btn:hover {
  background: rgba(0, 240, 118, 0.15);
  border-color: #00f076;
  color: #00f076;
}

.plate-warmup-plates-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
  padding: 5px 8px;
  border-radius: 6px;
}

.plate-warmup-empty {
  text-align: center;
  padding: 30px 16px;
}

/* Light theme support */
html[data-theme="light"] .plate-calc-mode-switch,
body.light-theme .plate-calc-mode-switch {
  background: #f1f5f9 !important;
  border: 1.5px solid #e2e8f0 !important;
}

html[data-theme="light"] .plate-calc-mode-btn,
body.light-theme .plate-calc-mode-btn {
  color: #64748b !important;
}

html[data-theme="light"] .plate-calc-mode-btn.is-active,
body.light-theme .plate-calc-mode-btn.is-active {
  background: #00f076 !important;
  color: #000000 !important;
}

html[data-theme="light"] .plate-warmup-card,
body.light-theme .plate-warmup-card {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
}

html[data-theme="light"] .plate-warmup-weight-val,
body.light-theme .plate-warmup-weight-val {
  color: #0f172a !important;
}

html[data-theme="light"] .plate-warmup-apply-btn,
body.light-theme .plate-warmup-apply-btn {
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
}
