/* ============================================================
   body-sheet.css — Body Diagram Bottom Sheet
   Nova Design Spec 2026-03-16
   ============================================================ */

/* ── Backdrop ─────────────────────────────────────────────── */
.body-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(7,9,15,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal);
}
.body-sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Sheet Container ──────────────────────────────────────── */
.body-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 310;
  background: var(--bg-card);
  border-top: 1px solid var(--border-accent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 85dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--duration-sheet) var(--ease-out-expo);
  box-shadow: var(--shadow-sheet);
  padding-bottom: env(safe-area-inset-bottom);
}
.body-sheet.is-open {
  transform: translateY(0);
}

/* ── Drag Handle ──────────────────────────────────────────── */
.body-sheet__handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

/* ── Sheet Header ─────────────────────────────────────────── */
.body-sheet__header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.body-sheet__title {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}
.body-sheet__close {
  width: 44px;
  height: 44px;
  background: var(--bg-input);
  border-radius: 50%;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ── Color Legend Strip ────────────────────────────────────── */
.body-sheet__legend {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-default);
  -webkit-overflow-scrolling: touch;
}
.body-sheet__legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.body-sheet__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Scrollable Region List ───────────────────────────────── */
.body-sheet__regions {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ── Region Card ──────────────────────────────────────────── */
.body-sheet-region {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.body-sheet-region__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.body-sheet-region__info {
  flex: 1;
  min-width: 0;
}
.body-sheet-region__label {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}
.body-sheet-region__metrics {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.body-sheet-region__value {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}
.body-sheet-region__days {
  font-size: var(--text-xs);
  margin-top: 2px;
}

.body-sheet-region__action {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--teal-400);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  cursor: pointer;
  white-space: nowrap;
  min-height: var(--touch-min);
  transition: border-color var(--duration-fast), background var(--duration-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-family: var(--font-sans);
}
.body-sheet-region__action:hover {
  background: var(--teal-100);
  border-color: var(--teal-400);
}

/* ── Body Score Display ───────────────────────────────────── */
.body-score {
  font-size: var(--text-sm);
  text-align: center;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}
.body-score__value {
  color: var(--teal-400);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
}
