/* ═══════════════════════════════════════════════════════════════
   controls.css  —  EduNudge SciLab | Motion
   Left panel controls — motion type buttons, parameter sliders,
   graph toggle, know more button and drawer
═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   1.  MOTION TYPE GRID
─────────────────────────────────────────────────────────────── */
.motion-type-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--space-xs);
}

/* ───────────────────────────────────────────────────────────────
   2.  MOTION TYPE BUTTON
─────────────────────────────────────────────────────────────── */
.motion-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px var(--space-sm);
  background: var(--bg-panel-section);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  user-select: none;
}

.motion-btn:hover {
  background: var(--bg-panel-hover);
  border-color: var(--brand-glow);
  transform: translateX(2px);
}

/* Active / selected state */
.motion-btn.active {
  background: rgba(79, 195, 247, 0.1);
  border-color: var(--brand-glow);
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.15);
}

/* Colour variants per motion type */
.motion-btn[data-type="uniform"].active {
  background: rgba(79, 195, 247, 0.1);
  border-color: #4fc3f7;
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.2);
}

.motion-btn[data-type="accelerating"].active {
  background: rgba(67, 233, 123, 0.1);
  border-color: #43e97b;
  box-shadow: 0 0 10px rgba(67, 233, 123, 0.2);
}

.motion-btn[data-type="decelerating"].active {
  background: rgba(247, 151, 30, 0.1);
  border-color: #f7971e;
  box-shadow: 0 0 10px rgba(247, 151, 30, 0.2);
}

.motion-btn[data-type="rest"].active {
  background: rgba(162, 155, 254, 0.1);
  border-color: #a29bfe;
  box-shadow: 0 0 10px rgba(162, 155, 254, 0.2);
}

/* ── Button content ── */
.motion-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
}

.motion-label {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.motion-sub {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  line-height: 1.2;
  margin-top: 1px;
}

.motion-btn:hover .motion-label,
.motion-btn.active .motion-label {
  color: var(--text-primary);
}

.motion-btn:hover .motion-sub,
.motion-btn.active .motion-sub {
  color: var(--text-secondary);
}

/* Flex column for label + sub */
.motion-btn>div,
.motion-btn span:not(.motion-icon) {
  display: flex;
  flex-direction: column;
}

/* ───────────────────────────────────────────────────────────────
   3.  PARAMETERS WRAPPER
─────────────────────────────────────────────────────────────── */
.param-wrapper {
  background: var(--bg-panel-section);
  padding: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* ── Parameter row ── */
.param-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.param-row:last-child {
  margin-bottom: 0;
}

.param-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Slider + value side by side ── */
.param-control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ── Range slider ── */
.param-control input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: var(--border-bright);
  outline: none;
  cursor: pointer;
}

.param-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-glow);
  cursor: pointer;
  border: 2px solid var(--bg-page);
  box-shadow: 0 0 6px rgba(79, 195, 247, 0.5);
  transition: transform var(--transition-fast);
}

.param-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.param-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-glow);
  cursor: pointer;
  border: 2px solid var(--bg-page);
}

.param-value {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-glow);
  font-family: var(--font-mono);
  min-width: 48px;
  text-align: right;
  white-space: nowrap;
}

/* ───────────────────────────────────────────────────────────────
   4.  GRAPH TOGGLE  (D-T / V-T buttons)
─────────────────────────────────────────────────────────────── */
.graph-toggle {
  display: flex;
  gap: 4px;
}

.graph-btn {
  flex: 1;
  padding: 5px var(--space-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.04em;
  transition: background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.graph-btn:hover {
  background: var(--bg-panel-hover);
  border-color: var(--brand-glow);
  color: var(--text-primary);
}

.graph-btn.active {
  background: rgba(79, 195, 247, 0.15);
  border-color: var(--brand-glow);
  color: var(--brand-glow);
  box-shadow: 0 0 8px rgba(79, 195, 247, 0.2);
}

/* ───────────────────────────────────────────────────────────────
   5.  EQUATION LIST  (inside Know More drawer)
─────────────────────────────────────────────────────────────── */
.equation-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.equation-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px var(--space-sm);
  background: rgba(79, 195, 247, 0.05);
  border: 1px solid rgba(79, 195, 247, 0.1);
  border-radius: var(--radius-sm);
  gap: var(--space-sm);
}

.eq-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.eq-formula {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--brand-glow);
  font-family: var(--font-mono);
  text-align: right;
}

/* ───────────────────────────────────────────────────────────────
   6.  CONCEPT LIST  (inside Know More drawer)
─────────────────────────────────────────────────────────────── */
.concept-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.concept-list li {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  display: flex;
  gap: var(--space-xs);
  align-items: flex-start;
}

/* ───────────────────────────────────────────────────────────────
   7.  RESPONSIVE
─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .motion-btn {
    padding: 6px var(--space-sm);
  }

  .motion-icon {
    font-size: 14px;
  }

  .motion-label {
    font-size: 11px;
  }

  .motion-sub {
    display: none;
  }
}

@media (max-width: 480px) {
  .motion-type-grid {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }
}