/* Particle-filter simulator host (Assignment 03 Q9/Q10 modal + demo1 page). */

.pf-sim {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pf-sim__layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.pf-sim__main {
  flex: 1 1 420px;
  min-width: 280px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pf-sim__side {
  flex: 0 1 280px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pf-sim__canvas {
  display: block;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  touch-action: none;
  box-sizing: border-box;
}

.pf-sim__canvas--main {
  flex: 1 1 auto;
  height: 100%;
  min-height: 360px;
}

.pf-sim__canvas--mini {
  height: 220px;
  min-height: 160px;
  flex: 0 0 auto;
}

.pf-sim__toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex: 0 0 auto;
}

.pf-sim__btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}

.pf-sim__btn:hover {
  background: #eef2f7;
}

.pf-sim__btn--play {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
  font-weight: 600;
}

.pf-sim__btn--play:hover {
  background: #15803d;
}

.pf-sim__progress {
  margin-left: auto;
  font-size: 0.85rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.pf-sim__hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
  flex: 0 0 auto;
}

.pf-sim__controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pf-sim__control {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.5rem;
  font-size: 0.9rem;
}

.pf-sim__control > span {
  grid-column: 1 / -1;
  font-weight: 600;
  color: #475569;
}

.pf-sim__control input[type="range"] {
  width: 100%;
  margin: 0;
}

.pf-sim__control output {
  font-variant-numeric: tabular-nums;
  color: #334155;
  min-width: 2.5rem;
  text-align: right;
}

/* Snapshot controls in the shared modal footer (Q9 only). Buttons reuse the
 * .lidar-btn chrome; these rules add the row layout, a secondary "ghost"
 * variant for Clear, the counter text, and the disabled (3/3) state. */
.pf-snap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* The flex display above would otherwise override the [hidden] attribute the JS
 * toggles to show snapshot controls on Q9 only. */
.pf-snap[hidden] {
  display: none;
}

.lidar-btn--ghost {
  background: transparent;
  color: #475569;
}

.pf-snap__count {
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: #475569;
}

.lidar-btn:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
}
