/* ==========================================================================
   RepForge Interactive Fitness Tools Stylesheet
   ========================================================================== */

.tools-hub-hero {
  background: var(--bg-surface-alt);
  border-bottom: 1px solid var(--border-light);
  padding: 48px 0;
  text-align: center;
}
.tools-hub-hero h1 {
  font-size: 2.75rem;
  margin-bottom: 12px;
}
.tools-hub-hero p {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.tool-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}
.tool-tab-btn {
  padding: 8px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.tool-tab-btn:hover, .tool-tab-btn.active {
  background: var(--text-primary);
  color: var(--accent);
  border-color: var(--text-primary);
}

.tool-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 40px auto;
  max-width: 820px;
  box-shadow: var(--shadow-card);
}

.tool-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.tool-header h2 {
  font-size: 1.75rem;
  margin-bottom: 6px;
}
.tool-header p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.tool-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
@media (min-width: 640px) {
  .tool-form-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
  .tool-form-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.form-control {
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast);
}
.form-control:focus {
  outline: none;
  border-color: #357A38;
}
[data-theme="dark"] .form-control:focus {
  border-color: var(--accent);
}

.unit-toggle-group {
  display: flex;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.unit-toggle-btn {
  flex: 1;
  padding: 8px 16px;
  background: var(--bg-surface-alt);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  border: none;
  transition: all var(--transition-fast);
}
.unit-toggle-btn.active {
  background: var(--text-primary);
  color: var(--accent);
}

.tool-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.tool-result-panel {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  display: none;
}
.tool-result-panel.active {
  display: block;
}
.result-headline {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.result-big-value {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  color: #17231B;
  line-height: 1.1;
  margin-bottom: 12px;
}
[data-theme="dark"] .result-big-value {
  color: var(--accent);
}
.result-subtext {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.percentage-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.875rem;
}
.percentage-table th, .percentage-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}
.percentage-table th {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

/* Macro Bar Visualizer */
.macro-progress-bar {
  display: flex;
  height: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 16px 0;
}
.macro-seg-protein {
  background: #3B82F6;
}
.macro-seg-carbs {
  background: #F59E0B;
}
.macro-seg-fat {
  background: #10B981;
}

.macro-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  margin-right: 6px;
}

/* Rest Timer Component */
.timer-display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  text-align: center;
}
.timer-clock {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 16px;
}
.timer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.timer-preset-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8125rem;
  background: var(--bg-surface);
}
.timer-preset-btn:hover {
  background: var(--accent);
  color: #0E1E12;
}

/* Workout Planner UI */
.planner-schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}
@media (min-width: 768px) {
  .planner-schedule-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}
.planner-day-col {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.day-name {
  font-weight: 800;
  font-size: 0.8125rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}
.day-focus-select {
  width: 100%;
  font-size: 0.75rem;
  padding: 6px 4px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.day-exercises-list {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  flex: 1;
}
.day-exercise-item {
  padding: 4px 6px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  border: 1px solid var(--border-light);
}

.tool-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-light);
}
