html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: #5fa8d3;
  color: #f7fbff;
}

body.modalOpen {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img {
  border: 0;
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none !important;
}

.datePill{display:none;}

.pageShell,
.mapStage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#map_canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #aac9d8;
}

.mapWash {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(11, 40, 67, 0.08) 0%, rgba(11, 40, 67, 0) 24%, rgba(9, 22, 37, 0.18) 100%);
}

#app-controls {
  display: contents;
}

.topBar {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, 0.72fr);
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(to bottom, #026BBC 0%, 75%, #299AE9 100%);
  box-shadow: 0 18px 45px rgba(6, 28, 52, 0.2);
  backdrop-filter: blur(18px);
}

.topBar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("img/header.png") no-repeat left center / auto 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0,
    #000 calc(100% - 120px),
    rgba(0, 0, 0, 0.88) calc(100% - 72px),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    #000 0,
    #000 calc(100% - 120px),
    rgba(0, 0, 0, 0.88) calc(100% - 72px),
    transparent 100%
  );
}

.topBar > * {
  position: relative;
  z-index: 1;
}

.brandBlock {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: #285573;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timelineEyebrow {
  color: #143b58;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

#pageTitle {
  margin: 0;
  color: #0a3554;
  font-size: clamp(1rem, 1.35vw, 1.42rem);
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.topBarActions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.liveModePill,
.ghostLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-weight: 700;
}

.liveModePill {
  background: rgba(12, 88, 148, 0.16);
  color: #0d4267;
}

.ghostLink {
  background: rgba(255, 255, 255, 0.2);
  color: #0f3c5c;
  transition: transform 0.18s ease, background 0.18s ease;
}

.ghostLink:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.topAdWrap {
  display: flex;
  justify-content: flex-end;
}

.adSlot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 60px;
  max-width: 340px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: #f5fbff;
}

.adSlotInner {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  opacity: 0.86;
  text-transform: uppercase;
}

.surfaceCard {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 20px;
  background: rgba(244, 250, 255, 0.76);
  box-shadow: 0 18px 38px rgba(8, 33, 56, 0.18);
  backdrop-filter: blur(18px);
}

.sidePanel {
  position: absolute;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidePanelLeft {
  top: 120px;
  left: 18px;
}

.sidePanelRight {
  top: 120px;
  right: 18px;
  align-items: flex-end;
}

.segmentedCard {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
}

.segment {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #4d6477;
  cursor: pointer;
  padding: 8px 13px;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.segment:hover {
  background: rgba(11, 111, 203, 0.08);
  transform: translateY(-1px);
}

.segment.isActive,
.segment.isActive:hover {
  background: #0b6fcb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 111, 203, 0.3);
}

.utilityCard {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
}

.utilityZoomMock {
  width: 58px;
  padding: 6px;
}

.utilityButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: #214766;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.utilityButton:hover {
  background: #fff;
  box-shadow: 0 10px 16px rgba(15, 53, 83, 0.16);
  transform: translateY(-2px);
}

.utilityButtonIcon img {
  width: 20px;
  height: 20px;
}

.socialRail {
  padding: 8px;
}

.socialButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.socialButtonIcon {
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
}

.socialButtonIcon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.socialButtonIcon[data-share="facebook"] {
  background: rgba(24, 119, 242, 0.18);
  border-color: rgba(24, 119, 242, 0.28);
  color: #1254aa;
}

.socialButtonIcon[data-share="x"] {
  background: rgba(15, 23, 42, 0.16);
  border-color: rgba(15, 23, 42, 0.16);
  color: #172033;
}

.socialButtonIcon[data-share="copy"] {
  background: rgba(37, 189, 123, 0.16);
  border-color: rgba(37, 189, 123, 0.18);
  color: #0f7f56;
}

.socialButtonIcon:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-2px) scale(1.03);
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.controlDockWrap {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 24;
  width: min(800px, calc(100% - 88px));
  transform: translateX(-50%);
}

.toolbarDock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 22px;
}

