/* ATLAS - javna karta i videozid (podaci s NAP-a), izgled prema Nadzornom pregledniku u ATLAS-ovim bojama */

/* Boje temperature (tamna i svijetla tema) */
.tc1 { color: #5a47b5; } .tc2 { color: #2d69b8; } .tc3 { color: #127f86; } .tc4 { color: #2b7a4b; } .tc5 { color: #b4600b; } .tc6 { color: #bf3434; }
.tcb1 { background: #5a47b5; } .tcb2 { background: #2d69b8; } .tcb3 { background: #127f86; } .tcb4 { background: #2b7a4b; } .tcb5 { background: #b4600b; } .tcb6 { background: #bf3434; }
:root[data-theme="dark"] .tc1 { color: #b0a4f7; } :root[data-theme="dark"] .tc2 { color: #7fb2f2; } :root[data-theme="dark"] .tc3 { color: #63cdd2; }
:root[data-theme="dark"] .tc4 { color: #7fd09d; } :root[data-theme="dark"] .tc5 { color: #f2ad62; } :root[data-theme="dark"] .tc6 { color: #f58c84; }
:root[data-theme="dark"] .tcb1 { background: #b0a4f7; } :root[data-theme="dark"] .tcb2 { background: #7fb2f2; } :root[data-theme="dark"] .tcb3 { background: #63cdd2; }
:root[data-theme="dark"] .tcb4 { background: #7fd09d; } :root[data-theme="dark"] .tcb5 { background: #f2ad62; } :root[data-theme="dark"] .tcb6 { background: #f58c84; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tc1 { color: #b0a4f7; } :root:not([data-theme="light"]) .tc2 { color: #7fb2f2; } :root:not([data-theme="light"]) .tc3 { color: #63cdd2; }
  :root:not([data-theme="light"]) .tc4 { color: #7fd09d; } :root:not([data-theme="light"]) .tc5 { color: #f2ad62; } :root:not([data-theme="light"]) .tc6 { color: #f58c84; }
  :root:not([data-theme="light"]) .tcb1 { background: #b0a4f7; } :root:not([data-theme="light"]) .tcb2 { background: #7fb2f2; } :root:not([data-theme="light"]) .tcb3 { background: #63cdd2; }
  :root:not([data-theme="light"]) .tcb4 { background: #7fd09d; } :root:not([data-theme="light"]) .tcb5 { background: #f2ad62; } :root:not([data-theme="light"]) .tcb6 { background: #f58c84; }
}
.c-warn { color: var(--st-works); font-weight: 700; }
.c-bad { color: var(--st-closed); font-weight: 700; }
.none { color: var(--text-3); opacity: .6; }
.muted { color: var(--text-3); }

/* ---------- Karta ---------- */
body[data-page="karta.html"] .site-footer { display: none; }
.map-full { position: fixed; left: 0; right: 0; bottom: 0; top: var(--hdr, 64px); }
#map { position: absolute; inset: 0; }
.map-note { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 2; max-width: calc(100% - 120px); padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; color: var(--text-2); text-align: center; }
.map-legend { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: grid; gap: 4px; max-width: min(560px, calc(100% - 80px)); padding: 7px 11px;
  border-radius: 10px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 12px; color: var(--text-2); }
.map-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px 0 8px; vertical-align: -1px; }
.map-legend b { color: var(--text); }
.map-legend .attr { color: var(--text-3); }
.map-legend .attr a { color: inherit; }
.radar-legend i { border-radius: 2px; margin: 0 !important; width: 12px; }
.flow-key { display: inline-block; width: 16px !important; height: 4px !important; border-radius: 2px !important; margin: 0 4px 0 8px; vertical-align: 2px !important; }
@media (max-width: 640px) { .map-legend .attr, #temp-legend { display: none; } .map-legend { max-width: calc(100% - 70px); } }

/* Izbornik slojeva */
.layers { position: relative; }
.layers > button { display: grid; place-items: center; color: #333; }
.layers .menu { display: none; position: absolute; right: 36px; top: 0; flex-direction: column; gap: 7px; padding: 10px 12px; min-width: 210px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); font: 600 14px/1.3 var(--font); }
.layers.open .menu { display: flex; }
.layers label { display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.layers input { accent-color: var(--accent); width: 16px; height: 16px; }

/* Oblačići */
.maplibregl-popup { z-index: 1000; }
.maplibregl-popup-content { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 10px 30px rgb(10 20 30 / .25); font: 13.5px/1.4 var(--font); }
.maplibregl-popup-tip { display: none; }
.maplibregl-popup-close-button { color: var(--text-3); font-size: 18px; padding: 2px 8px; }
.pop > b { font-size: 14.5px; }
.pop table { margin: 6px 0 4px; border-collapse: collapse; }
.pop td { padding: 1px 12px 1px 0; }
.pop td:first-child { color: var(--text-3); }
.pop small { color: var(--text-3); display: block; }
.pop.d8 td:last-child { white-space: normal; }
.pp { min-width: 160px; }
.pp .pw { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; }
.pp .pw img { width: 40px; height: 40px; }
.pp .pr { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.pp .pr > svg { color: var(--text-3); flex: none; }
.pp .pr span { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }

/* Vrijeme u mjestima */
.wx { display: flex; align-items: center; gap: 2px; padding: 1px 8px 1px 2px; border-radius: 14px; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--border); box-shadow: 0 1px 4px rgb(10 20 30 / .2); }
.wx img { width: 24px; height: 24px; display: block; }
.wx b { font-size: 13px; font-variant-numeric: tabular-nums; }
.wx:hover { border-color: var(--text-3); z-index: 3; }
body.no-wx .wx { display: none; }

/* Događaji */
.evm-ico { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .5)); }
.evm-ico img, .ev .evi img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ev-gen { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #fff; border: 3px solid #d22630; color: #1e2833;
  font: 700 15px/1 system-ui, sans-serif; box-sizing: border-box; }
body.no-g-ac .evm-ico.g-ac, body.no-g-dc .evm-ico.g-dc, body.no-g-radovi .evm-ico.g-radovi { display: none; }
.ev .evh { display: flex; align-items: center; gap: 8px; margin-right: 18px; }
.ev .evi { width: 34px; height: 34px; flex: none; }
.ev .evh b { font-size: 15px; }
.ev .evm { margin: 5px 0 0; color: var(--text-2); }
.ev p { margin: 6px 0; white-space: normal; line-height: 1.45; }
.ev-pick { display: flex; flex-direction: column; gap: 5px; min-width: 230px; }
.ev-pick > b { margin: 0 18px 2px 0; }
.ev-pick button { display: flex; align-items: center; gap: 8px; text-align: left; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 8px; cursor: pointer; font: inherit; }
.ev-pick button:hover { border-color: var(--text-3); }
.ev-pick .evi { width: 28px; height: 28px; flex: none; }
.ev-pick .evi img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ev-pick small { display: block; color: var(--text-3); }

/* Kamere na karti */
.cam-ico { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; display: grid; place-items: center; cursor: pointer;
  background: #1e2833; color: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .45); }
.cam-ico:hover { background: #2b78c5; }
body.no-cam .cam-ico { display: none; }
.cam img { width: 320px; max-width: 70vw; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 8px; background: var(--bg); margin: 6px 0 4px; }
.cam .shot { display: block; position: relative; }
.cam .shot.failed::after { content: "Slika trenutno nije dostupna"; position: absolute; inset: 6px 0 4px; display: grid; place-items: center; color: var(--text-3); font-size: 13px; }
.cam .muted { font-size: 12.5px; }

/* ---------- Videozid ---------- */
.wall-page { padding: 20px 16px 40px; }
.wall-head { display: grid; gap: 12px; margin-bottom: 14px; }
.wall-head h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.wall-tools { display: grid; gap: 10px; }
.wall-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; color: var(--text-2); }
.wall-opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.wall-opts input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.wall-opts input[type=range] { width: 120px; accent-color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 14px; font-weight: 700;
  color: var(--text-2); cursor: pointer; white-space: nowrap; }
.chip small { color: var(--text-3); font-weight: 700; margin-left: 2px; }
.chip:hover { border-color: var(--text-3); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-c); }
.chip.on small { color: var(--on-c); }
.wall { background: #05080b; border-radius: 12px; overflow: hidden; min-height: 50vh; }
.wall:fullscreen { overflow: auto; border-radius: 0; }
.wall-sec h2 { margin: 0; padding: 10px 12px 6px; font-size: 14px; font-weight: 800; color: #fff; background: #05080b; }
.wall-sec h2 small { color: #8a95a1; font-weight: 600; }
.wall-grid { display: grid; grid-template-columns: repeat(var(--cols, 6), 1fr); grid-auto-rows: var(--rh, 150px); grid-auto-flow: row dense; gap: var(--gap, 0); }
.wt { position: relative; margin: 0; overflow: hidden; background: #0b0f14; cursor: zoom-in; }
.wt:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.wt.s2 { grid-column: span 2; grid-row: span 2; }
.wt.s3 { grid-column: span 3; grid-row: span 3; }
.wt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wt.err img { visibility: hidden; }
.wt.err::before { content: "Slika nije dostupna"; position: absolute; inset: 0; display: grid; place-items: center; color: #6c7884; font-size: 12px; }
.wt figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 8px 3px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .82));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.wt figcaption b { color: #ffd84d; margin-right: 5px; }
.wt figcaption .stale { color: #f0a63a; }
.no-labels .wt figcaption { display: none; }
.no-labels .wt:hover figcaption { display: block; }
.wt-tools { position: absolute; top: 4px; right: 4px; display: none; gap: 4px; z-index: 2; }
.wt:hover .wt-tools, .wt:focus-within .wt-tools { display: flex; }
.wt-tools button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 14px; padding: 0; cursor: pointer; }
.wt.pinned .wt-tools [data-act=pin] { color: #ffd84d; }
.wt.pinned::after { content: '★'; position: absolute; top: 4px; left: 6px; color: #ffd84d; font-size: 13px; text-shadow: 0 0 3px #000; }
.wall-empty { margin: 0; padding: 40px 16px; text-align: center; color: #8a95a1; }
.wall-note { margin: 10px 2px 0; font-size: 13px; color: var(--text-3); }
@media (hover: none) { .wt-tools { display: flex; } }
/* Preko cijelog zaslona */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .94); display: grid; grid-template-rows: 1fr auto; }
.lightbox[hidden] { display: none; }
.lb-media { display: grid; place-items: center; min-height: 0; padding: 12px; }
.lb-media img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-cap { padding: 10px 16px 16px; color: #e6edf3; font-size: 14px; text-align: center; }
.lb-cap b { color: #ffd84d; margin-right: 6px; }
.lb-prev, .lb-next, .lb-close { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; border-radius: 10px; font-size: 26px; width: 48px; height: 48px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 12px; top: 12px; font-size: 18px; }
.lb-prev:hover, .lb-next:hover, .lb-close:hover { background: rgba(255, 255, 255, .22); }
body.lb-open { overflow: hidden; }
