html, body {
    overflow: hidden;
}

#dashboard {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1920px;
  height: 100%;
  padding: 8px;
  max-height: 320px;
  display: flex;
  box-sizing: border-box;
  transition: opacity 0.3s ease-in-out;
  line-height: 1.4em !important;
}

.widget {
  margin: 0 5px;
  flex-grow: 1;
  font-size: 1.2em;
  box-sizing: border-box;
  padding: 10px;
  color: var(--text);
  box-shadow: var(--shadow-widget);
  border: 1px solid var(--border-control);
  background-color: var(--panel) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  flex-shrink: 1;
  min-width: 0;
}

.widget-hidden {
  display: none !important;
}

.widget-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.widget > * {
  flex-shrink: 0;
}

.widget1 {
  flex-basis: 20%;
  height: 100%;
}

.widget1,
.widget2,
.widget3,
.widget4,
.widget5 {
  border-radius: 10px;
  background-color: var(--panel) !important;
}

.widget2 {
  flex-basis: 15%;
  height: 75%;
  position: relative;
}

.widget3,
.widget4,
.widget5 {
  flex-basis: 30%;
  height: 85%;
}

.widget4,
.widget5 {
  flex-basis: 15%;
  height: 75%;
}

.widget5 {
  flex-basis: 20%;
  height: 100%;
}

.widget1 .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 4rem);
  text-align: center;
  padding: 1rem;
}

.pre-tracking-widget {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text);
  box-shadow: var(--shadow-widget);
  border: 1px solid var(--border-control);
  background-color: var(--panel) !important;
  font-size: 1em;
  box-sizing: border-box;
  padding: 10px;
  max-width: 720px;
  width: 100%;
  height: 180px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  flex-shrink: 1;
}

.pre-tracking-widget .title-2 {
  font-size: 1.2em;
}

.pre-tracking-widget .subtitle3, .pre-tracking-widget .value {
  font-size: 1.1em;
}

#final-prep {
  font-size: 1.2em;
}

.pre-tracking-widget .subtitle3 {
  font-weight: 700;
}

.pre-tracking-widget .value {
  font-weight: 200;
}

.weather-content {
  display: flex;
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
  gap: 8px;
  font-size: 1.1em;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#weather-icon {
  width: 60px;
  height: auto;
  flex-shrink: 0;
  margin-right: 0;
}

.weather-right {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-end;
}

.weather-temp {
  text-align: right;
  font-size: 1.35em;
  line-height: 1.1;
}

.weather-condition {
  font-size: 0.85em;
  opacity: 0.9;
}

.weather-feels-like {
  color: var(--weather-feels);
  font-size: 0.8em;
  margin-top: 2px;
  text-align: left;
}

.weather-feels-like span {
  color: var(--weather-feels);
  font-size: 1.05em;
}

.weather-city {
  font-size: 0.85em;
  text-align: center;
  color: var(--text-muted-7);
  margin-top: 4px;
  visibility: visible;
}

.weather-stats {
  margin-top: 6px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
}

.stats-row .subtitle2 + .subtitle2 {
  margin-left: 8px;
}

#weather-overlay-text {
  display: none;
  font-weight: bold;
  text-align: center;
}

.value.long,
.value2 {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.value.long img,
.value2 img {
  margin-right: 4px;
  flex-shrink: 0;
}

#next-city,
#last-city,
#weather-condition {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

#weather-city {
   display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.value2.short {
  flex: 0 0 auto;
  justify-content: flex-end;
  overflow: visible;
}

#last-time {
  white-space: nowrap;
}

.stats-row-prep {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
}

.distance-sentence {
  font-size: 1.5em;
  margin: 0;
}

.final-prep {
  text-align: center;
  margin: 20px;
}

.title,
.title-2 {
  font-size: 1em;
  margin: -2px;
  text-align: center;
}

.subtitle,
.subtitle2,
.subtitle3 {
  font-size: 0.8em;
  margin: 2px;
  text-align: center;
  color: var(--text);
}

.widget i {
  margin-right: 4px;
  color: var(--icon-subtle);
}

hr {
  border: none;
  border-top: 2px solid var(--border-subtle);
  margin: 5px 0;
}

#last-flag {
  width: 17px;
  height: auto;
  border-radius: 3px;
}

#last-flag,
#next-flag {
  vertical-align: middle;
}

#next-flag {
  width: 20px;
  height: auto;
  border-radius: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  text-align: center;
  padding: 5px 0;
}

.stats-grid-2 {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  text-align: center;
  padding: 5px 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#arrival-stat {
  margin-top: 5px;
}

.divider {
  width: 2px;
  background-color: var(--border-subtle);
  height: 50px;
  margin: 0 10px;
}

.grid-value {
  font-size: 1em;
  color: var(--text);
  margin-top: 5px;
}

.widget-bottom {
  min-height: 20px;
  margin-top: 10px;
}

#time {
  font-size: 1.4em;
  font-weight: bold;
}

#dashboard .widget.hidden-widget {
  display: none !important;
}
