:root {
  --background-color: #F0F0F0;
  --background-color-secondary: #E0E0E0;
  --text-color: #000;
  --accent-color: #64C5F1;
  --accent-color-favorite: #FFD700;

  --red: #C00;
  --red-light: #F33;
  --violet: #B461B4;
  --blue: #00F;

  --temp-positive: var(--red);
  --temp-zero: var(--violet);
  --temp-negative: var(--blue);
  --temp-tendency-up: var(--red);
  --temp-tendency-down: var(--blue);
  --pressure-tendency-positive: var(--blue);
  --pressure-tendency-negative: var(--red);
  --pressure-tendency-zero: var(--text-color);
  --rain-warn: var(--red);
  --wind-speed-peak: var(--red-light);

  --entry-size: 270px;
  --entry-height-temperature-only: 135px;
  --entry-margin: 4px;

  --default-font-size: 13px;
  --name-font-size: 20px;
  --elevation-font-size: 18px;
  --temperature-font-size: 32px;
}

.dark {
  --background-color: #111;
  --background-color-secondary: #333;
  --text-color: #E5E5E5;
  --accent-color: #3C7793;
  --accent-color-favorite: #FFD700;

  --red: #F44;
  --red-light: #F88;
  --violet: #EE82EE;
  --blue: #66F;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  width: 100%;

  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;

  transition: all .2s ease;
  overflow-y: scroll;

  text-size-adjust: none;
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: none;
}

input, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

#app {
  width: 100%;
  display: none;
}

#app.v {
  display: block;
}

.loading {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
}

.spinner {
  display: inline-block;
  height: 1.1em;
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(359.99deg);
  }
}

.lastupdate {
  position: absolute;
  top: 4px;
  left: 12px;
  font-size: 11px;
}

.options {
  position: absolute;
  top: 4px;
  right: 4px;

  display: flex;
  flex-flow: row nowrap;
}

.options button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0 8px;
}

.container {
  padding: 1.25em 1em;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  /* grid-template-columns: repeat(auto-fit, minmax(calc(var(--entry-size) + var(--entry-margin) * 2), 1fr)); */
}

.wind-only .entry:not(.wind) {
  display: none;
}

.normal-only .entry.wind {
  display: none;
}

.entry {
  width: var(--entry-size);
  height: var(--entry-size);
  margin: var(--entry-margin);

  border: 3px solid var(--accent-color);
  border-radius: 6px;

  font-size: var(--default-font-size);

  position: relative;

  user-select: none;
  transition: all .2s ease;
}

.entry.favorite {
  border-color: var(--accent-color-favorite);
}

.entry.temperatureOnly {
  height: var(--entry-height-temperature-only);
}

.name {
  text-align: center;
  font-size: var(--name-font-size);

  width: 99%;
  margin: 0 auto;

  white-space: nowrap;
  overflow-x: hidden;
  text-overflow: ellipsis;

  padding-top: 4px;
}

.elevation {
  position: absolute;
  top: 14%;
  right: 30px;
  font-size: var(--elevation-font-size);
}

.temperatureOnly .elevation {
  top: 28%;
}

.temp {
  position: absolute;
  top: 29px;
  width: 65%;
  font-size: var(--temperature-font-size);
  text-align: center;
  font-weight: bold;
}

.temp span {
  text-shadow: 0 0 2px var(--text-color);
}

.dark .temp span {
  text-shadow: none;
}

.temp.up::before {
  content: "▲ ";
  color: var(--temp-positive) !important;
}

.temp.down::before {
  content: "▼ ";
  color: var(--temp-negative) !important;
}

.temp.blink::before {
  animation: blink 3s linear infinite;
}

.temp.blink.fast::before {
  animation-duration: 1.2s;
}

@keyframes blink {
  from { opacity: 1; }
  50% { opacity: .2; }
  to { opacity: 1; }
}

.temp-minmax-today {
  position: absolute;
  top: 28%;
  text-align: right;
  width: 50%;
}

.temperatureOnly .temp-minmax-today {
  top: 56%;
}

.temp-minmax-12h {
  position: absolute;
  top: 35%;
  text-align: right;
  width: 50%;
}

.temperatureOnly .temp-minmax-12h {
  top: 70%;
}

.pressure {
  position: absolute;
  top: 28%;
  left: 51%;
  text-align: center;
  width: 49%;
}

.temperatureOnly .pressure {
  top: 56%;
}

.pressure-3h {
  position: absolute;
  top: 35%;
  left: 51%;
  text-align: center;
  width: 49%;
}

.temperatureOnly .pressure-3h {
  top: 70%;
}

.pressure-3h .pos {
  color: var(--pressure-tendency-positive);
}

.pressure-3h .neg {
  color: var(--pressure-tendency-negative);
}

