.DashboardHeader {
  background-color: white;
  border-bottom: var(--border-size) var(--border-style) var(--color-border);
}

.Dash-wrapper {
  width: 100%;
}

@media screen and (--breakpoint-min-sm) {
  .Dash-wrapper {
    max-width: var(--sm-width);
  }
}

@media screen and (--breakpoint-min-md) {
  .Dash-wrapper {
    max-width: var(--md-width);
  }
}

@media screen and (--breakpoint-min-lg) {
  .Dash-wrapper {
    max-width: var(--lg-width);
  }
}

/* Fullscreen mode */
.Dashboard.Dashboard--fullscreen {
  min-height: 100vh;
}

.Dashboard.Dashboard--fullscreen .Header-button {
  color: var(--color-text-light);
}

.Dashboard.Dashboard--fullscreen .DashboardHeader {
  background-color: transparent;
  border: none;
}
.Dashboard.Dashboard--fullscreen .Header-title-description {
  display: none;
}

/* Night mode */
.Dashboard.Dashboard--night {
  background-color: var(--color-bg-black);
}

.Dashboard.Dashboard--night .DashboardHeader {
  color: var(--color-text-white);
}

.Dashboard.Dashboard--night .Card {
  color: var(--color-text-white);
}

.Dashboard.Dashboard--night .Header-button {
  color: var(--color-text-medium);
}

.Dashboard.Dashboard--fullscreen .fullscreen-normal-text {
  color: var(--color-text-dark);
  transition: color 1s linear;
}

.Dashboard.Dashboard--night.Dashboard--fullscreen .fullscreen-night-text {
  color: color(var(--color-text-white) alpha(-14%));
  transition: color 1s linear;
}

.Dashboard.Dashboard--night .DashCard .Card svg text {
  fill: color(var(--color-text-white) alpha(-14%)) !important;
}

.Dashboard.Dashboard--night .DashCard .Card {
  background-color: var(--night-mode-card);
  border-color: var(--night-mode-card);
}

.Dashboard.Dashboard--night .enable-dots-onhover .dc-tooltip circle.dot:hover,
.Dashboard.Dashboard--night .enable-dots .dc-tooltip circle.dot {
  fill: currentColor;
}

/* Night mode transition */
.Dashboard.Dashboard--fullscreen,
.Dashboard.Dashboard--fullscreen .DashCard .Card {
  transition: background-color 1s linear, border 1s linear;
}

.DashboardGrid {
  margin-top: 1em;
}

.DashCard {
  position: relative;
  z-index: 1;
}

.DashCard .Card {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  overflow: hidden;
  background-color: white;
  border: 1px solid var(--color-border);
}

.DashCard .Card.Card--slow {
  border-color: var(--color-accent4);
}

.Dash--editing .DashCard .Card {
  pointer-events: none;
  transition: border 0.3s, background-color 0.3s;
}
.Dash--editing.Dash--editingParameter .DashCard .Card {
  pointer-events: auto;
}

@keyframes fade-out-yellow {
  from {
    background-color: var(--color-bg-white);
  }
  to {
    background-color: var(--color-bg-white);
  }
}

.Dash--editing .DashCard .Card.Card--recent {
  animation-duration: 30s;
  animation-name: fade-out-yellow;
}

.Dash--editing .DashCard:hover .Card .Card-heading {
  z-index: 2;
}

/* Google Maps widgets */
.DashCard .gm-style-mtc,
.DashCard .gm-bundled-control,
.DashCard .PinMapUpdateButton,
.leaflet-container .leaflet-control-container {
  opacity: 0.01;
  transition: opacity 0.3s linear;
}
.DashCard:hover .gm-style-mtc,
.DashCard:hover .gm-bundled-control,
.DashCard:hover .PinMapUpdateButton,
.leaflet-container:hover .leaflet-control-container {
  opacity: 1;
}

.Dash--editing .PinMap {
  /* allow map to pan. need to stopPropagation in PinMap to prevent weird dragging interaction */
  pointer-events: all;
}

.PinMapUpdateButton--disabled {
  pointer-events: none;
  color: var(--color-text-light);
}

.Dash--editing .DashCard .Card {
  user-select: none;
}

.DashCard .Card {
  box-shadow: 0px 1px 3px var(--color-shadow);
}

.Dash--editing .DashCard.dragging .Card {
  box-shadow: 3px 3px 8px var(--color-shadow);
}

.Dash--editing .DashCard.dragging,
.Dash--editing .DashCard.resizing {
  z-index: 2;
}

.Dash--editing .DashCard.dragging .Card,
.Dash--editing .DashCard.resizing .Card {
  background-color: var(--color-bg-medium) !important;
  border: 1px solid var(--color-brand);
}

.DashCard .DashCard-actions {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s linear;
}

.DashCard .DashCard-actions-persistent {
  pointer-events: all;
}

