/* Current-generation encoding and compact horizontal site metrics. */
.energy-dashboard-v3-energy-main > strong.energy-generation-legacy-hidden {
  display: none !important;
}

.energy-dashboard-v3-energy-main > strong[data-month-generation-current] {
  display: block;
  font-family: "Oswald", sans-serif;
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.025em;
  white-space: nowrap;
}

/* Keep the new desktop pulse canvas inert on smaller screens; the existing mobile current remains in charge there. */
.site-energy-network-canvas-v7 {
  display: none !important;
}

/* The JS groups the two metrics for desktop. display:contents preserves the pre-existing mobile layout. */
.sidebar .site-energy-card .site-energy-primary-row {
  display: contents;
}
.sidebar .site-energy-card .site-energy-primary-label > span + span::before {
  content: " ";
}

@media (min-width: 981px) {
  .site-energy-network-canvas-v6 {
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .site-energy-network-canvas-v7 {
    display: block !important;
    position: absolute;
    z-index: 9;
    top: 0;
    left: 0;
    pointer-events: none;
  }

  .sidebar .site-row.site-energy-card {
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 7px;
    row-gap: 2px;
    padding: 7px 8px 8px;
  }

  .sidebar .site-energy-card .site-logo {
    width: 25px;
    height: 25px;
    margin-top: 0;
  }

  .sidebar .site-energy-card .site-name {
    font-size: 12.4px;
    line-height: 1.12;
  }

  .sidebar .site-energy-card .site-energy-details {
    gap: 4px;
    margin-top: 1px;
  }

  .sidebar .site-energy-card .site-energy-primary-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .sidebar .site-energy-card .site-energy-primary-row .site-energy-primary-metric {
    display: grid;
    grid-template-columns: minmax(52px, .78fr) minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 6px !important;
    min-width: 0;
    min-height: 43px;
    padding: 1px 7px 1px 3px;
  }

  .sidebar .site-energy-card .site-energy-primary-row .site-energy-primary-metric + .site-energy-primary-metric {
    border-left: 1px solid rgba(0,32,92,.13);
    padding-left: 9px;
    padding-right: 2px;
  }

  .sidebar .site-energy-card .site-energy-primary-label {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: center !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    width: auto !important;
    min-width: 0;
    color: #647083;
    font-size: 8.5px !important;
    font-weight: 850;
    line-height: .98;
    letter-spacing: .035em;
    text-align: left !important;
    text-transform: uppercase;
    white-space: normal !important;
  }

  .sidebar .site-energy-card .site-energy-primary-label::after {
    content: none !important;
  }

  .sidebar .site-energy-card .site-energy-primary-label > span {
    display: block;
    white-space: nowrap;
  }
  .sidebar .site-energy-card .site-energy-primary-label > span + span::before {
    content: none;
  }

  .sidebar .site-energy-card .site-energy-primary-row .site-energy-primary-metric > strong {
    justify-self: center !important;
    align-self: center !important;
    color: #173f77;
    font-family: "Oswald", sans-serif;
    font-size: 27px;
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.025em;
    text-align: center !important;
    white-space: nowrap;
  }

  .sidebar .site-energy-card .site-energy-primary-row .is-generation > strong {
    font-size: 21px;
    letter-spacing: -.02em;
  }

  .sidebar .site-energy-card .site-energy-powering {
    margin-top: 1px;
    padding-top: 8px;
  }

  .sidebar .site-energy-card .site-energy-powering-label {
    font-size: 8.5px;
  }

  .sidebar .site-energy-card .site-energy-flow-cell strong {
    font-size: 13.2px;
  }

  .sidebar .site-energy-card .site-vpp-participant {
    top: 7px;
    right: 7px;
    min-height: 16px;
  }
}