.pressure-3h .zero {
  color: var(--pressure-tendency-zero);
}

.pressure-3h .up::before {
  content: "▲ ";
  color: var(--pressure-tendency-positive);
}

.pressure-3h .down::before {
  content: "▼ ";
  color: var(--pressure-tendency-negative);
}

.pressure-3h .blink::before {
  animation: blink 3s linear infinite;
}

.pressure-3h .blink.fast::before {
  animation-duration: 1.2s;
}

.title {
  font-weight: bold;
}

.humidex {
  position: absolute;
  top: 46%;
  left: 66.67%;
  width: 33.33%;
  text-align: center;
}

.temperaturetendency {
  position: absolute;
  top: 46%;
  left: 0;
  width: 33.33%;
  text-align: center;
}

.windchill {
  position: absolute;
  top: 46%;
  left: 33.33%;
  width: 33.33%;
  text-align: center;
}

.humidity {
  position: absolute;
  top: 62%;
  left: 33.33%;
  width: 33.33%;
  text-align: center;
}

.irradiation {
  position: absolute;
  top: 62%;
  left: 0%;
  width: 33.33%;
  text-align: center;
}

.dewpoint {
  position: absolute;
  top: 62%;
  left: 66.67%;
  width: 33.33%;
  text-align: center;
}

.rain-today {
  position: absolute;
  top: 78%;
  left: 0;
  width: 33.33%;
  text-align: center;
}

.rain-1h {
  position: absolute;
  top: 78%;
  left: 33.33%;
  width: 33.33%;
  text-align: center;
}

.rain-24h {
  position: absolute;
  top: 78%;
  left: 66.67%;
  width: 33.33%;
  text-align: center;
}

.warn {
  color: var(--rain-warn);
  font-weight: bold;
}

.warn.blink {
  animation: blink 3s linear infinite;
}

.warn.blink.fast {
  animation-duration: 1.2s;
}

.wind-elevation {
  position: absolute;
  top: 13%;
  right: 8px;
  font-size: var(--elevation-font-size);
}

.wind-rose {
  display: block;
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 176px;
  height: 176px;
}

.wind-rose-tick-bg {
  fill: var(--background-color);
}

.wind-rose-tick-fg {
  fill: var(--text-color);
}

.wind-rose-arc {
  fill: var(--text-color);
  opacity: .35;
}

.wind-rose-avg {
  fill: var(--text-color);
}

.wind-rose-peak {
  fill: var(--red);
}

.wind-rose-center-dot {
  fill: var(--text-color);
}

.wind-bft {
  position: absolute;
  top: 14%;
  left: 16px;
}

.wind-speed {
  position: absolute;
  top: 50%;
  left: 25%;
  width: 50%;
  text-align: center;
}

.wind-speed.up {
  top: 24%;
}

.wind-avg {
  font-weight: bold;
}

.wind-peak {
  text-align: center;
  /* color: var(--wind-speed-peak); */
}

.wind-direction {
  position: absolute;
  top: 79.5%;
  left: 25%;
  width: 50%;
  text-align: center;

  font-size: 150%;
}

.wind-peak-12h {
  position: absolute;
  top: 78%;
  left: 5%;
  width: 25%;
  text-align: center;
}

.wind-peak-24h {
  position: absolute;
  top: 78%;
  right: 5%;
  width: 25%;
  text-align: center;
}

.footer {
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
}

.ghost {
  background-color: var(--background-color);
  opacity: 0.5;
}

.flip-list-move {
  transition: transform 0.5s;
}

.no-move {
  transition: transform 0s;
}

.page-footer {
  width: 100%;
  text-align: center;
  font-size: 13px;
  margin-bottom: 1.2em;
}

.page-footer a {
  text-decoration: underline;
}

a {
  color: var(--text-color);
  text-decoration: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background-color: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 300px;

  background-color: var(--background-color);
  color: var(--text-color);

  border-radius: 8px;
  padding: .8em;

  transition: all .2s ease;
}

.modal h2 {
  font-size: 120%;
  text-align: center;
  margin-bottom: 1em;
}

.modal label {
  display: block;
  margin-bottom: .67em;
  text-align: center;
}

.modal button, .modal select, .modal input {
  transition: all .2s ease;
}

.modal .submit {
  background-color: var(--accent-color);
  display: block;
  width: 100%;
  margin-top: 1.25em;
  padding: .67em;
}

.modal .reset-custom {
  font-size: 80%;
}

button, input, select {
  background-color: var(--background-color-secondary);
  border: 0;
  color: var(--text-color);
  border-radius: 3px;
  padding: 4px 8px;
}

button {
  cursor: pointer;
}

button:hover, input:hover, select:hover {
  filter: brightness(.8);
}

.temperatureOnly {

}
