/* ============================================================================
   LOW-DIMENSIONAL FLOWS - STYLES
   ============================================================================ */

/* Container */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Responsive container widths */
@media (min-width: 1350px) {
  .container {
    max-width: 1300px;
  }
}

@media (min-width: 1500px) {
  .container {
    max-width: 1450px;
  }
}

/* Header */
.header-container {
  position: relative;
  margin-top: 2em;
  margin-bottom: 1em;
}

.page-title {
  margin: 0;
}

.reset-button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: white;
}

.reset-button:hover {
  background: #f5f5f5;
}

.page-description {
  font-size: 16px;
  margin-bottom: 0.5em;
}

.description-separator {
  margin-top: 1em;
  margin-bottom: 5px;
  border: none;
  border-top: 1px solid #ddd;
}

.section-label {
  font-size: 12px;
  color: #888;
  margin-top: 0;
  margin-bottom: 20px;
}

/* Loss equation display */
.loss-equation-container {
  position: relative;
  margin-bottom: 0.8em;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.loss-equation-text {
  text-align: center;
  font-size: 24px;
}

.equation-buttons {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
}

.equation-button {
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: white;
}

.equation-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Dynamics equation */
.dynamics-equation {
  text-align: center;
  font-size: 24px;
  margin-bottom: 1em;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

/* Variable controls */
#variableControls {
  margin-bottom: 20px;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.variable-controls-wrapper {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.variable-box {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  background: #f9f9f9;
}

.variable-box.hidden {
  display: none;
}

.variable-box.fstar-box {
  background: #f0f8ff;
}

.variable-label {
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
}

.variable-label.constants-label {
  font-weight: normal;
}

.variable-sliders {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-label {
  min-width: 50px;
  font-size: 13px;
}

.slider-input {
  width: 100px;
}

.slider-value {
  min-width: 45px;
  font-size: 13px;
}

/* Global controls */
.controls-section {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-group label {
  font-size: 16px;
}

.control-group input[type="range"] {
  width: 150px;
}

.control-group span {
  font-size: 16px;
}

/* Plots separator */
.plots-separator {
  margin-top: 20px;
  margin-bottom: 5px;
  border: none;
  border-top: 1px solid #ddd;
}

.plots-section-label {
  font-size: 12px;
  color: #888;
  margin-top: 0;
  margin-bottom: 30px;
}

/* Plots */
.plots-container {
  display: flex;
  gap: 40px;
  margin-bottom: 2em;
  justify-content: center;
}

.plot-wrapper {
  flex: 0 0 500px;
}

.plot-box {
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  padding: 10px;
  padding-bottom: 35px;
  box-sizing: border-box;
  height: 335px;
}

.plot-content {
  height: 100%;
  position: relative;
}

.plot-canvas {
  width: 100%;
  height: 100%;
}

/* Axis labels */
.y-axis-label {
  position: absolute;
  top: 50%;
  transform: rotate(-90deg) translateY(-50%);
  transform-origin: center center;
  font-size: 17.5px;
  white-space: nowrap;
  word-spacing: 0.3em;
}

.y-axis-label-loss {
  left: -2px;
}

.y-axis-label-params {
  left: -37px;
}

.x-axis-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 17.5px;
  white-space: nowrap;
  word-spacing: 0.3em;
}

/* Logscale control */
.logscale-control {
  margin-top: 20px;
  text-align: center;
}

.logscale-control label {
  margin-right: 30px;
}

/* Theory section */
.theory-separator {
  margin-top: 40px;
  margin-bottom: 5px;
  border: none;
  border-top: 2px solid #ccc;
}

.theory-section-label {
  font-size: 12px;
  color: #888;
  margin-top: 0;
  margin-bottom: 20px;
}

.theory-metrics {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 40px;
}

.theory-metric {
  text-align: center;
}

.theory-metric-label {
  font-size: 16px;
  margin-bottom: 4px;
  color: #666;
}

.theory-metric-formula {
  font-size: 18px;
  margin-bottom: 8px;
}

.theory-metric-value {
  font-size: 20px;
  font-weight: bold;
  font-family: 'Georgia', serif;
}

.theory-rise-time {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.theory-rise-time-label {
  font-size: 16px;
  margin-bottom: 8px;
  color: #666;
}

.theory-rise-time-formula {
  font-size: 18px;
  margin-bottom: 12px;
}

.theory-rise-time-value {
  font-size: 20px;
  font-weight: bold;
  font-family: 'Georgia', serif;
}
