/* Explorable Manipulatives & Slicers (Stage 1 Enhancements)
   High-performance, accessible, low-latency interactive math controls */

.expl-slicer-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: var(--pub-sans, system-ui, sans-serif);
}

.expl-slicer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.expl-slicer-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.expl-slicer-pills {
  display: inline-flex;
  gap: 0.35rem;
  background: #e2e8f0;
  padding: 0.2rem;
  border-radius: 999px;
}

.expl-slicer-pill {
  border: none;
  background: transparent;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.expl-slicer-pill:hover {
  color: #0f172a;
}

.expl-slicer-pill.is-active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.expl-slicer-bar-track {
  display: flex;
  height: 48px;
  border: 2px solid #3b82f6;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.expl-slicer-slice {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px dashed #93c5fd;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.75rem;
  font-weight: 700;
}

.expl-slicer-slice:last-child {
  border-right: none;
}

.expl-slicer-slice.shaded {
  background: #dbeafe;
  color: #1d4ed8;
  border-right-color: #60a5fa;
}

.expl-slicer-slice.unshaded {
  background: #ffffff;
  color: #94a3b8;
}

.expl-slicer-equation-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e40af;
}

/* Scrubbable Area Model */
.expl-scrubber-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.expl-scrubber-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.expl-scrubber-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}

.expl-scrubber-slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.expl-scrubber-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  accent-color: #10b981;
  cursor: pointer;
}

.expl-scrubber-split-indicator {
  font-size: 0.85rem;
  font-weight: 700;
  color: #047857;
  min-width: 120px;
  text-align: right;
}

.expl-area-svg-stage {
  width: 100%;
  min-height: 100px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.25rem;
}

/* Micro-physics Pan Balance Scale */
.expl-physics-balance-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.expl-balance-beam-svg {
  width: 100%;
  height: 130px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 50% 50px;
}

.expl-balance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.expl-bal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.expl-bal-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.expl-bal-status-alert {
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
}

.expl-bal-status-alert.balanced {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.expl-bal-status-alert.unbalanced {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
