/* ============================================================
   FitnessCalc Interactive Content Styles
   Dashboard, Compare, Protein, Timer, This-or-That
   ============================================================ */

/* ── DAILY WELLNESS DASHBOARD ──────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

.dash-card {
  background: var(--surface-1);
  border: 1px solid rgba(28, 25, 23, 0.06);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.dash-card-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.dash-card-title h4 {
  font-size: var(--text-base);
  font-weight: 700;
}

.dash-card-title svg {
  width: 20px;
  height: 20px;
  color: var(--coral);
}

.dash-sparkline {
  width: 120px;
  height: 32px;
  overflow: visible;
}

/* Water tracker */
.water-glasses {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.water-glass {
  width: 36px;
  height: 44px;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring);
  color: var(--surface-3);
}

.water-glass:hover {
  transform: scale(1.15);
}

.water-glass.filled {
  color: #3B82F6;
}

.water-glass.filled svg path {
  fill: currentColor;
}

.water-glass svg {
  width: 100%;
  height: 100%;
}

.water-count {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Steps tracker */
.dash-steps-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-md);
}

.dash-steps-row input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid rgba(28, 25, 23, 0.1);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: var(--text-sm);
  outline: none;
  max-width: 120px;
  -webkit-appearance: none;
  appearance: none;
}

.dash-steps-row input:focus {
  border-color: var(--coral);
}

.dash-steps-row label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.step-progress-bar {
  height: 8px;
  background: var(--surface-3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.step-progress-fill {
  height: 100%;
  background: var(--gradient-coral);
  border-radius: 4px;
  transition: width 0.5s var(--ease-out);
  width: 0%;
}

.step-progress-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Sleep quality */
.sleep-stars {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.sleep-star {
  cursor: pointer;
  width: 32px;
  height: 32px;
  color: var(--surface-3);
  transition: all var(--duration-fast) var(--ease-spring);
}

.sleep-star:hover {
  transform: scale(1.2);
}

.sleep-star.active {
  color: #F59E0B;
}

.sleep-star svg {
  width: 100%;
  height: 100%;
}

.sleep-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Mood tracker */
.mood-faces {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.mood-face {
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 50%;
  padding: 4px;
  transition: all var(--duration-fast) var(--ease-spring);
  color: var(--text-muted);
  background: transparent;
  border: 2px solid transparent;
}

.mood-face:hover {
  transform: scale(1.15);
  border-color: rgba(255, 107, 107, 0.2);
}

.mood-face.selected {
  border-color: var(--coral);
  background: rgba(255, 107, 107, 0.08);
  color: var(--coral);
}

.mood-face svg {
  width: 100%;
  height: 100%;
}

.mood-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── COMPARE ACTIVITIES ────────────────────────────────────── */
.compare-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.compare-controls select {
  flex: 1;
  min-width: 200px;
  padding: 0.7rem 2.5rem 0.7rem 1rem;
  border: 1.5px solid rgba(28, 25, 23, 0.1);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: var(--text-base);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.compare-controls select:focus {
  border-color: var(--coral);
}

.compare-vs {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--text-muted);
}

.compare-result {
  max-width: 700px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.4s var(--ease-out);
}

.compare-result.visible {
  opacity: 1;
  transform: translateY(0);
}

.compare-side {
  margin-bottom: var(--space-xl);
}

.compare-side-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.compare-bar-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.compare-bar-track {
  flex: 1;
  height: 24px;
  background: var(--surface-3);
  border-radius: 12px;
  overflow: hidden;
}

.compare-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.8s var(--ease-out);
  width: 0%;
}

.compare-bar-fill.bar-coral {
  background: var(--gradient-coral);
}

.compare-bar-fill.bar-teal {
  background: var(--gradient-teal);
}

.compare-cal-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  min-width: 80px;
  text-align: right;
}

.compare-cal-label.coral { color: var(--coral); }
.compare-cal-label.teal { color: var(--teal); }

.compare-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.compare-detail-card {
  background: var(--surface-1);
  border: 1px solid rgba(28, 25, 23, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.compare-detail-card h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.muscle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.muscle-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 107, 107, 0.08);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--coral);
}

.diff-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.diff-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
  transition: background 0.3s ease;
}

.diff-dot.active {
  background: var(--coral);
}

.diff-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: var(--space-sm);
}

/* ── PROTEIN COUNTER ───────────────────────────────────────── */
.protein-panel {
  max-width: 700px;
  margin: 0 auto;
}

.protein-search-container {
  position: relative;
  margin-bottom: var(--space-lg);
}

.protein-search-container input {
  width: 100%;
  padding: 0.8rem 1.25rem 0.8rem 3rem;
  border: 1.5px solid rgba(28, 25, 23, 0.1);
  border-radius: var(--radius-lg);
  background: var(--bg);
  font-size: var(--text-base);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.protein-search-container input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

.protein-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.protein-search-icon svg {
  width: 18px;
  height: 18px;
}

.protein-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-1);
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  margin-top: 4px;
  overflow: hidden;
}

.protein-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--duration-fast) ease;
  font-size: var(--text-sm);
}

.protein-result-item:hover {
  background: rgba(255, 107, 107, 0.06);
}