.toolbarCluster {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.toolbarClusterPrimary {
  flex: 0.85;
}

.toolbarClusterControls {
  flex: 1.15;
}

.compactSummary {
  min-width: 150px;
}

.timelineSummary {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.timelineMeta,
.compactMeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

#cas {
  color: #103452;
  font-size: 1.44rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.datePill,
.valuePill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(19, 84, 132, 0.1);
  color: #135182;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.toolbarLegend {
  display: none;
}

.legendInlineTitle {
  margin: 0 0 4px;
  font-size: 0.84rem;
  font-weight: 800;
}

.legendInlineText {
  margin: 0;
  overflow-x: auto;
  color: #35556d;
  font-size: 0.74rem;
  line-height: 1.2;
  white-space: nowrap;
}

.legendInlineText::-webkit-scrollbar {
  height: 0;
}

.modeToolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 7px;
  border-radius: 18px;
  background: rgba(227, 242, 251, 0.76);
}

.modeButton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(16, 73, 112, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 18px rgba(17, 63, 99, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.modeButtonTooltip {
  overflow: visible;
  isolation: isolate;
}

.modeTooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  z-index: 5;
  min-width: 148px;
  max-width: min(220px, 64vw);
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(11, 30, 46, 0.92);
  box-shadow:
    0 18px 30px rgba(6, 20, 34, 0.28),
    0 4px 10px rgba(6, 20, 34, 0.12);
  backdrop-filter: blur(18px);
  color: #f7fbff;
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px) scale(0.98);
  transform-origin: bottom center;
  transition: opacity 0.16s ease, transform 0.16s ease;
  text-align: left;
  white-space: pre-line;
}

.modeTooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: rgba(17, 40, 58, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 8px 8px 14px rgba(6, 20, 34, 0.08);
  transform: translateY(-8px) rotate(45deg);
}

.modeButtonTooltip:hover .modeTooltip,
.modeButtonTooltip:focus-visible .modeTooltip {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.modeButtonTooltip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.78);
  outline-offset: 2px;
}

.modeButton img {
  width: 24px;
  height: 24px;
  transform-origin: center bottom;
}

.modeButton:hover {
  background: #fff;
  box-shadow: 0 14px 22px rgba(17, 63, 99, 0.14);
  transform: translateY(-2px);
}

.modeButton:hover img {
  animation: iconHop 0.7s ease;
}

.modeButton.isActive {
  border-color: rgba(19, 104, 179, 0.4);
  background: linear-gradient(180deg, #ffffff, #d9efff);
  box-shadow: 0 14px 28px rgba(16, 102, 176, 0.18);
}

.modeButton.isActive::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 6px;
  height: 4px;
  border-radius: 999px;
  background: #1274d2;
}

.toolbarRange {
  min-width: 0;
}

.toolbarRangeTime {
  flex: 1.15;
}

.toolbarRangeOpacity {
  flex: 0.7;
}

.rangeGroup {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rangeLabel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #2f4b5f;
  font-size: 0.82rem;
  font-weight: 700;
}

#casNice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(249, 185, 58, 0.18);
  color: #8a5800;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

#slider,
#sliderOpacity {
  width: 100%;
  margin: 0;
  accent-color: #1f78d1;
}

#slider {
  height: 24px;
}

#sliderOpacity {
  height: 20px;
}

.compactFooter {
  margin-left: auto;
  align-self: flex-end;
}

.dockCopyright {
  color: #47627a;
  font-size: 0.76rem;
  white-space: nowrap;
}

.dockCopyright:hover {
  color: #123f62;
}

.appDialog {
  width: min(520px, calc(100% - 24px));
  max-width: 520px;
  overflow: visible;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #333;
  padding: 0;
}

.appDialog::backdrop {
  background: rgba(15, 24, 35, 0.58);
}

.dialogCard {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
  color: #333;
  padding: 24px;
}

.dialogCard h2 {
  margin: 0 0 12px;
  color: #1d4965;
  font-size: 1.32rem;
  font-weight: 800;
}

.dialogCard p {
  margin: 0 0 10px;
  line-height: 1.5;
}

.dialogCard a,
.darkLink {
  color: #1d4965;
}

.dialogActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.dialogButton {
  border: 0;
  border-radius: 999px;
  background: #1d4965;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 16px;
}

