/* Additions to Bootstrap. No inline styles in templates: the CSP only allows this file and Bootstrap. */

.chart {
  width: 100%;
  min-height: 240px;
}

.login-card {
  max-width: 24rem;
}

/* Admin forms (notice, settings, PV): readable line length instead of the full page width. */
.form-narrow {
  max-width: 36rem;
}

.form-medium {
  max-width: 40rem;
}

/* Dashboards (reception screen): comparison bars, mode shares, trend chart, rotation timer. */
main.dashboard {
  max-width: 1800px;
}

.bar-row {
  display: grid;
  grid-template-columns: 9.5em 1fr 5.5em;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.bar-row .progress {
  height: 28px;
}

.bar-row .bar-value {
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mode-row {
  display: grid;
  grid-template-columns: 2.2em minmax(7em, 13em) 1fr 3.5em;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mode-row .progress {
  height: 16px;
}

.mode-row .mode-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-row .mode-value {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.record {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
}

.record-value {
  font-size: 1.5rem;
  font-weight: 800;
  white-space: nowrap;
}

.legend-swatch {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border-radius: 2px;
  vertical-align: middle;
}

.bg-actual {
  background-color: var(--bs-success-bg);
}

.bg-baseline {
  background-color: var(--bs-gray-500);
}

.rotate-track {
  width: 80px;
  height: 4px;
  background: var(--bs-bg-3);
  border-radius: 2px;
  overflow: hidden;
}

.rotate-bar {
  height: 100%;
  width: 0;
  background: var(--bs-primary-bg);
}

/* Meal plan preview and correction: day tables scroll inside the page so the sticky header stays visible. */
.meal-days {
  max-height: 70vh;
  overflow-y: auto;
}

.meal-days tr.weekend > * {
  background-color: var(--bs-bg-2);
}

.meal-input {
  width: 4.5em;
}

/* PV dashboard: generation (yellow, like the chart) and the house's consumption. */
.bg-pv {
  background-color: var(--bs-warning-bg);
}

.bg-load {
  background-color: var(--bs-gray-500);
}
