/* ═══════════════════════════════════════════════════════════
   body-tab.css — Biometric monitoring aesthetic for #section-body
   Scoped to #section-body to avoid polluting other tabs.
═══════════════════════════════════════════════════════════ */

/* ── Heartbeat pulse on body header icon ── */
#section-body .section-title .fa-heartbeat {
  display: inline-block;
  animation: bodyHeartPulse 2s ease-in-out infinite;
}

@keyframes bodyHeartPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  14%       { transform: scale(1.2); opacity: 1; }
  28%       { transform: scale(1);   opacity: 0.85; }
  42%       { transform: scale(1.1); opacity: 1; }
  56%       { transform: scale(1);   opacity: 0.9; }
}

/* ── Hero vitals ring grid ── */
.body-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.body-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.body-hero-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.body-hero-ring-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.body-hero-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--ring-color, var(--border-dark)) calc(var(--ring-pct, 0) * 1%),
    var(--border-default) 0
  );
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 57%, black 58%);
  mask: radial-gradient(circle at 50% 50%, transparent 57%, black 58%);
  transition: background 0.5s ease;
}

.body-hero-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-family-mono);
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.body-hero-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--text-muted);
  text-align: center;
}

.body-hero-sub {
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  min-height: 2.4em;
}

@media (max-width: 576px) {
  .body-hero-grid { gap: var(--space-2); }
  .body-hero-card { padding: var(--space-3) var(--space-2); }
  .body-hero-ring-wrap, .body-hero-ring { width: 70px; height: 70px; }
  .body-hero-value { font-size: var(--font-size-base); }
}

/* ── Checklist progress bar ── */
.checklist-progress-track {
  height: 3px;
  background: var(--border-default);
  border-radius: var(--radius-full);
  margin-top: var(--space-3);
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  background: var(--color-success);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* ── Todo items: left priority border ── */
.todo-item {
  border-left: 2.5px solid transparent;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.todo-item:has(.todo-priority.H) { border-left-color: var(--color-danger); }
.todo-item:has(.todo-priority.M) { border-left-color: var(--color-warning); }
.todo-item:has(.todo-priority.L) { border-left-color: var(--color-info-dark, #3182ce); }
.todo-item.done { border-left-color: transparent !important; }

/* ── Body panel reveal animation ── */
#section-body .body-panel {
  animation: bodyPanelReveal 0.25s ease both;
}

@keyframes bodyPanelReveal {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Audio therapy preset: glow on active ── */
.at-preset-btn.at-preset-active {
  box-shadow: 0 0 14px -2px currentColor;
}

/* ── Section subtitle refinement within body ── */
#section-body .section-subtitle {
  letter-spacing: 0.04em;
}

/* ── Metric card staggered entrance ── */
#body-today-metrics .metric-card,
#body-oura-extra-metrics .metric-card,
#body-manual-metrics .metric-card,
#body-week-metrics .metric-card {
  animation: bodyCardReveal 0.3s ease both;
}

@keyframes bodyCardReveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
