/*
 * Canonical dashboard headline treatment.
 *
 * Dashboard templates historically carried their own copies of these rules,
 * which allowed the title size and header geometry to drift.  Keep this file
 * authoritative and aligned with the Chile Rates Monitor.
 */
.dash-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1800px !important;
  margin: -38px auto 5rem !important;
  padding: 0 2rem 1rem !important;
}

/* Keep the update row from moving the headline between templates. */
.last-update {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1800px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
  color: #000 !important;
  background: #fff !important;
  font-family: Inter, "Segoe UI", sans-serif !important;
  font-size: 1.15rem !important;
  line-height: normal !important;
  letter-spacing: 0.3px !important;
  text-align: right !important;
}

.dash-title h1 {
  margin: 0 !important;
  padding-left: 14px !important;
  border-left: 5px solid #0070c0 !important;
  color: #0b132b !important;
  font-family: Inter, "Segoe UI", sans-serif !important;
  font-size: 2.4rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

.dash-sub {
  margin: 0.25rem 0 0 !important;
  color: #000 !important;
  font-family: Inter, "Segoe UI", sans-serif !important;
  font-size: 1.2rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

/*
 * Older dashboards use between one and five BR elements after the header.
 * The fixed header margin above replaces those template-specific spacers.
 */
.dash-header + br,
.dash-header + br + br,
.dash-header + br + br + br,
.dash-header + br + br + br + br,
.dash-header + br + br + br + br + br,
.dash-header + br + br + br + br + br + br {
  display: none !important;
}

/* The first section title must start on the same content line everywhere. */
.dashboard-grid-vertical,
.dashboard-grid-horizontal {
  box-sizing: content-box !important;
  width: auto !important;
  max-width: 1800px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  padding-top: 0 !important;
}

.dashboard-grid-vertical .plot-title,
.dashboard-grid-horizontal .plot-title {
  margin-top: 0 !important;
}

@media (max-width: 900px) {
  .dash-header {
    margin-top: -196px !important;
    margin-bottom: 5rem !important;
  }

  .last-update,
  .dash-header,
  .dashboard-grid-vertical,
  .dashboard-grid-horizontal {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}
