/*
 * Situationsleiste (Statusleiste) oben auf der Karte.
 * Layout: [Meldungen] [Box1][Box2][Uhr-Zeile1]
 *                   [Box3][Box4][Uhr-Zeile2]
 */

.lk-status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  z-index: 5000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: #1b2635;
  border-bottom: 3px solid #0074d9;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  color: #f2f5f9;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

.lk-status-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lk-status-group--left {
  flex-shrink: 0;
}

.lk-status-group--right {
  margin-left: auto;
  gap: 8px;
}

.lk-status-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.lk-status-slot i {
  color: #5aa9ff;
  font-size: 20px;
}

/* ==========================================================================
   Counter-Boxen: Meldungen (grün/gelb/rot) und Stände
   ========================================================================== */

.lk-status-counter {
  width: 80px;
  height: 80px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  gap: 4px;
  padding: 0;
  box-sizing: border-box;
}

.lk-status-counter--messages,
.lk-status-counter--stands {
  grid-template-rows: 26px 1fr;
}

.lk-status-counter--messages > i,
.lk-status-counter--stands > i {
  align-self: end;
  font-size: 18px;
}

.lk-status-counter__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  align-self: start;
}

.lk-status-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.lk-status-dot::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lk-status-dot--green::before {
  background: #2e8b57;
  box-shadow: 0 0 4px rgba(46, 139, 87, 0.7);
}

.lk-status-dot--yellow::before {
  background: #f0ad4e;
  box-shadow: 0 0 4px rgba(240, 173, 78, 0.7);
}

.lk-status-dot--red::before {
  background: #d9534f;
  box-shadow: 0 0 4px rgba(217, 83, 79, 0.7);
}

/* ==========================================================================
   Rechter Bereich: fixes 2x2-Wetter-Grid neben einem Uhr-Kasten
   ========================================================================== */

.lk-status-weather-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
}

.lk-status-weather-loading i {
  color: #5aa9ff;
  font-size: 20px;
}

/* KONRAD3D-Entfernungsskala links neben dem Wetter-Grid. */
.lk-status-konrad {
  width: 300px;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.lk-status-konrad-title {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #c3d0e0;
}

.lk-status-konrad-title i {
  color: #5aa9ff;
}

.lk-status-konrad-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #5a6a7c 0 1px, transparent 1px 20%, #5a6a7c 20% calc(20% + 1px), transparent calc(20% + 1px) 40%, #5a6a7c 40% calc(40% + 1px), transparent calc(40% + 1px) 80%, #5a6a7c 80% calc(80% + 1px), transparent calc(80% + 1px) 100%), #5a6a7c;
}

.lk-status-konrad-markers {
  position: absolute;
  inset: 0;
}

.lk-status-konrad-marker {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e53935;
  box-shadow: 0 0 5px rgba(229, 57, 53, 0.9);
  box-sizing: border-box;
  transform: translate(-50%, -50%);
}

.lk-status-konrad-marker--beyond {
  background: #ffb300;
  box-shadow: 0 0 5px rgba(255, 179, 0, 0.9);
}

.lk-status-konrad-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: #9db0c5;
  font-variant-numeric: tabular-nums;
}

.lk-status-weather-grid-inner {
  display: grid;
  grid-template-columns: repeat(2, 118px);
  grid-template-rows: repeat(2, 38px);
  gap: 4px;
}

.lk-status-weather-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 118px;
  height: 38px;
  padding: 0 8px;
  box-sizing: border-box;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 15px;
  white-space: nowrap;
}

.lk-status-weather-box i {
  font-size: 14px;
  color: #5aa9ff;
}

.lk-status-weather-warn i {
  color: currentColor;
}

.lk-status-weather-box span {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lk-status-weather-box:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lk-status-clock {
  display: flex;
  align-items: center;
  height: 80px;
  box-sizing: border-box;
}

.lk-status-clock-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.3;
}

.lk-status-clock-time {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.lk-status-clock-date {
  font-size: 13px;
  font-weight: 400;
  color: #c3d0e0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Warn-Farbstatus */
.lk-status-weather-box.lk-warn--extreme {
  background: rgba(180, 30, 30, 0.45);
  color: #ff6b6b;
}

.lk-status-weather-box.lk-warn--extreme i {
  color: #ff6b6b;
}

.lk-status-weather-box.lk-warn--severe {
  background: rgba(200, 80, 30, 0.4);
  color: #ffaa66;
}

.lk-status-weather-box.lk-warn--severe i {
  color: #ffaa66;
}

.lk-status-weather-box.lk-warn--moderate {
  background: rgba(200, 160, 30, 0.35);
  color: #ffd066;
}

.lk-status-weather-box.lk-warn--moderate i {
  color: #ffd066;
}

.lk-status-weather-box.lk-warn--minor {
  background: rgba(60, 140, 60, 0.35);
  color: #88cc88;
}

.lk-status-weather-box.lk-warn--minor i {
  color: #88cc88;
}

.lk-status-weather-box.lk-warn--unknown {
  background: rgba(120, 120, 120, 0.3);
  color: #999;
}

.lk-status-weather-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
}

.lk-status-weather-error i {
  color: #666;
  font-size: 18px;
}

.lk-status-slot--empty {
  display: none;
}

/* ==========================================================================
   Warnungs-Popover
   ========================================================================== */

.lk-status-warn-popover {
  position: fixed;
  background: #1e2a3a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 420px;
  max-height: 350px;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: #f2f5f9;
}

.lk-warn-popover-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.lk-warn-popover-header i {
  color: #ffd066;
}

.lk-warn-popover-list {
  overflow-y: auto;
  max-height: 290px;
}

.lk-warn-popover-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lk-warn-popover-item:last-child {
  border-bottom: none;
}

.lk-warn-popover-item.lk-warn--extreme {
  border-left: 3px solid #e63946;
}

.lk-warn-popover-item.lk-warn--severe {
  border-left: 3px solid #f77f00;
}

.lk-warn-popover-item.lk-warn--moderate {
  border-left: 3px solid #fcbf49;
}

.lk-warn-popover-item.lk-warn--minor {
  border-left: 3px solid #52b788;
}

.lk-warn-item-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}

.lk-warn-item-meta {
  font-size: 12px;
  color: #8aa4c0;
  margin-bottom: 4px;
}

.lk-warn-item-desc {
  font-size: 13px;
  color: #c3d0e0;
  line-height: 1.35;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .lk-status-weather-box {
    padding: 0 8px;
    font-size: 13px;
  }

  .lk-status-weather-box i {
    font-size: 12px;
  }

  .lk-status-clock-time {
    font-size: 16px;
  }

  .lk-status-clock-date {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .lk-status-bar {
    height: 100px;
    padding: 0 8px;
    gap: 6px;
    font-size: 14px;
  }

  .lk-status-slot {
    padding: 6px 10px;
    gap: 6px;
  }

  .lk-status-weather-box {
    padding: 0 6px;
    font-size: 11px;
    gap: 3px;
  }

  .lk-status-weather-box i {
    font-size: 10px;
  }

  .lk-status-clock-cell {
    padding: 0 8px;
  }

  .lk-status-clock-time {
    font-size: 13px;
  }

  .lk-status-clock-date {
    font-size: 9px;
  }

  .leaflet-top {
    top: 100px !important;
  }

  #sidebar {
    top: 110px !important;
  }
}

/*
 * Die Leiste liegt mit hohem z-index ueber den obersten ~34px der Karte.
 */
.leaflet-top {
  top: 140px !important;
}

#sidebar {
  top: 150px !important;
}
