/* ─────────────────────────────────────────────────────────────────────────────
   Forge — Strength / 1RM Page CSS
───────────────────────────────────────────────────────────────────────────── */


.str-units-pill {
  padding: 4px 12px;
  border-radius: 20px;
  border: 0.5px solid var(--gold-border);
  background: var(--gold-dim);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.15s;
  user-select: none;
}
.str-units-pill:hover { background: rgba(200,150,62,0.2); }

/* ── Tab nav ──────────────────────────────────────────────────────────────── */
.str-tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  overflow-x: auto;
}
.str-tabs::-webkit-scrollbar { display: none; }

.str-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.str-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Main content ─────────────────────────────────────────────────────────── */
.str-main {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 80px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.str-panel { display: none; }
.str-panel.active { display: block; animation: fadeUp 0.2s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Section label ────────────────────────────────────────────────────────── */
.str-section-label {
  font-family: var(--font-cond);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── Lift selector: one list to search, by group (owner, 2026-10-22) ──────── */
.str-lift-picker { margin-bottom: 20px; }
.str-lift-picker .an-ex-dropdown-trigger { color: var(--text); font-size: 14px; }
.str-lift-picker .an-ex-dropdown-list { max-height: min(60vh, 420px); }
.str-lift-search {
  position: sticky; top: 0; z-index: 1;
  width: 100%; padding: 11px 14px;
  background: var(--surface); color: var(--text);
  border: none; border-bottom: 0.5px solid var(--border);
  font-family: var(--font-body); font-size: 16px;   /* under 16px, iOS Safari zooms in */
}
.str-lift-search:focus { outline: none; border-bottom-color: var(--gold-border); }
.str-lift-group-label {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 44px; padding: 0 14px;
  border: none; border-bottom: 0.5px solid var(--border); background: none; text-align: left;
  font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--gold); cursor: pointer;
}
.str-lift-group.open .str-lift-group-label .an-ex-chevron { transform: rotate(180deg); }
.str-lift-group:not(.open) .str-lift-option { display: none; }
.str-lift-option {
  width: 100%; border: none; background: none; text-align: left;
  font-family: var(--font-body);
}
.str-lift-option[hidden], .str-lift-group[hidden] { display: none; }

/* ── Calculator card ──────────────────────────────────────────────────────── */
.str-calc-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.str-calc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.str-calc-lift-name {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--text);
}

.str-calc-lift-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Mode toggle ──────────────────────────────────────────────────────────── */
.str-mode-toggle {
  display: flex;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.str-mode-btn {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.str-mode-btn.active {
  background: var(--card);
  color: var(--gold);
  box-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* ── Inputs ───────────────────────────────────────────────────────────────── */
.str-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.str-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.str-input-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.str-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.str-input:focus {
  border-color: var(--gold-border);
  box-shadow: var(--shadow-focus);
}
.str-input::placeholder { color: var(--muted); }

/* ── Formula pills ────────────────────────────────────────────────────────── */
.str-formula-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.str-formula-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.str-formula-pill {
  padding: 5px 12px;
  border-radius: 20px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.str-formula-pill:hover { border-color: var(--gold-border); color: var(--text); }
.str-formula-pill.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* ── Calculate button ─────────────────────────────────────────────────────── */
.str-calc-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: var(--gold);
  color: #0E0E0F;
  font-family: var(--font-cond);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.25s var(--ease-precise);
}
.str-calc-btn:hover  { opacity: 0.9; transform: translateY(-4px); }
.str-calc-btn:active { transform: scale(0.99); }

/* ── Result card — a calculated 1RM is a milestone moment; it earns structural depth. ── */
.str-result-card {
  background: var(--card-raised);
  border: 0.5px solid var(--gold-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-molten);
  animation: fadeUp 0.35s var(--ease-precise);
}

.str-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.str-result-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}

.str-pr-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(200,150,62,0.15);
  color: var(--gold);
  border: 0.5px solid var(--gold-border);
  animation: pulsePR 1s ease infinite alternate;
}

@keyframes pulsePR {
  from { opacity: 0.8; }
  to   { opacity: 1; box-shadow: 0 0 12px rgba(200,150,62,0.3); }
}

.str-result-value {
  font-family: var(--font-display);
  font-size: 56px;
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.str-result-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.str-result-extra {
  font-size: 13px;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 14px;
}

.str-save-pr-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 14px;
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  color: var(--gold);
  font-family: var(--font-cond);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition), transform 0.25s var(--ease-precise);
}
.str-save-pr-btn:hover:not(:disabled) {
  background: rgba(200,150,62,0.15);
  transform: translateY(-4px);
}
.str-save-pr-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.str-share-pr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  margin-bottom: 14px;
  background: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  color: #0E0E0F;
  font-family: var(--font-cond);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition), transform 0.25s var(--ease-precise);
}
.str-share-pr-btn:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-4px); }
.str-share-pr-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.str-record-share-btn { margin-top: 12px; margin-bottom: 0; }

