.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;
  height: auto;
}

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

.Dashboard.Dashboard--fullscreen .Header-title-description {
  display: none;
}

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

.ab-page .Dashboard.Dashboard--night {
  background-color: var(--color-ab-bg-dark);
}

.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-mod(var(--color-text-white) alpha(-14%));
  transition: color 1s linear;
}

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

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

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

.Dashboard.Dashboard--night .bg-light {
  background-color: var(--color-bg-black);
}

.Dashboard.Dashboard--night .bg-medium {
  background-color: #596269;
}

.Dashboard.Dashboard--night .text-dark {
  color: var(--color-bg-light);
}

.Dashboard.Dashboard--night .border-top,
.Dashboard.Dashboard--night .border-left,
.Dashboard.Dashboard--night .border-bottom,
.Dashboard.Dashboard--night .border-right {
  border-color: var(--color-bg-dark);
}

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

.Dash--editing {
  margin-top: 1.5em;
}

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

.DashCard .Card {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.Dash--editing .DashCard .Card {
  transition: border 0.3s, background-color 0.3s;
}

.Dash--editing .Card-title:first-of-type {
  margin-top: 0.5rem;
}

.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);
}

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

.DashCard .card-real-time {
  border: 1px solid red;
}

@media (prefers-reduced-motion) {
  /* short duration (instead of none) to still trigger transition events */
  .DashCard {
    transition-duration: 10ms !important;
  }
}

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

.Dash--editing .DashCard.react-draggable-dragging,
.Dash--editing .DashCard.react-resizable-resizing {
  z-index: 3;
}

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

.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 {
  cursor: move;
}

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

  /* overwrites the style coming from react-grid-layout */
  cursor: nwse-resize !important;
  background: none; /* hide default RGL's resize handle */
}

.Dash--editing .DashCard .react-resizable-handle:after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  bottom: 6px;
  right: 6px;
  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.react-draggable-dragging .react-resizable-handle:after,
.Dash--editing
  .DashCard.react-resizable-resizing
  .react-resizable-handle:after {
  opacity: 0.01;
}

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

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

.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;
  }
  /* keep the single row text cards to avoid overflow with a scroll bar */
  .Dashboard.Dashboard--fullscreen .Text--single-row {
    font-size: 0.85em;
  }
  .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;
  }
  /* improve label contrast */
  .dc-chart .axis .tick text,
  .dc-chart .x-axis-label,
  .dc-chart .y-axis-label {
    fill: var(--color-text-dark);
  }
}

@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-mod(var(--color-bg-white) alpha(-86%));
}

.Dashboard--night .text-card-markdown code {
  background-color: color-mod(var(--color-bg-white) alpha(-86%));
}

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

.ScalarValue {
  font-weight: 600;
  white-space: pre;
}

.SmartWrapper {
  font-size: 1.4em;
}

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

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

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

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

/*
 * Override d3 styles so the chart axis labels are selectable. See issue #17613
 */
.dc-chart g.axis g.tick text {
  pointer-events: all;
  user-select: auto;
}

@media screen and (--footprint-breakpoint-max-mobile) {
  .CardsContainer,
  .TagWidgetContainer {
    padding: 0 10px !important;
  }
}

#html2canvas-Dashboard {
  overflow-y: auto;
  overflow-x: hidden;
}
