/* BV Simulator — Debug Calculator Panel */

.bv-debug-toggle {
  margin: 1rem 0;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
}

.bv-debug-toggle > summary {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: #475569;
  user-select: none;
  list-style: none;
}
.bv-debug-toggle > summary::-webkit-details-marker { display: none; }
.bv-debug-toggle > summary::before {
  content: "\25B6";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.15s;
  font-size: 0.75rem;
}
.bv-debug-toggle[open] > summary::before { transform: rotate(90deg); }

.bv-debug-body {
  padding: 0 1rem 1rem;
}

/* Section headings */
.bv-debug-section {
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  padding: 0.35rem 0.6rem;
  background: #334155;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Calculator rows */
.bv-debug-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(140px, auto);
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.85rem;
  line-height: 1.5;
  align-items: baseline;
}
.bv-debug-row:last-child { border-bottom: none; }

.bv-debug-label {
  color: #475569;
  font-weight: 500;
}

.bv-debug-formula {
  color: #94a3b8;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
}

.bv-debug-value {
  text-align: right;
  font-weight: 600;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  color: #1e293b;
}

/* Missing value highlight */
.bv-debug-row.missing {
  background: #fef2f2;
}
.bv-debug-row.missing .bv-debug-value {
  color: #dc2626;
  font-weight: 700;
}
.bv-debug-row.missing .bv-debug-label::after {
  content: " MISSING";
  font-size: 0.7rem;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Zero value subtle warning */
.bv-debug-row.zero .bv-debug-value {
  color: #d97706;
}

/* Total / result rows */
.bv-debug-row.result {
  background: #f0f9ff;
  border-bottom: 2px solid #3b82f6;
  font-weight: 700;
}
.bv-debug-row.result .bv-debug-value {
  color: #1d4ed8;
}

/* Separator */
.bv-debug-sep {
  border: none;
  border-top: 1px dashed #cbd5e1;
  margin: 0.5rem 0;
}