/* ── Formula comparison ───────────────────────────────────────────────────── */
.str-formula-comparison {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.str-formula-compare-item {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.str-formula-compare-item.highlighted {
  border-color: var(--gold-border);
  background: var(--gold-dim);
}

.str-fc-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 3px;
}
.str-formula-compare-item.highlighted .str-fc-name { color: var(--gold); }

.str-fc-value {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--text);
}

/* ── 3RM card ─────────────────────────────────────────────────────────────── */
.str-3rm-card {
  background: var(--card);
  border: 0.5px solid var(--gold-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 12px;
}

.str-3rm-value {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--text);
  letter-spacing: 1px;
  margin: 4px 0;
}

/* ── Strength level card ──────────────────────────────────────────────────── */
.str-level-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.str-level-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.str-level-value {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.str-level-value.beginner     { color: var(--muted); }
.str-level-value.novice       { color: #78a4e0; }
.str-level-value.intermediate { color: var(--gold); }
.str-level-value.advanced     { color: #e07878; }
.str-level-value.elite        { color: var(--green); }

.str-level-next {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Records grid ─────────────────────────────────────────────────────────── */
.str-records-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.str-record-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.str-record-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.1s;
}
.str-record-card-header:hover { background: rgba(255,255,255,0.02); }

.str-record-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}


.str-record-lift-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.str-record-1rm {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.str-record-best {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--gold);
  line-height: 1;
}

.str-record-unit {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-body);
}

.str-record-history {
  display: none;
  border-top: 0.5px solid var(--border);
  padding: 12px 16px;
}
.str-record-card.open .str-record-history { display: block; }

.str-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
}
.str-history-row:last-child { border-bottom: none; }
.str-history-date { color: var(--muted); }
.str-history-value { font-weight: 600; color: var(--text); }
.str-history-pr {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--gold-dim);
  color: var(--gold);
  border: 0.5px solid var(--gold-border);
}

.str-record-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.str-record-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.str-record-empty-title { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.str-record-empty-sub { font-size: 13px; line-height: 1.6; }

/* ── Loads tab ────────────────────────────────────────────────────────────── */
.str-loads-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.str-loads-empty-icon  { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.str-loads-empty-title { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.str-loads-empty-sub   { font-size: 13px; line-height: 1.6; }

.str-loads-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.str-loads-lift-name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 2px;
}

.str-loads-1rm {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.str-loads-edit-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 0.5px solid var(--gold-border);
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s, transform 0.25s var(--ease-precise);
}
.str-loads-edit-btn:hover { background: rgba(200,150,62,0.2); transform: translateY(-4px); }

/* ── Percentage table ─────────────────────────────────────────────────────── */
.str-pct-table-wrap {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.str-pct-table {
  width: 100%;
  border-collapse: collapse;
}

.str-pct-table th {
  font-family: var(--font-cond);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  text-align: left;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
}

.str-pct-table td {
  font-size: 14px;
  color: var(--text);
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
}

.str-pct-table tr:last-child td { border-bottom: none; }

.str-pct-table tr.highlighted td {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 600;
}

.str-pct-cell { font-weight: 700; color: var(--gold); }
.str-rpe-cell { font-size: 12px; color: var(--muted); }

.str-loads-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 2px;
}

/* ── Titan program loads ──────────────────────────────────────────────────── */
.str-titan-loads {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.str-titan-load-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.str-titan-load-left { display: flex; flex-direction: column; gap: 2px; }
.str-titan-load-pct  { font-size: 14px; font-weight: 600; color: var(--text); }
.str-titan-load-desc { font-size: 11px; color: var(--muted); }

.str-titan-load-weight {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--gold);
}

/* ── Focus states (keyboard / gym-floor accessibility) ───────────────────── */
.str-units-pill:focus-visible,
.str-tab:focus-visible,
.str-lift-option:focus-visible,
.str-mode-btn:focus-visible,
.str-formula-pill:focus-visible,
.str-calc-btn:focus-visible,
.str-save-pr-btn:focus-visible,
.str-loads-edit-btn:focus-visible,
.str-record-card-header:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .str-result-value { font-size: 44px; }
  .str-formula-comparison { grid-template-columns: repeat(2, 1fr); }
}