.protein-result-name {
  font-weight: 600;
  color: var(--text-primary);
}

.protein-result-info {
  color: var(--coral);
  font-weight: 600;
  font-size: var(--text-xs);
}

.protein-no-results {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-align: center;
}

.protein-summary {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.protein-total {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-3xl);
  background: var(--gradient-coral);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.protein-goal-display {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.protein-progress-bar {
  flex: 1;
  min-width: 200px;
}

.protein-progress-track {
  height: 10px;
  background: var(--surface-3);
  border-radius: 5px;
  overflow: hidden;
}

.protein-progress-fill {
  height: 100%;
  background: var(--gradient-coral);
  border-radius: 5px;
  transition: width 0.5s var(--ease-out);
  width: 0%;
}

.protein-log-list {
  max-height: 240px;
  overflow-y: auto;
}

.protein-log-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(28, 25, 23, 0.06);
}

.protein-log-item:last-child {
  border-bottom: none;
}

.protein-log-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
}

.protein-log-grams {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--coral);
  font-size: var(--text-sm);
}

.protein-log-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--duration-fast) ease;
}

.protein-log-remove:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #EF4444;
}

.protein-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: var(--space-lg);
}

/* ── WORKOUT TIMER ─────────────────────────────────────────── */
.timer-panel {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.timer-presets {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.timer-preset-btn {
  padding: 0.5rem 1.25rem;
  border: 1.5px solid rgba(28, 25, 23, 0.1);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-fast) ease;
  background: var(--bg);
}

.timer-preset-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.timer-preset-btn.active {
  background: var(--gradient-coral);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-coral);
}

.timer-custom-panel {
  display: none;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.timer-custom-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.timer-custom-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timer-custom-group input {
  width: 80px;
  text-align: center;
  padding: 0.5rem;
  border: 1.5px solid rgba(28, 25, 23, 0.1);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: var(--text-base);
  font-weight: 600;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.timer-custom-group input:focus {
  border-color: var(--coral);
}

.timer-circle-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto var(--space-lg);
}

.timer-circle-container svg {
  width: 200px;
  height: 200px;
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: var(--surface-3);
  stroke-width: 6;
}

.timer-circle-progress {
  fill: none;
  stroke: url(#coralGradient);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-time-display {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-4xl);
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer-phase {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}

.timer-phase-work {
  color: var(--coral);
}

.timer-phase-rest {
  color: var(--teal);
}

.timer-phase-done {
  color: #10B981;
}

.timer-round-display {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.timer-controls {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── THIS OR THAT ──────────────────────────────────────────── */
.tot-container {
  max-width: 600px;
  margin: 0 auto;
}

.tot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.tot-score-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.3rem 0.8rem;
  background: rgba(255, 107, 107, 0.08);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--coral);
}

.tot-card {
  background: var(--surface-1);
  border: 1px solid rgba(28, 25, 23, 0.06);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  transition: all 0.4s var(--ease-out);
}

.tot-question {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
}

.tot-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.tot-option {
  padding: var(--space-xl) var(--space-lg);
  border: 2px solid rgba(28, 25, 23, 0.08);
  border-radius: var(--radius-lg);
  background: var(--bg);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  font-family: var(--font-heading);
}

.tot-option:hover:not(:disabled) {
  border-color: var(--coral);
  background: rgba(255, 107, 107, 0.04);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tot-option.tot-correct {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.08);
  color: #065F46;
}

.tot-option.tot-wrong {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.08);
  color: #991B1B;
}

.tot-option:disabled {
  cursor: default;
  pointer-events: none;
}

.tot-answer {
  display: none;
  padding: var(--space-md) var(--space-lg);
  background: rgba(13, 148, 136, 0.06);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--teal);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.tot-final {
  display: none;
  text-align: center;
  padding: var(--space-2xl);
}

.tot-final-score {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 800;
  background: var(--gradient-coral);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.tot-final-pct {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.tot-final-msg {
  font-size: var(--text-lg);
  color: var(--teal);
  font-weight: 600;
  margin-bottom: var(--space-xl);
}

.tot-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── INTERACTIVE SECTION DIVIDER ───────────────────────────── */
.interactive-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.interactive-divider::before,
.interactive-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,107,107,0.2), transparent);
}

.interactive-divider span {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

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

  .compare-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .compare-controls select {
    min-width: 100%;
  }

  .compare-details {
    grid-template-columns: 1fr;
  }

  .tot-options {
    grid-template-columns: 1fr;
  }

  .mood-faces {
    gap: var(--space-sm);
  }

  .mood-face {
    width: 36px;
    height: 36px;
  }

  .timer-circle-container {
    width: 160px;
    height: 160px;
  }

  .timer-circle-container svg {
    width: 160px;
    height: 160px;
  }

  .timer-time-display {
    font-size: var(--text-2xl);
  }

  .protein-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .protein-progress-bar {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .water-glass {
    width: 30px;
    height: 36px;
  }

  .timer-presets {
    flex-wrap: wrap;
  }

  .sleep-star {
    width: 28px;
    height: 28px;
  }

  .mood-face {
    width: 32px;
    height: 32px;
  }
}
