/* Shallow MLPs Styles */

.smlp-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.page-title {
  margin-top: 2em;
  margin-bottom: 0.3em;
}

.sim-button {
  padding: 7px 15px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}
.sim-button:hover  { background-color: #e0e0e0; }
.sim-button:active { background-color: #d0d0d0; }

.section-label {
  font-size: 12px;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 14px;
}

input[type="range"] { accent-color: #555; }

/* Single-column param list */
.param-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0.6em;
}

.param-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.param-desc {
  font-size: 0.82em;
  color: #888;
  min-width: 7em;
  text-align: right;
}

.param-label {
  font-size: 1.05em;
  min-width: 1.6em;
  text-align: right;
}

.param-slider {
  width: 120px;
  flex-shrink: 0;
}

.param-value {
  font-size: 0.92em;
  min-width: 3.5em;
  font-family: Monaco, Consolas, "Courier New", monospace;
}

/* Equations block (full-width row of formula cells) */
.eq-block {
  flex: 1;
  min-width: 260px;
  max-width: 480px;
}

.eq-row {
  display: flex;
  gap: 2.5em;
  flex-wrap: wrap;
  align-items: flex-start;
}

.eq-cell {
  flex: 1;
  min-width: 200px;
}

.eq-sublabel {
  font-size: 0.82em;
  color: #999;
  margin-bottom: 2px;
}

/* Custom expression input */
#customExprInput:focus { outline: none; border-color: #888; }
#customExprInput.error { border-color: #c00; }

/* Activation row */
.activation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
}
.activation-row label { font-size: 0.95em; }
.activation-row select {
  font-size: 0.92em;
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
  font-family: Monaco, Consolas, "Courier New", monospace;
}

/* Controls row */
.controls-row {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 1em;
  flex-wrap: wrap;
}
.steps-per-sec {
  margin-left: auto;
  font-size: 0.85em;
  color: #aaa;
  font-family: Monaco, Consolas, "Courier New", monospace;
}

/* Checkbox grid for plot toggles */
.plot-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 0.7em;
  font-size: 0.9em;
}
.plot-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}

/* Gear icon on plot cells */
.plot-cell,
.plot-cell-wide,
.plot-cell-square { position: relative; }

.plot-gear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  background: rgba(255,255,255,0.85);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: #555;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
.plot-cell:hover      > .plot-gear,
.plot-cell-wide:hover > .plot-gear,
.plot-cell-square:hover > .plot-gear { opacity: 1; }
.plot-gear:hover { background: #fff; border-color: #999; color: #222; }
.plot-gear-dim { color: #bbb; }
.plot-gear-dim:hover { color: #bbb; cursor: default; }

/* Gear popup menu */
.gear-menu {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 6px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 100px;
  font-size: 0.88em;
}
.gear-menu-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 2px;
  cursor: pointer;
  white-space: nowrap;
}
.gear-menu-row:hover { background: #f4f4f4; border-radius: 3px; }
.gear-menu-empty {
  color: #aaa;
  font-size: 0.9em;
  padding: 2px 2px;
  white-space: nowrap;
}

/* Dynamic plot grid */
.plots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0.4em;
}
.plot-cell {
  flex: 1 1 420px;
  max-width: calc(50% - 8px);
  min-width: 0;
}
.plot-cell-wide {
  flex: 1 1 100%;
  min-width: 0;
}
.plot-cell-square {
  flex: 0 0 420px;
  width: 420px;
  height: 420px;
  position: relative;
}
.plot-canvas-box {
  position: relative;
  height: 300px;
}

/* Plot controls */
.plot-controls-row {
  display: flex;
  align-items: center;
  gap: 1em;
  font-size: 0.87em;
  color: #666;
  margin-bottom: 1.4em;
  flex-wrap: wrap;
}
.plot-controls-row label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* x-axis step / t_eff toggle */
.xaxis-toggle {
  display: inline-flex;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  margin-left: 4px;
}
.xaxis-toggle a {
  padding: 2px 10px;
  color: #888;
  text-decoration: none;
  font-size: 0.9em;
  background: #f8f8f8;
  border-right: 1px solid #ccc;
  transition: background 0.15s;
}
.xaxis-toggle a:last-child { border-right: none; }
.xaxis-toggle a:hover { background: #eee; color: #444; }
.xaxis-toggle a.active { background: #555; color: #fff; }