.Dash--editing .DashCard:hover .DashCard-actions {
  height: initial;
  opacity: 1;
  pointer-events: all;
}

.Dash--editing .DashCard .Visualization-slow-spinner {
  position: absolute;
  right: -2px;
  top: -2px;
}
.Dash--editing .DashCard:hover .Visualization-slow-spinner {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.Dash--editing .DashCard.dragging .DashCard-actions,
.Dash--editing .DashCard.resizing .DashCard-actions {
  opacity: 0;
  transition: opacity 0.3s linear;
}

.Dash--editing .DashCard {
  transition: transform 0.3s;
}

.Dash--editing .DashCard.dragging,
.Dash--editing .DashCard.resizing {
  transition: transform 0s;
}

.Dash--editing .DashCard {
  cursor: move;
}

.Dash--editing .DashCard .react-resizable-handle {
  position: absolute;
  width: 40px;
  height: 40px;
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
  z-index: 1; /* ensure the handle is above the card contents */
}

.Dash--editing .DashCard .react-resizable-handle:after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  bottom: 10px;
  right: 10px;
  border-bottom: 2px solid var(--color-border);
  border-right: 2px solid var(--color-border);
  border-bottom-right-radius: 2px;
  transition: opacity 0.2s;
  opacity: 0.01;
}

.Dash--editing .DashCard .react-resizable-handle:hover:after {
  border-color: var(--color-border);
}

.Dash--editing .DashCard:hover .react-resizable-handle:after {
  opacity: 1;
}

.Dash--editing .DashCard.dragging .react-resizable-handle:after,
.Dash--editing .DashCard.resizing .react-resizable-handle:after {
  opacity: 0.01;
}

.Dash--editing .react-grid-placeholder {
  z-index: 0;
  background-color: var(--color-bg-light);
  transition: all 0.15s linear;
}

.Dash--editing .Card-title {
  pointer-events: none;
}

/* ensure action buttons do not respond to events when dragging */
.Dash--editing.Dash--dragging .DashCard-actions {
  pointer-events: none !important;
}

.Modal.AddSeriesModal {
  height: 80%;
  max-height: 600px;
  width: 80%;
  max-width: 1024px;
}

/*

  fullscreen text size modifications

*/

/*
  increase the base font size in fullscreen mode to bump things up to
  accomodate for viewing distance on TVs etc
*/
@media screen and (min-width: 1280px) {
  .Dashboard.Dashboard--fullscreen {
    font-size: 1.2em;
  }
  /* keep the dashboard header title from being overwhelmingly large */
  .Dashboard.Dashboard--fullscreen .Header-title-name {
    font-size: 1em;
  }

  .Dashboard.Dashboard--fullscreen .fullscreen-text-small .LegendItem {
    font-size: 1em;
  }
}

@media screen and (min-width: 1540px) {
  .Dashboard.Dashboard--fullscreen {
    font-size: 1.4em;
  }
}

/* what for to print the dashboards */
@media print {
  header,
  nav {
    display: none;
  }
  .DashCard .Card {
    box-shadow: none;
    border-color: var(--color-border);
  }
  /* improve label contrast */
  .dc-chart .axis .tick text,
  .dc-chart .x-axis-label,
  .dc-chart .y-axis-label {
    fill: var(--color-text-dark);
  }
}

@media print and (orientation: portrait) {
  html {
    width: 8.5in;
  }
}
@media print and (orientation: landscape) {
  html {
    width: 11in;
  }
}

@page {
  margin: 1cm;
}

/* when in night mode goal lines should be more visible */
.Dashboard--night .goal .line,
.Dashboard--night .trend .line {
  stroke: white;
}

/* when in night mode code snippets should have a more readable background-color */
.Dashboard--night pre code {
  background-color: color(var(--color-bg-white) alpha(-86%));
}

.Dashboard--night text.value-label-outline {
  stroke: var(--night-mode-card);
}

.Dashboard text.value-label,
.Dashboard text.value-label-outline,
.Dashboard text.value-label-white,
.Dashboard .LineAreaBarChart .dc-chart .axis text {
  font-size: 12px;
}

.ScalarValue {
  font-weight: 900;
  font-size: 1.8rem;
}

.SmartWrapper {
  font-size: 1.4em;
}

.Dashboard .SmartWrapper {
  position: relative;
  font-size: inherit;
}

.AutomaticDashboard.AutomaticDashboard--withSidebar #SmartScalar-PreviousValue {
  display: none !important;
}

@media screen and (min-width: 1280px) {
  .ScalarValue {
    font-size: 2.2rem;
  }
  .AutomaticDashboard.AutomaticDashboard--withSidebar
    #SmartScalar-PreviousValue {
    display: none;
  }
}

@media screen and (min-width: 1540px) {
  .ScalarValue {
    font-size: 2.8rem;
  }
  .AutomaticDashboard.AutomaticDashboard--withSidebar
    #SmartScalar-PreviousValue {
    display: inherit;
  }
}
