/* Meteolab 2027 – interaktivni zemljevid razelektritev */

.ml-lightning-map-section { padding-top: 0; }

.ml-lightning-map-card {
  overflow: hidden;
  padding: 0;
}

.ml-lightning-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: #fff;
}

.ml-lightning-day-buttons {
  display: flex;
  gap: 8px;
}

.ml-lightning-day {
  min-height: 38px;
  padding: 8px 17px;
  border: 1px solid rgba(21,130,199,.24);
  border-radius: 999px;
  background: #eaf5fc;
  color: #0d5f9c;
  font: inherit;
  font-size: .84rem;
  font-weight: 800;
  cursor: pointer;
}

.ml-lightning-day:hover { border-color: #002050; }

.ml-lightning-day.is-active {
  border-color: #002050;
  background: #002050;
  color: #fff;
}

.ml-lightning-window-field {
  display: grid;
  gap: 5px;
  min-width: 160px;
}

.ml-lightning-window-field span {
  color: #475569;
  font-size: .72rem;
  font-weight: 750;
}

.ml-lightning-window-field select {
  color-scheme: light;
  min-height: 38px;
  padding: 6px 34px 6px 11px;
  border: 1px solid rgba(15,23,42,.16);
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
}

.ml-lightning-window-field option {
  background: #fff;
  color: #0f172a;
}

.ml-lightning-map-wrap {
  position: relative;
}

.ml-lightning-map {
  width: 100%;
  height: 690px;
  min-height: 520px;
  background: #e7eff6;
}

.ml-lightning-loading {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 900;
  transform: translateX(-50%);
  padding: 8px 13px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  color: #526176;
  box-shadow: 0 8px 22px rgba(15,23,42,.14);
  font-size: .78rem;
  font-weight: 750;
  pointer-events: none;
}

.ml-lightning-loading[hidden] { display: none; }

.ml-lightning-map-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 820;
  width: min(255px, calc(100% - 90px));
  padding: 10px 12px;
  border: 1px solid rgba(21,130,199,.22);
  border-radius: 11px;
  background: rgba(255,255,255,.96);
  color: #334155;
  box-shadow: 0 5px 16px rgba(15,23,42,.14);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.35;
}

.ml-lightning-map-status[hidden] { display: none; }

.ml-lightning-legend {
  border: 1px solid rgba(15,23,42,.16);
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(15,23,42,.16);
  font-size: 10px;
}

.ml-lightning-legend-desktop {
  position: absolute;
  right: 12px;
  bottom: 31px;
  z-index: 800;
  width: 118px;
  padding: 8px;
}

.ml-lightning-legend strong {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
}

.ml-lightning-legend > div {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
  white-space: nowrap;
}

.ml-lightning-legend i {
  display: inline-block;
  width: 15px;
  height: 3px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(255,255,255,.95);
}

.ml-lightning-legend-mobile { display: none; }

.ml-lightning-timeline {
  padding: 14px 17px 12px;
  border-top: 1px solid rgba(15,23,42,.08);
  background: #fff;
}

.ml-lightning-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: #475569;
  font-size: .78rem;
}

.ml-lightning-timeline-head strong {
  color: #0f172a;
  font-size: .82rem;
}

.ml-lightning-timeline input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 0;
  accent-color: #002050;
  cursor: pointer;
}

.ml-lightning-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: #64748b;
  font-size: .68rem;
}

.ml-lightning-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border-top: 1px solid rgba(15,23,42,.08);
  background: #fff;
  color: #64748b;
  font-size: .77rem;
}

.ml-lightning-foot strong,
.ml-lightning-foot span {
  display: block;
}

.ml-lightning-foot strong {
  margin-bottom: 2px;
  color: #0f172a;
  font-size: .85rem;
}

/* Leaflet */
.ml-lightning-map .leaflet-popup-content-wrapper {
  border-radius: 12px;
}

.ml-lightning-map .leaflet-popup-content {
  min-width: 240px;
  margin: 14px 16px;
}

.ml-lightning-popup h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: .96rem;
}

.ml-lightning-popup dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 10px;
  margin: 0;
  font-size: .76rem;
}

.ml-lightning-popup dt {
  color: #64748b;
  font-weight: 650;
}

.ml-lightning-popup dd {
  margin: 0;
  color: #0f172a;
  font-weight: 750;
  text-align: right;
}

.ml-lightning-location-control {
  margin-top: 10px !important;
}

.ml-lightning-location-btn {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.ml-lightning-location-btn:hover {
  background: #f1f5f9;
  color: #002050;
}

.ml-lightning-location-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ml-lightning-location-btn.is-loading svg {
  animation: ml-lightning-spin .8s linear infinite;
}

@keyframes ml-lightning-spin { to { transform: rotate(360deg); } }

@media (prefers-color-scheme: dark) {
  .ml-lightning-window-field select,
  .ml-lightning-window-field option {
    color-scheme: light;
    background: #fff;
    color: #0f172a;
  }
}

@media (max-width: 700px) {
  .ml-lightning-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 11px 12px;
  }

  .ml-lightning-day-buttons {
    width: 100%;
  }

  .ml-lightning-day {
    flex: 1;
  }

  .ml-lightning-window-field {
    width: 100%;
  }

  .ml-lightning-window-field select {
    width: 100%;
  }

  .ml-lightning-map {
    height: 64vh;
    min-height: 470px;
  }

  .ml-lightning-legend-desktop {
    display: none;
  }

  .ml-lightning-legend-mobile {
    display: block;
    padding: 7px 10px 8px;
    border: 0;
    border-top: 1px solid rgba(15,23,42,.10);
    border-radius: 0;
    box-shadow: none;
  }

  .ml-lightning-legend-mobile-items {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    align-items: center;
    gap: 4px;
  }

  .ml-lightning-legend-mobile-items > div {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    margin: 0;
    color: #64748b;
    font-size: 8px;
    text-align: center;
  }

  .ml-lightning-legend-mobile-items i {
    width: 100%;
    max-width: 52px;
    height: 4px;
  }

  .ml-lightning-timeline {
    padding: 12px 12px 10px;
  }

  .ml-lightning-timeline-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .ml-lightning-timeline input[type="range"] {
    height: 32px;
  }

  .ml-lightning-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 11px 13px;
  }

  .ml-lightning-map-status {
    top: 10px;
    right: 10px;
    width: min(220px, calc(100% - 84px));
  }
}


