/* ═══════════════════════════════════════════════
   TRAININGS PAGE
   ═══════════════════════════════════════════════ */

/* ─── PREFERENCE TOGGLE ──────────────────────── */
.mode-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.mode-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
}

.mode-btn.active {
  background: var(--accent);
  color: #ffffff;
}

.mode-btn:not(.active):hover {
  background: rgba(0,0,0,0.05);
  color: var(--text);
}

/* ─── EXPLAINER BOX ──────────────────────────── */
.training-explainer {
  background: var(--accent-subtle);
  border: 1px solid rgba(29, 185, 84, 0.15);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.explainer-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
  color: var(--accent);
}

.explainer-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
}

.explainer-text {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.explainer-text strong {
  color: var(--accent);
  font-weight: 700;
}

/* ─── TRAINING CARDS GRID ────────────────────── */
.tr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 7rem;
}

/* ─── TRAINING CARD ──────────────────────────── */
.tr-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 1.75rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tr-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-color, var(--accent)), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tr-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.tr-card:hover::after,
.tr-card.selected::after {
  transform: scaleX(1);
}

.tr-card.selected {
  border-color: var(--card-color, var(--accent));
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 1px var(--card-color, var(--accent)), var(--shadow-lg);
}

/* ─── CARD HEADER ────────────────────────────── */
.tr-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tr-card-head-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.tr-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: var(--card-color-bg, rgba(29,185,84,.08));
}

.tr-icon svg {
  width: 22px;
  height: 22px;
}

.tr-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tr-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Selection badge */
.tr-select-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.tr-card.selected .tr-select-badge {
  background: var(--card-color, var(--accent));
  border-color: var(--card-color, var(--accent));
  color: #ffffff;
}

.tr-select-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  line-height: 1;
}

/* ─── CARD DESCRIPTION ───────────────────────── */
.tr-desc {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* ─── DETAILS LIST ───────────────────────────── */
.tr-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tr-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tr-detail-item::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--card-color, var(--accent));
  flex-shrink: 0;
  opacity: 0.6;
}

/* ─── EFFORT GAUGES ──────────────────────────── */
.tr-efforts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.effort-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.effort-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  width: 90px;
  flex-shrink: 0;
}

.effort-bar-wrap {
  flex: 1;
  height: 5px;
  background: rgba(0,0,0,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.effort-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.effort-fill-cardio    { background: linear-gradient(90deg, #f97316, #ef4444); }
.effort-fill-focus     { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.effort-fill-muscle    { background: linear-gradient(90deg, #10b981, #34d399); }

.effort-label-val {
  font-size: 0.68rem;
  color: var(--text-muted);
  width: 68px;
  text-align: right;
  flex-shrink: 0;
}

/* ─── ONLINE BADGE ───────────────────────────── */
.tr-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── STICKY SELECTION BAR ───────────────────── */
.tr-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 1rem 2rem;
  background: rgba(6, 6, 11, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tr-sticky-bar.visible {
  transform: translateY(0);
}

.tr-sticky-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.tr-sticky-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
}

.tr-sticky-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text);
}

.tr-sticky-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.tr-sticky-count strong {
  color: var(--text);
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .tr-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tr-card { padding: 1.25rem; }
  .tr-sticky-bar { padding: 0.85rem 1rem; }
  .tr-sticky-chips { display: none; }
  .effort-name { width: 72px; font-size: 0.64rem; }
  .effort-label-val { width: 55px; font-size: 0.64rem; }
  .tr-icon { width: 42px; height: 42px; font-size: 1.2rem; }
}