.dialogButton.secondary {
  background: #8c959b;
}

.fieldLabel {
  display: block;
  margin-bottom: 6px;
  color: #1d4965;
  font-size: 0.85rem;
  font-weight: 800;
}

.searchRow {
  display: flex;
  gap: 10px;
  margin: 8px 0 12px;
}

.searchRow input {
  flex: 1;
  border: 1px solid #c8d3dc;
  border-radius: 12px;
  padding: 10px 12px;
}

.dialogHint {
  color: #64717b;
  font-size: 0.9rem;
}

.dialogStatus {
  margin: 0 0 10px;
  color: #3c576b;
  font-size: 0.9rem;
  font-weight: 600;
}

.dialogStatusError {
  color: #a53a36;
}

.dialogButton:disabled {
  cursor: wait;
  opacity: 0.72;
}

#zadetki {
  max-height: 180px;
  margin-top: 12px;
  overflow: auto;
  padding-right: 4px;
}

#zadetki li + li {
  margin-top: 8px;
}

#zadetki a {
  color: #234866;
}

@keyframes iconHop {
  0% {
    transform: translateY(0) scale(1);
  }

  20% {
    transform: translateY(-8px) scale(1.04);
  }

  38% {
    transform: translateY(0) scale(0.98);
  }

  55% {
    transform: translateY(-4px) scale(1.02);
  }

  72% {
    transform: translateY(0) scale(0.995);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .pageShell,
  .mapStage {
    min-height: 100svh;
    height: auto;
  }

  .topBar {
    top: 12px;
    left: 12px;
    right: 12px;
    grid-template-columns: 1fr;
    grid-template-areas: none;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
  }

  .topBarActions {
    justify-content: flex-start;
    gap: 6px;
  }

  .topAdWrap {
    display: none;
  }

  .eyebrow {
    font-size: 0.6rem;
  }

  #pageTitle {
    font-size: 0.96rem;
  }

  .ghostLink {
    padding: 7px 11px;
  }

  .brandBlock,
  .topBarActions {
    grid-area: auto;
  }

  .segment {
    padding: 8px 10px;
  }

  .sidePanelLeft {
    position: fixed;
    top: 120px;
    left: 12px;
    right: auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    z-index: 26;
  }

  .segmentedCard {
    min-width: 0;
  }

  .utilityZoomMock {
    width: 58px;
    flex-direction: column;
    padding: 6px;
  }

  .utilityButton,
  .socialButtonIcon {
    width: 40px;
    height: 40px;
  }

  .sidePanelRight {
    position: fixed;
    right: 12px;
    top: 120px;
    bottom: auto;
    gap: 6px;
    align-items: flex-end;
    z-index: 26;
  }

  /* .utilityCard,
  .socialRail {
    flex-direction: row;
  } */

  .controlDockWrap {
    left: 10px;
    right: 10px;
    bottom: 8px;
    width: auto;
    transform: none;
  }

  .toolbarDock {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px;
    border-radius: 18px;
  }

  .toolbarClusterPrimary,
  .toolbarClusterControls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1 1 auto;
  }

  .toolbarCluster {
    flex-wrap: nowrap;
  }

  .compactSummary {
    min-width: 0;
  }

  .timelineEyebrow {
    display: none;
  }

  #cas {
    font-size: 1.12rem;
  }

  .legendInlineTitle {
    font-size: 0.8rem;
  }

  .modeToolbar {
    gap: 6px;
    padding: 6px;
    justify-content: center;
    overflow: visible;
  }

  .modeButton {
    width: 40px;
    height: 40px;
  }

  .modeButton img {
    width: 21px;
    height: 21px;
  }

  .modeTooltip {
    display: none;
  }

  .rangeGroup {
    gap: 4px;
  }

  .rangeLabel {
    font-size: 0.74rem;
  }

  .toolbarRangeTime,
  .toolbarRangeOpacity {
    width: 100%;
    flex: 1 1 auto;
  }

  #slider {
    height: 18px;
  }

  #sliderOpacity {
    height: 16px;
  }

  .compactFooter {
    display: none;
  }
  
  .timelineMeta,
  .compactMeta {
    gap: 6px;
  }
}