/* Državne meje so nad križci in imajo zelo blag svetel rob. */
.ml-lightning-map .ml-lightning-border-path {
  filter:
    drop-shadow(0 0 1px rgba(255,255,255,.95))
    drop-shadow(0 1px 1px rgba(15,23,42,.18));
  vector-effect: non-scaling-stroke;
}


/* V4: starostna legenda se ne uporablja več. */
.ml-lightning-legend,
.ml-lightning-legend-desktop,
.ml-lightning-legend-mobile {
  display: none !important;
}

/* Canvas je vezan na lasten Leaflet pane in sledi premikanju/zoomu. */
.ml-lightning-map .ml-lightning-canvas {
  position: absolute;
  pointer-events: none;
}

/* Državne meje so nad simboli razelektritev. */
.ml-lightning-map .ml-lightning-border-path {
  vector-effect: non-scaling-stroke;
  filter:
    drop-shadow(0 0 1px rgba(255,255,255,.95))
    drop-shadow(0 0 2px rgba(15,23,42,.18));
}

/* Dinamična časovna skala glede na dejansko dostopno obdobje. */
.ml-lightning-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 16px;
  margin-top: 2px;
  color: #64748b;
  font-size: .68rem;
  line-height: 1;
}

.ml-lightning-scale span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ml-lightning-timeline input[type="range"]:disabled {
  cursor: not-allowed;
  opacity: .5;
}

@media (max-width: 700px) {
  .ml-lightning-scale {
    font-size: .64rem;
  }

  .ml-lightning-scale span:nth-child(even) {
    display: none;
  }
}


/* V5 – poenotena orodna vrstica */
.ml-lightning-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px 20px;
}

.ml-lightning-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ml-lightning-toolbar-group-areas {
  justify-content: center;
}

.ml-lightning-toolbar-group-window {
  justify-content: flex-end;
}

.ml-lightning-toolbar-label {
  color: #475569;
  font-size: .76rem;
  font-weight: 750;
  white-space: nowrap;
}

.ml-lightning-area-buttons {
  display: flex;
  gap: 7px;
}

.ml-lightning-area {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid rgba(21,130,199,.24);
  border-radius: 999px;
  background: #eaf5fc;
  color: #0d5f9c;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.ml-lightning-area:hover {
  border-color: #002050;
}

.ml-lightning-area.is-active {
  border-color: #002050;
  background: #002050;
  color: #fff;
}

.ml-lightning-window-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ml-lightning-window-field > span {
  margin: 0;
  color: #475569;
  font-size: .76rem;
  font-weight: 750;
  white-space: nowrap;
}

.ml-lightning-window-field select {
  min-width: 132px;
}

/* Kazalec jasno pokaže klikljiv simbol. */
.ml-lightning-map.ml-lightning-strike-hover,
.ml-lightning-map.ml-lightning-strike-hover .leaflet-grab {
  cursor: pointer !important;
}

/* Kompaktnejši popup. */
.ml-lightning-map .leaflet-popup-content {
  min-width: 0;
  width: auto !important;
  margin: 11px 13px;
}

.ml-lightning-popup h3 {
  margin-bottom: 7px;
  font-size: .86rem;
}

.ml-lightning-popup dl {
  grid-template-columns: 58px 1fr;
  gap: 4px 8px;
  font-size: .70rem;
}

.ml-lightning-popup dd {
  line-height: 1.35;
}

.ml-lightning-scale {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 980px) {
  .ml-lightning-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .ml-lightning-toolbar-group-areas {
    justify-content: flex-end;
  }

  .ml-lightning-toolbar-group-window {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .ml-lightning-toolbar {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .ml-lightning-toolbar-group,
  .ml-lightning-toolbar-group-areas,
  .ml-lightning-toolbar-group-window {
    width: 100%;
    justify-content: stretch;
  }

  .ml-lightning-day-buttons,
  .ml-lightning-area-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .ml-lightning-day,
  .ml-lightning-area {
    width: 100%;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .ml-lightning-toolbar-group-areas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ml-lightning-toolbar-label {
    display: none;
  }

  .ml-lightning-window-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
  }

  .ml-lightning-window-field select {
    width: 100%;
    min-width: 0;
  }

  .ml-lightning-map {
    height: 58vh;
    min-height: 430px;
    max-height: 620px;
  }

  .ml-lightning-timeline-head {
    gap: 5px;
  }

  .ml-lightning-timeline-head strong,
  .ml-lightning-timeline-head span {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .ml-lightning-map {
    height: 54vh;
    min-height: 390px;
  }

  .ml-lightning-window-field {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
