/* map.css - cleaned + upgraded panel UX */

@font-face{
  font-family: "Neuzeit S";
  src: url("./fonts/NeuzeitSLTStd-Book.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}
@font-face{
  font-family: "Neuzeit S";
  src: url("./fonts/NeuzeitSLTStd-BookHeavy.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

html, body{
  height: 100%;
  margin: 0;
  background: #111;
  font-family: "Neuzeit S", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
}

#map{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--app-vh, 100dvh);
  min-height: 100svh;
  z-index: 0;
}

/* SEO block hidden */
.scr-seo-hidden{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Leaflet base */
.leaflet-container{ background: #050507; }
.leaflet-control-attribution{ display: none !important; }

/* Zoom bottom-right */
.leaflet-control-zoom{
  position: absolute !important;
  bottom: 20px !important;
  right: 20px !important;
  background: none !important;
  border: none !important;
}
.leaflet-control-zoom-in,
.leaflet-control-zoom-out{
  background: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 20px !important;
  border: none !important;
}
.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover{
  color: violet !important;
  cursor: pointer !important;
}
@media (max-width: 768px){
  .leaflet-control-zoom{
    bottom: 12px !important;
    right: 12px !important;
  }
}

/* Popup reset + remove arrow */
.leaflet-popup-tip,
.leaflet-popup-tip-container{ display: none !important; }
.leaflet-popup-content-wrapper{
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.leaflet-popup-content{ margin: 0 !important; }

.scr-cable-tooltip{
  background: rgba(0,0,0,0.9);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 6px;
  box-shadow: none;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 7px;
}
.scr-cable-tooltip:before{
  border-top-color: rgba(0,0,0,0.9) !important;
}

/* Marker pulse */
.radar-marker{
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radar-marker--single{ width: 18px; height: 18px; }
.radar-marker--cluster{ width: 22px; height: 22px; }
.pulse{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,1);
  animation: scrPulse 2s infinite;
}
.pulse--single{
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.98);
  animation-duration: 2.2s;
}
.pulse--cluster{
  width: 11px;
  height: 11px;
  background: rgba(50,235,255,0.98);
  animation-duration: 1.6s;
}
@keyframes scrPulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,255,255,0.98); }
  100%{ box-shadow: 0 0 0 20px rgba(255,255,255,0); }
}

/* =========================
   PANEL - cleaner, editorial, less nested backgrounds
   ========================= */

.scr-panel{
  width: 760px;
  max-width: calc(100vw - 40px);
  max-height: calc(var(--app-vh, 100dvh) - 140px);
  display: flex;
  flex-direction: column;
  touch-action: pan-y;

  /* one single surface background (no nested heavy blocks) */
  background: rgba(8, 8, 12, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 70px rgba(0,0,0,0.55);
  overflow: hidden;
}

/* header */
.scr-panel__head{
  position: relative;
  padding: 18px 20px 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.scr-panel__title{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.scr-panel__close{
  display: none !important;
}

/* media */
.scr-panel__media{
  width: 100%;
  height: 340px;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}
.scr-panel__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.96) contrast(1.02);
}
.scr-panel__video,
.scr-panel__iframe{
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
.scr-panel__video{
  object-fit: cover;
  object-position: center bottom;
  filter: saturate(0.96) contrast(1.02);
}
.scr-panel__media{
  position: relative;
}
.scr-panel__iframe{
  position: absolute;
  left: -13%;
  top: -18%;
  width: 126%;
  height: 156%;
  pointer-events: none;
}

/* content area */
.scr-panel__content{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  /* airy spacing */
  padding: 18px 20px 20px 20px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
}

/* left text: remove “blocky” look */
.scr-panel__desc{
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  min-height: calc(1.7em * 3);
  color: rgba(255,255,255,0.88);
}

/* right: snapshot becomes lighter (no big dark box-on-box) */
.scr-panel__right{
  border-left: 1px solid rgba(255,255,255,0.10);
  padding-left: 16px;

  /* remove nested background */
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}

/* snapshot title */
.scr-snap__title{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.70);
  margin-bottom: 12px;
}

/* snapshot rows: cleaner + consistent */
.scr-snap{
  margin: 0;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px 12px;
}
.scr-snap dt{
  margin: 0;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.52);
}
.scr-snap dd{
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.92);
}

/* links: more “UI”, less heavy */
.scr-links{
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.scr-links--aux{
  margin-top: 10px;
  gap: 8px;
}
.scr-links--aux-desktop{
  display: grid;
  justify-items: end;
}
.scr-links--aux-mobile{
  display: none;
}
.scr-links--media{
  display: none;
  padding: 12px 20px 0 20px;
  margin-top: 0;
}
.scr-link{
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.94);

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.scr-link::before{
  content: "$";
  color: #7dd0ff;
  flex: 0 0 auto;
}
.scr-link:hover{
  border-color: rgba(255,255,255,0.38);
  background: rgba(255,255,255,0.05);
  color: #fff;
  transform: translateY(-1px);
}
.scr-link--auxbtn{
  --aux-dot: #59f0ff;
  width: fit-content !important;
  min-width: 0 !important;
  justify-content: center !important;
  gap: 8px !important;
  background: rgba(255,255,255,0.02) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: rgba(255,255,255,0.94) !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  padding: 8px 12px !important;
}
.scr-link--auxbtn::before{
  content: "$";
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--aux-dot);
  box-shadow: none;
}
.scr-link--auxbtn.scr-link--tag-open-map,
.scr-link--auxbtn.scr-link--tag-drifter-map{
  --aux-dot: #57e7ff;
}
.scr-link--auxbtn.scr-link--tag-try-liability{
  --aux-dot: #ffc857;
}
.scr-link--auxbtn:hover{
  border-color: rgba(255,255,255,0.38) !important;
  color: #fff !important;
}

/* Desktop: keep two-column cards */
.scr-panel__content{
  grid-template-columns: 1.25fr 0.75fr !important;
  gap: 18px !important;
}
.scr-panel__right{
  border-left: 1px solid rgba(255,255,255,0.10) !important;
  padding-left: 16px !important;
  border-top: 0 !important;
  padding-top: 0 !important;
}
.scr-snap{
  grid-template-columns: 92px 1fr !important;
  gap: 10px 12px !important;
}
.scr-snap dt{
  margin-top: 0;
}
.scr-snap dd{
  margin: 0;
}
.scr-panel__left .scr-links .scr-link{
  width: 100%;
  max-width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.scr-panel__left,
.scr-panel__right{
  min-width: 0;
}

/* Mobile/tablet: single-column cards */
@media (max-width: 980px){
  .scr-panel__content{
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .scr-panel__left,
  .scr-panel__right{
    width: 100%;
  }
  .scr-panel__right{
    border-left: 0 !important;
    padding-left: 0 !important;
    border-top: 1px solid rgba(255,255,255,0.10) !important;
    padding-top: 14px !important;
  }
  .scr-snap{
    grid-template-columns: 1fr !important;
    gap: 4px 0 !important;
  }
  .scr-snap dt{
    margin-top: 8px;
  }
  .scr-snap dd{
    margin: 0 0 4px 0;
  }
  .scr-panel__left .scr-links{
    margin-top: 10px;
  }
  .scr-panel__left .scr-links .scr-link{
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
    padding: 7px 10px !important;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
  }
  .scr-links--aux-desktop{
    display: none !important;
  }
  .scr-links--aux-mobile{
    display: grid !important;
    justify-items: start;
    margin-top: 8px;
    margin-bottom: 14px; /* requested bottom margin on mobile */
  }
  .scr-links--aux-mobile .scr-link--auxbtn{
    width: fit-content !important;
    min-width: 0 !important;
    justify-content: center !important;
  }
}


/* Never overflow viewport */
.scr-panel{
  max-width: calc(100vw - 40px) !important;
  max-height: calc(var(--app-vh, 100dvh) - 140px) !important; /* leaves room for menu */
}

/* Leaflet popup container safety */
.leaflet-popup{
  max-width: calc(100vw - 40px) !important;
}

/* Title: pure white */
.scr-panel__title{
  color: #fff !important;
}

/* Balance content spacing in single-column mode */
.scr-panel__content{
  padding-left: 14px !important;
  padding-right: 16px !important;
}

/* Buttons: thin, transparent, bordered, nicer typography */
.scr-link{
  background: rgba(255,255,255,0.02) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  color: rgba(255,255,255,0.94) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-weight: 600 !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  padding: 10px 12px !important;
  border-radius: 999px !important;
}

.scr-link:hover{
  border-color: rgba(255,255,255,0.38) !important;
  color: #fff !important;
}

.scr-links .scr-link:first-child{
  border-color: rgba(255,255,255,0.24) !important;
}

/* Drifter-only media crop (120%, framed lower) */
.scr-panel--drifter .scr-panel__video{
  transform: none;
  transform-origin: center center;
  object-position: center center;
}
.scr-panel--drifter .scr-panel__iframe{
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px){
  .scr-panel{
    width: min(96vw, 520px);
    max-width: calc(100vw - 12px) !important;
    max-height: calc(var(--app-vh, 100dvh) - 96px) !important;
    margin: 0;
  }
  .leaflet-popup{
    max-width: calc(100vw - 12px) !important;
  }
  .scr-panel__head{
    padding: 14px 14px 10px 14px;
  }
  .scr-panel__media{
    height: clamp(170px, 34vh, 240px);
  }
  .scr-panel__content{
    padding: 12px 14px 14px 14px !important;
    gap: 12px !important;
  }
}

/* Final override: keep secondary CTA distinct from Work page */
.scr-link.scr-link--auxbtn{
  --aux-dot: #59f0ff;
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: max-content !important;
  border-radius: 999px !important;
  padding: 4px 8px !important;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.78) !important;
  color: #fff !important;
  line-height: 1.05 !important;
  letter-spacing: 0.06em !important;
  gap: 6px !important;
}
.scr-link.scr-link--auxbtn::before{
  content: none !important;
  display: none !important;
}
.scr-link.scr-link--auxbtn.scr-link--tag-open-map,
.scr-link.scr-link--auxbtn.scr-link--tag-drifter-map{
  --aux-dot: #57e7ff;
}
.scr-link.scr-link--auxbtn.scr-link--tag-try-liability{
  --aux-dot: #ffc857;
}

.scr-links--aux-desktop .scr-link.scr-link--auxbtn{
  justify-self: end;
}
.scr-links--aux-mobile .scr-link.scr-link--auxbtn{
  justify-self: start;
}

/* Ultra-final visual lock for secondary CTA pills */
.scr-link.scr-link--auxbtn{
  background: transparent !important;
  border: 1px solid #fff !important;
  color: #fff !important;
  font-size: 9.5px !important;
  font-weight: 500 !important;
  padding: 3px 8px !important;
}

/* Dedicated class for non-Work-page secondary chips (isolated from .scr-link overrides). */
.scr-chip-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: max-content;
  text-decoration: none;
}
