/* ================== WEATHER.CSS ================== */

.header-weather {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 50;
  user-select: none;
  pointer-events: none;

  width: 455px;
  max-width: calc(100vw - 28px);
}

.weather-card {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  color: #fff;
  background: rgba(24, 39, 58, 0.62);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.weather-place {
  font-size: 0.82rem;
  font-weight: 100;
  line-height: 1.2;
  margin-bottom: 6px;
  white-space: nowrap;
  text-align: center;
}

.weather-place span {
  position: relative;
  left: 50px;
}

.weather-main {
  display: grid;
  grid-template-columns: 1.35fr 1px 0.9fr 1px 1.35fr;
  align-items: center;
  column-gap: 12px;
  width: 100%;
}

.weather-temp,
.weather-wind,
.weather-sunset {
  min-width: 0;
  text-align: center;
}

.weather-temp {
  margin-top: -20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1.05;
  overflow: hidden;
}

.weather-temp > div:first-child {
  font-size: 1.65rem;
  white-space: nowrap;
}

.weather-status {
  margin-top: -5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.2;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

.weather-status span {
  position: relative;
  top: -5px;
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.weather-wind,
.weather-sunset {
  margin-top: -5px;
  font-size: 0.90rem;
  font-weight: 500;
  line-height: 1.55;
  white-space: nowrap;
  overflow: hidden;
}

.weather-wind > div,
.weather-sunset > div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
}

.weather-sunset div:last-child {
  font-weight: 500;
  opacity: 0.95;
}

.weather-divider {
  width: 1px;
  height: 58px;
  background: rgba(255, 255, 255, 0.24);
}

.weather-img-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
  margin-right: 5px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.45));
}

.weather-current-icon {
  width: 42px !important;
  height: 42px !important;
  margin-right: 0;
}

.weather-wind-icon,
.weather-sunset-icon {
  position: relative;
  top: -1px;
}

/* ---------------- SMARTPHONE HOCHFORMAT ---------------- */

@media (max-width: 768px) and (orientation: portrait) {
  .header-weather {
    top: 0;
    right: 0;
    width: 78px;
    max-width: 78px;
    z-index: 60;
  }

  .weather-card {
    padding: 4px 5px;
    border-radius: 0 0 0 10px;
  }

  .weather-place {
    font-size: 0;
    margin-bottom: 3px;
  }

  .weather-place::before {
    content: "Flugplatz Rieplos";
    font-size: 0.5rem;
  }

  .weather-place span {
    left: 0;
  }

  .weather-main {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .weather-divider {
    display: block;
    width: 100%;
    height: 1px;
    margin: 2px 0;
    background: rgba(255,255,255,0.22);
  }

  .weather-temp {
    margin-top: 0;
  }

  .weather-temp > div:first-child {
    font-size: 0.78rem;
  }

  .weather-status {
    margin-top: -3px;
    font-size: 0.48rem;
  }

  .weather-status span {
    top: -3px;
  }

  .weather-wind,
  .weather-sunset {
    margin-top: 0;
    font-size: 0.48rem;
    line-height: 1.18;
  }

  .weather-current-icon {
    width: 16px !important;
    height: 16px !important;
  }

  .weather-img-icon {
    width: 11px;
    height: 11px;
    margin-right: 2px;
  }
}

/* ---------------- SMARTPHONE QUERFORMAT ---------------- */

@media (max-width: 932px) and (orientation: landscape) {
  .header-weather {
    top: 8px;
    right: 8px;
    width: 235px;
    max-width: 235px;
    z-index: 60;
  }

  .weather-card {
    padding: 5px 7px;
    border-radius: 10px;
  }

  .weather-place {
    font-size: 0.48rem;
    margin-bottom: 2px;
  }

  .weather-place span {
    left: 10px;
  }

  .weather-main {
    grid-template-columns: 1.15fr 1px 0.8fr 1px 1.15fr;
    column-gap: 5px;
  }

  .weather-divider {
    display: block;
    height: 30px;
  }

  .weather-temp {
    margin-top: -3px;
  }

  .weather-temp > div:first-child {
    font-size: 0.82rem;
  }

  .weather-status {
    margin-top: -3px;
    font-size: 0.42rem;
  }

  .weather-status span {
    top: -2px;
  }

  .weather-wind,
  .weather-sunset {
    margin-top: -2px;
    font-size: 0.44rem;
    line-height: 1.12;
  }

  .weather-current-icon {
    width: 17px !important;
    height: 17px !important;
  }

  .weather-img-icon {
    width: 10px;
    height: 10px;
    margin-right: 2px;
  }
}

/* ---------------- TABLET HOCHFORMAT ---------------- */

@media (min-width: 769px) and (max-width: 1180px) and (orientation: portrait) {
  .header-weather {
    top: 0;
    right: 0;
    width: 150px;
    max-width: 150px;
    z-index: 60;
  }

  .weather-card {
    padding: 10px 12px;
    border-radius: 0 0 0 16px;
  }

  .weather-place {
    font-size: 0;
    margin-bottom: 6px;
  }

  .weather-place::before {
    content: "Flugplatz Rieplos";
    font-size: 0.82rem;
  }

  .weather-place span {
    left: 0;
  }

  .weather-main {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  /* horizontale Trennlinien */
  .weather-divider {
    display: block;
    width: 100%;
    height: 1px;
    margin: 4px 0;
    background: rgba(255,255,255,0.24);
  }

  .weather-temp {
    margin-top: 0;
  }

  .weather-temp > div:first-child {
    font-size: 1.35rem;
  }

  .weather-status {
    margin-top: -2px;
    font-size: 0.74rem;
  }

  .weather-status span {
    top: -2px;
  }

  .weather-wind,
  .weather-sunset {
    margin-top: 0;
    font-size: 0.74rem;
    line-height: 1.28;
  }

  .weather-current-icon {
    width: 30px !important;
    height: 30px !important;
  }

  .weather-img-icon {
    width: 18px;
    height: 18px;
    margin-right: 4px;
  }
}

/* ---------------- TABLET QUERFORMAT ---------------- */

@media (min-width: 933px) and (max-width: 1366px) and (orientation: landscape) {
  .header-weather {
    top: 8px;
    right: 8px;
    width: 285px;
    max-width: 285px;
    z-index: 60;
  }

  .weather-card {
    padding: 5px 7px;
    border-radius: 13px;
  }

  .weather-place {
    font-size: 0.68rem;
    margin-bottom: 4px;
  }

  .weather-place span {
    left: 28px;
  }

  .weather-main {
    grid-template-columns: 1.25fr 1px 0.85fr 1px 1.25fr;
    column-gap: 8px;
  }

  .weather-divider {
    display: block;
    height: 44px;
  }

  .weather-temp {
    margin-top: -8px;
  }

  .weather-temp > div:first-child {
    font-size: 1.22rem;
  }

  .weather-status {
    margin-top: -3px;
    font-size: 0.58rem;
  }

  .weather-status span {
    top: -3px;
  }

  .weather-wind,
  .weather-sunset {
    margin-top: -3px;
    font-size: 0.64rem;
    line-height: 1.25;
  }

  .weather-current-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .weather-img-icon {
    width: 16px;
    height: 16px;
    margin-right: 3px;
  }
}