html, body, .tactical-map-container, .map-container, #mapContent, #markers,
.sidebar, .mobile-toolbar, .user-controls, button, .help-btn, .agent-grid,
.timeframe-btn, .ad-slot, .ad-box, img, .marker {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* iOS long-press */
}
img, .marker, #currentMap { -webkit-user-drag: none; }

/* Re-enable where you want typing/copy (inputs, textareas, intro.js tooltips, etc.) */
input, textarea, [contenteditable="true"], .allow-select, .introjs-tooltip {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}



body:not(.ready) .tactical-map-container,
body:not(.ready) .user-controls,
body:not(.ready) .mobile-toolbar,
body:not(.ready) #sidebar,
body:not(.ready) .ad-slot {
  display: none !important;
}


html, body{
  height:100%;
  overflow:hidden;          /* no page scroll */
}
* {
  box-sizing: border-box;
}
:root{ 
  --marker-size: 24px; }

  :root{
    --toolbar-h: 60px;   
                /* your existing height */
  }
:root{
  /* tweak these two only and the rest updates automatically */
  --violet-dk : #2e1a47;   /* tooltip body */
  --violet-lt : #4b0082;   /* header strip & border */
  --yellow    : #f3e462;   /* accent (already on your buttons) */
}
/* =========== desktop stays identical =========== */

body:not(.ready) .app‑shell {
  opacity: 0;
}
body { opacity: 1; transform: none; animation: none; }


body.ready .user-controls{
  opacity: 1;
  pointer-events: auto;
}
.app-shell { opacity: 0; transform: translateY(20px); }
body.ready .app-shell { animation: fadeInSlide 1s ease forwards; }

#mapContent.prepaint-hide { visibility: hidden; }
#currentMap[data-preload] { opacity: 0; }
/* optional little fade when we reveal */
#mapContent.revealed { 
  visibility: visible;
  animation: mapInitialFade .20s ease-out;
}




@keyframes mapInitialFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.map-initial-fade {
  animation: mapInitialFade .6s ease-out forwards;
}


@keyframes fadeInSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes mapFadeIn {
  from { opacity: 0 }
  to   { opacity: 1 }
}

.fade‑in‑first {
  animation: mapFadeIn .5s ease-out forwards;
}

body {
  margin: 0;
  padding: 0;
  font-family:
      -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Arial,
    sans-serif;
 
  background-color: #090f14; /* Dark purple background */
  color: #fff;
  overflow-x: hidden;
  
}
.home-button {
  position: fixed;
  top: 20px;
  left: 20px;
  background-color: #dc2626;  /* Red (contrasting) */
  color: #fff;
  padding: 10px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  z-index: 1000;
  transition: background 0.3s ease, transform 0.2s ease;
}

.home-button:hover {
  background-color: #b91c1c;
  transform: scale(1.05);
}
.sidebar {
  
  
  position: relative;  /* This ensures the sidebar contents are positioned within its bounds */
  width: 400px;
  background-color: #64462d;
  border-right: 1px solid #3f3f46;
  padding: 1rem;
  height: 100vh;
 margin-left:-100%;
  border-radius: 12px;
  z-index: 11000; 
 
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.sidebar.slide-in {
  opacity: 1;
  margin-left:0;
}
.sidebar.slide-in-done{
  transform: none !important;
  z-index: auto !important;
  margin-left:0;
}

.sidebar button {
  width: 100%; 
  padding: 0.7rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 4px;
  background-color: #494949;
  color: #fff5bc;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.sidebar button:hover {
  background-color: #f5ffbb;
  
}

.agent-select h2 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.4em;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.agent-grid button {
 aspect-ratio:1/1;        /* Ensure grid cells are square */
  background-color: #00000060; /* Optional background color */
  border: none;
  border-radius: 0.5rem;
  display: flex; /* Use flexbox for centering */
  align-items: center; /* Vertically center the image */
  justify-content:flex-start; /* Horizontally center the image */
  padding: 0; /* Remove any padding */
  margin: 0; /* Remove any margin */
  overflow: hidden; 
  display:flex;
  flex-direction:column;
  padding:6px; 
    position:relative;  
     cursor:pointer;  
       transition:transform .2s; /* Prevent content from spilling outside the button */
}

.agent-grid button img{
  width:100%;
   height:100%;
  aspect-ratio:1/1;
  object-fit:contain;
}
.agent-name{
  margin-top:4px;
   font-weight:600;
  font-size:.75rem;
  line-height:1.2;
  text-align:center;
  color:#fff;
  pointer-events:none;         /* label won’t block clicks */
  word-break:break-word;   
  pointer-events:none; 
   white-space:nowrap;   
position:absolute;
   inset:auto 0 0 0;  
   padding:.25rem .4rem;
    text-shadow:0 1px 2px #000;
    
    /* wrap long names if needed */

}
.agent-grid button.selected-agent {
  background-color: #ffffff !important; /* Bright yellow background */
  border:#090f14;     
  border-radius: 4px;                /* Purple text/icon tint */
  transform: scale(1.1);                 /* Slightly larger scale on select */
  transition: transform 0.3s ease;       /* Smooth transition */
  z-index: 10;    
   background:#fff;
}
.agent-grid button.selected-agent img {
  transform: scale(1.1);                /* Scale the image larger */
}
.agent-grid button.selected-agent .agent-name{
  color:#4B0082;            /* or whatever accent you like */
}
.agent-grid button:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

.agent-grid img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;       /* Smooth transition for scaling effect */
}

.timeframe-buttons {
  margin-top: 25px;
  display: flex;
  flex-wrap: nowrap;        /* Prevent wrapping */
  justify-content: space-between; /* Distribute space evenly */
  border-radius: 8px;
  border: #000;
}

.timeframe-btn {
  flex: 1 1 25%;            /* Each button takes 25% of the row */
  max-width: 25%;
  padding: 5px;
  /* Remove any background */
  border: 2px solid #000;
  border-radius: 8px;
  text-align: center;
}
.timeframe-btn:not(.active) {

   border: 2px solid #000;
}


.timeframe-btn:hover {
  background-color: #3a006e;
}

.timeframe-btn.active {
  background-color: #f3e462;
  color: #4B0082;
  transform: scale(1.05);
  border: 2px solid black;
}

/* Marker Selection Area */
#agentMarkers {
  margin-top: 1.5rem;
}

#agentMarkers h3 {
  margin-bottom: 0.7rem;
  font-size: 1.2em;
}

.marker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.main-content {
   flex:1 1 auto;   
     min-width:0;   
  position: relative;
  display: flex;
  justify-content: center;  /* horizontal centre */
  align-items: center;  
  overflow: visible;
}

.map-container {
  position: relative;
  width: 100%;
  flex:1 1 auto;  
  height: 100vh; /* Fill remaining viewport height */
   align-items:stretch; 
  flex-direction:row;
  border-radius: 8px;
  overflow:hidden;
  overscroll-behavior:none; /* Ensure nothing spills outside the container */
  background-color: transparent;
  display:flex;  /* Horizontally center the map */
}

#currentMap {
  position: absolute;  /* So .slide-out-left can move it */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
 
  object-fit: fill;   /* Keep your existing styles */
  display: block;
  outline: none;
     /* The animation runs via keyframes */
}

/* Marker Styling on Map */
#markers {
  position: absolute;
  
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
}

.marker {
  width : var(--marker-size);
  height: var(--marker-size);
  position: absolute;

  background-color: rgba(0, 0, 0, 0.8);
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.tactical-map-container {
  display: flex;
  flex-direction: row;
   /* Optional: adds some spacing between the two */
}

.spinner {
  position: absolute; /* Stay in place */
  z-index: 999; /* Sit on top */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* Optionally add background color */
 
  padding: 20px;
  border-radius: 10px;
}


.loader-logo{
  width:140px;      /* tweak as needed */
  height:auto;
  margin-bottom:14px;
    display: block; 
}

/* Spin Keyframes */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === CSS (styles.css) === */
.selected-agent {
   /* Bright yellow background */
  color: #ffffff;           /* Purple text/icon tint if desired */
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

#mapContent {
  position:absolute;  /* Container for both images */
  width: 100%;
  height: 100%;
   top:0;
  left:0;
  overflow: hidden;     /* So sliding outside is masked off */
}

.selected-map {
  margin: -1rem -1rem 1rem -1rem;
  width: calc(100% + 2rem);
}
.selected-map button img {
  transition: transform 0.3s ease; /* Smooth transition */
}

.selected-map button:hover img {
  transform: scale(1.1); /* Zoom in 10% on hover */
}
.selected-map button {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  display: block;
  overflow: hidden;
}
.selected-map button::before {
  content: "»";
  position: absolute;
  bottom: 10%;
  right: 10%;
  font-size: 24px;
  color: white;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.6);
  display: inline-block;
  transform-origin: center;
  transform: rotate(90deg);
  z-index: 2;  /* Ensure this pseudo-element is above the image */
}

.selected-map button::after {
  content: attr(data-map-name);  /* show the map name */
  position: absolute;
  bottom: 5%;                     /* pinned to bottom */
  left: 5%;                       /* pinned to left edge */
  font-family:
     -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Arial,
    sans-serif;
   
  color: #fff;
  padding: 5px 8px;
  font-size: 30px;
  font-weight: bold;
  border-top-right-radius: 6px;
  pointer-events: none;
  transition: none;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8); /* text shadow for letters */
}


.selected-map img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  display: block;
  border-radius: inherit;

}


   .all-maps-grid {
    border-radius: 6px;
    position: absolute;
    top: 0;
    left: 0;
    max-width: 340px;/* Explicit width */
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 10px;
    background-color: rgb(29, 19, 41);
    z-index: 1000;
    display: none; /* Initially hidden */
    overflow-y: auto; /* Ensure scrolling works */
    pointer-events: auto; /* Allow clicks */
}
.all-maps-grid::-webkit-scrollbar {
  display: none;
}

  
.all-maps-grid button {
  max-height: 65px;
  position: relative;
  width: 100%; /* Each button fully fills its grid cell */
  aspect-ratio: 1; /* Keeps them square */
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: hidden;
 
}
.all-maps-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures they fully fill their space */
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 16px;
}
.all-maps-grid button img {
  transition: transform 0.3s ease; /* Add smooth transition */
}
  
.all-maps-grid button:hover img {
  transform: scale(1.1); 
      /* Zoom the image on hover */
}
  /* Show map name on hover */
  .all-maps-grid button:hover::after {
    content: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 14px;
    font-weight: bold;
  }

  .map-name {
    position: relative;
    bottom: 30px;              /* Pins the label at the very top of the thumbnail */
    left: 50%;
    transform: translateX(-50%); /* Centers the label horizontally */
    
    color: #fff;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
    font-family:
       -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Arial,
    sans-serif;
  
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  }
/* main.css – add anywhere */
#userInfo { display: none; }   /* hidden by default */

#userInfo {
 
  border:rgb(121, 107, 30);
 

  background-color: rgba(255, 251, 0, 0.3);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  
  overflow: hidden;
  white-space: nowrap;
  cursor: default;
}

/* Crown icon styling */
#userInfo .crown {
  margin-left: 8px;
  position: relative;
  cursor: pointer;
 
}

/* Tooltip when hovering over the crown */
#userInfo.premium:hover::after {
  content: "premium user";
  position: absolute;
  top: 100%; /* position tooltip just below the user info */
  left: 0;
  background-color: #000;
  color: #fff;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  font-size: 12px;
  margin-top: 4px;
  z-index: 1200;
}


.sidebar.blurred {
  filter: blur(10px); /* Apply blur to the sidebar */
   /* Disable interactions while the sidebar is blurred */
}

.user-controls {
  position: fixed;  /* pins it to the viewport, always top-right on screen */
  top: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  right: 10px;
  z-index: 9999;
  display: flex;
  gap: 10px;
  align-items: center;
}
.legal-btn{
  background: none;
  border: 1px solid transparent;
  color: #fff;
  padding: .35rem .8rem;
  font-size: .9rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background .25s, color .25s;
}
.legal-btn:hover{
  color: #4B0082;          /* violet text on hover */
  background: #f5ffbb;     /* same yellow you use for active timeframe btns */
}
#loginPageBtn, #logoutBtn {
  padding: 0.2rem 0.8rem; /* Increase padding for larger button */
  font-size: 1rem;   /* Increase font size */
  border-radius: 8px;  /* Optional: Make the button corners rounder */
  transition: background-color 0.3s, transform 0.2s;
}

#loginPageBtn:hover, #logoutBtn:hover {
  transform: scale(1.05); /* Optional: Slightly increase the button size on hover */
}
#logoutBtn {
  background-color: #c03b3b;
  
}
#loginPageBtn{

  padding-right: 1.5rem;
  padding-left: 1.5rem;
  width: 100%;
  margin-right: 1rem;
  margin-top: 0.5rem;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  /* Primary dark purple button */
  background: #4B0082;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  font-family:
     -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Arial,
    sans-serif;
 
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}
/* Fade-in animation for newly added markers */
.marker.fade-in {
  animation: fadeInFromTop 0.3s ease-in-out forwards;
}

@keyframes fadeInFromTop {
  0% {
    opacity: 0;
    /* Start higher than the final location: */
    transform: translate(-50%, -70%) scale(0.8);
  }
  100% {
    opacity: 1;
    /* End at the normal marker position: */
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.5s forwards;
}

.sidebar.blurred .all-maps-grid {
  filter: none;           /* Cancel out the sidebar's blur */
  pointer-events: auto;   /* Re-enable clicking on the grid */
  position: absolute;     /* Already set in JS, but reaffirm here */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;           /* Ensure it's above the blurred sidebar content */
}
.sidebar .blur-section {
  filter: blur(10px);
  pointer-events: none; /* Disable interactivity */
}

#preloader {
  position: fixed;
  inset: 0;                    /* top/left/right/bottom = 0 */
  background: #2E1A47;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 12100;  
  transition: opacity 0.5s ease;
  min-height: 100dvh;
}

.timeframe-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  
  display: block;
  margin: 0 auto;
}

.slide-in-right  { animation: slideInRight .5s ease forwards; }
.slide-out-left {
  animation: slideOutLeft 0.5s ease-in-out forwards; /* was 0.5s */

}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}


@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}
.markers-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}
@keyframes thumbnailFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes thumbnailFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.thumbnail-fade-out {
  animation: thumbnailFadeOut 0.5s forwards;
}

.thumbnail-fade-in {
  animation: thumbnailFadeIn 0.5s forwards;
}

@keyframes slideInSymbol {
  from {
    transform: translateY(-50%) rotate(90deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(90deg);
    opacity: 1;
  }
}

@keyframes slideInMapName {
  from {
    transform: translateY(-50%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* When the overlay is triggered, animate the pseudo-elements */
.selected-map button.slide-in-overlay::before {
  animation: slideInSymbol 0.5s forwards;
}

.selected-map button.slide-in-overlay::after {
  animation: slideInMapName 0.5s forwards;
}

.selected-map button.hide-overlay::before,
.selected-map button.hide-overlay::after {
  content: "";
}

.loader-text {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  font-family: 
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Arial,
   sans-serif;
}

/* Spin Animation Keyframe */

@keyframes slideInFromLeftInitial {
  from {
    transform: translateX(-50%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}



@keyframes mapFadeIn { from {opacity:0} to {opacity:1} }

.fade‑in‑first    { animation: mapFadeIn .6s ease-out forwards }
.fade‑in-markers  { animation: mapFadeIn .4s ease-out forwards }
.gear-purple {
  background-image: url('purple.png');
  animation: spin-reverse 1.5s linear infinite;
  margin-left: -16px; 
    /* Adjusted for larger gears */
  z-index: 1;
}

@media (max-width: 768px) {
  .tactical-map-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #3f3f46;
    margin-bottom: 1rem;
    z-index: 2;
  }
  
  .map-container {
   
    z-index: 1002;
  }
}

@media (max-width: 992px) {
  #agentBtn           { display: none; }

  .toolbar-thumb      {
    width: 48px;                /* tweak to taste */
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: #00000060;
    padding: 4px;
    cursor: pointer;
    transition: transform .2s;
  }
  .toolbar-thumb:hover{ transform: scale(1.05); }

  
body.popup-open { overflow:hidden; }
:root{
    --toolbar-h: 60px;  
                    /* height of the bottom bar  */
}

:root{ --marker-size: 14px; }   /* pick the size you like */

 

#mapContainer {
   touch-action: none;    /* prevent native overscroll / pinch */
  overflow: hidden;      /* keep content clipped */
  position: relative; 
}
.video-modal{
  position: fixed !important;  /* you already set this in JS */
  inset: 0;
  z-index: 12000 !important;   /* > 11000 toolbar */
}
    #userInfo span{         /* first <span> is the e-mail */
        display:none!important;
    }
    #userInfo{ display:none!important; }

  /* 0) master container becomes vertical */
  .tactical-map-container   { flex-direction: column; }

  /* 1) main map takes 80 % of the height */
  .map-container{
    height: calc(100dvh - var(--toolbar-h) - env(safe-area-inset-bottom));
    flex: 1 1 auto;                     /* grow to fill vertical space   */
    
}
.main-content{overflow: visible;}
/*  B.  Show the whole image instead of cropping it                     */
#currentMap{
  width: 100%;
  height: 100%;
  object-fit: contain;         /* show the whole image */
}
body{
  /* Reserve the exact same amount that the bar occupies */
  padding-bottom: calc(var(--toolbar-h) + env(safe-area-inset-bottom));
}
.mobile-toolbar{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--toolbar-h);
  inset: auto 0 0 0;
  display: flex;
  gap: 0;
  justify-content: space-evenly;
  align-items: center;
  padding-bottom: calc(env(safe-area-inset-bottom) + 0px);
  background: rgb(247, 186, 255);               /* keep your colour scheme */
  border-top: 1px solid #3f3f46;
  padding: .75rem 1rem;
  z-index: 11000;                   /* above the map */
}
.mobile-toolbar .auth-btn{
  margin-left:auto;              /* sticks to the far right */
  padding:.45rem 1rem;
  font-size:.85rem;
  background:#4B0082;
  color:#fff;
  border:none;
  font-size: 0;
  border-radius:8px;
}
.mobile-toolbar #timeBtn {
  /* same flex/width/height as .tool items */
  flex: 0 0 56px !important;
  width: 56px !important;
  height: 56px !important;

  /* restore circle shape */
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 0;          /* keep the label visually hidden */
  position: relative;    /* for its ::before icon */
}
.mobile-toolbar #timeBtn::before {
  content: "";
  /* make the pseudo exactly fill the button */
  display: block;
  width: 24px;
  height: 24px;
  margin: auto;
  margin-top: calc((56px - 24px) / 2); /* vertically centered */
  background: url('attack.png') no-repeat center center;
  background-size: contain;
}
.mobile-toolbar 
.auth-btn#logoutBtn{ background:#c03b3b; }


.user-controls{
  position:fixed;    /* anchor inside .mobile-toolbar            */
  bottom: auto;           /* tweak to taste                           */
    right:10px;
    top:10px;     /* override its previous fixed coords       */
    margin-left:auto;         /* pushes it to the far right      */
    display:flex;
    gap:.4rem;
    align-items:center;
    gap:10px;
    z-index:9999;             /* above bar background, below map          */
}

/* optional – hide the email / crown text on tiny screens                */
#userInfo{display:none;}

/* make the buttons a bit smaller so they fit nicely                     */
#loginPageBtn,
  #logoutBtn{
      font-size:.85rem;
      padding:.45rem 1rem;
}


/* optional – keep the logout circle red                                  */


.mobile-toolbar .tool,
.mobile-toolbar .toolbar-thumb,
.mobile-toolbar .auth-btn{ /* the <img>s    */
  flex: 0 0 56px;           /* stop stretching to 1/3 width */
  width: 56px;
  height: 56px;
                 /* tweak to taste */
    
    aspect-ratio: 1 / 1;        /* keeps them perfectly round */
    border-radius: 50%;
    padding: 0;
    overflow: hidden;           /* crop any overspill */
    display: flex;              /* centre icons/text */
    align-items: center;
    justify-content: center;
}
  .mobile-toolbar .toolbar-thumb{
    background:rgb(0, 0, 0);       /* optional glow behind the icon */
}
  #timeBtn{
    font-size: 0;               /* hide the “Timeframes” label */
}
#timeBtn::before {
  /* remove the old emoji */
  content: "";
  /* size to taste */
  display: block;
  width: 56px;
  height: 40px;
  margin: 0 auto;
  background: url('time.png') no-repeat center center;
  background-size: contain;
}
#mapThumb,
#agentThumb{
  object-fit: cover;            /* crop instead of letter‑boxing   */
  transform: scale(1.15);     /* slight extra zoom inside circle */
}
/* Popup Styling for Map Selection */
.map-selection-popup {
  inset: 0;     
  touch-action: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  background: rgba(0,0,0,.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  bottom: var(--toolbar-h);
  justify-content:center;
  padding: 20px;
  z-index: 10001;
}
@keyframes popupFadeIn {
  0%   { opacity:0; transform:scale(.92); }
  100% { opacity:1; transform:scale(1);   }
}

.map-selection-popup.fade-in {  animation: popupFadeIn .35s ease-out forwards;}

.agent-overlay.fade-in  { animation: popupFadeIn .35s ease-out forwards; }
.map-selection-popup .all-maps-grid {
  
  background: #000;
  gap:16px; 
  margin: 0 auto;
  width: 100%;
  position:static;
  top:auto; left:auto;  /* (harmless – but keeps dev‑tools tidy) */
  margin-top:20px; 
  max-width:380px;  
  margin-inline: auto;
}
.all-maps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin-top: 20px;
}

.all-maps-grid button {
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.all-maps-grid img {
  border-radius: inherit;
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.all-maps-grid button:hover img {
  transform: scale(1.1);
}

/* Close Button */
.close-maps-popup {
  display:none !important;
 
}
.close-maps-popup:hover {
  background-color: #3a006e;
}
#timeframeOverlay{
  
  position:fixed;
  inset:0;
  left: 0;
    right: 0;
  bottom:var(--toolbar-h);
  background:rgba(0,0,0,.9);
  z-index:10001;
  top: auto;                 /* ← override the old “top:0 / inset:0” */
  height: auto;   
  
  border-top: 1px solid #3f3f46;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  border-top-left-radius: 12px;

  display: flex;             /* keep your flex layout */
  
  justify-content: center;   /* vertical centring no longer needed */
  align-items: center;
  overflow-y: visible;   
  display:flex;
  flex-direction:column;
  
  
  
  
}

#timeframeOverlay .timeframe-select{
  width:100%;
  max-width: 420px;
    margin: 0 auto;      /* nice narrow column */
}

#timeframeOverlay .close-timeframe{
  display: none;
  position:fixed;
  top:12px; right:16px;
  font-size:2.4rem;
  line-height:1;
  color:#fff;
  background:none;
  border:none;
}

  .sidebar                  { display:none; }
}

#agentOverlay{
  display:none;                   /* toggled by JS                         */
  position:fixed;
  flex-direction:column;
  inset:0;        
  top:0; left:0; right:0;
  bottom:var(--toolbar-h);                 /* full screen                           */
  background:rgba(0,0,0,.9);
  z-index:10001;                  /* above toolbar & map                   */
  flex-direction:column;
  /* lay out its children */
  justify-content:center;
  align-items:center;
  overflow-y:auto;
  padding:3.5rem 1rem 1rem;       /* leave room for close-btn & notch */
}

/* move the grid nicely */
#agentOverlay .agent-grid{
  width:100%;
  max-width:560px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:.75rem;
}

/* close “×” button */
#agentOverlay .close-agent{
  position:fixed;
  top:12px; right:16px;
  font-size:2.4rem;
  line-height:1;
  color:#fff;
  background:none;
  border:none;
  z-index:10002;
  display:none !important;
}


@media (min-width: 993px) {
  .mobile-toolbar { display:none; }   /* no bottom bar on widescreens */
}
.user-controls{
  position: fixed;
  top: 10px;
  right: 10px;
  display:flex;
  gap:10px;
  z-index:9999;
}
.close-timeframe,   /* inside #timeframeOverlay  */
  .close-agent,       /* inside #agentOverlay      */
  .close-maps-popup { /* inside #mapSelectionPopup */
    display: none !important;
  }

.tour-prompt-backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.8);
  display:flex; align-items:center; justify-content:center;
  z-index:14000;
  animation:fadeIn .3s ease-out forwards;
}
@keyframes fadeIn{from{opacity:0} to{opacity:1}}

.tour-prompt{
  background:#fff; color:#111;
  padding:28px 36px;
  border-radius:14px;
  max-width:340px; width:90%;
  text-align:center; font-family: Poppins, sans-serif;
  box-shadow:0 12px 32px rgba(0,0,0,.45);
}

.tour-prompt h2{margin:0 0 22px; font-size:22px; font-weight:600;}

.tour-prompt .btn{
  border:none; border-radius:8px;
  padding:9px 22px; font-size:15px; font-weight:600;
  cursor:pointer; transition:filter .25s;
}
.tour-prompt .btn-skip{background:#e5e5e5; color:#444; margin-right:12px;}
.tour-prompt .btn-yes {background:#4B0082; color:#fff;}
.tour-prompt .btn:hover{filter:brightness(1.08);}
.introjs-tooltip,
.introjs-tooltip-title,
.introjs-tooltip *:not(.introjs-button) {   /* exclude the yellow buttons */
  color:#000 !important;
}

.introjs-overlay { z-index: 13000 !important; }
 
 

 .introjs-helperLayer{        /* yellow ring */
  background: transparent !important;
  
  border-radius: 12px !important;
  z-index: 13001 !important;
}

 .introjs-tooltip{
  background:var(--violet-dk);
  color:#fff;
  border:1px solid var(--violet-lt);
  border-radius:16px;
  box-shadow:0 10px 24px rgba(0,0,0,.35),
             inset 0 0 0 1px rgba(255,255,255,.70);
  padding:20px 26px 24px;
  font-family:"Poppins",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,
              Oxygen,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;
  line-height:1.5;
  font-size:16px;
   z-index: 1300 !important;
}
.introjs-tooltip::before{
  content:"";
  position:absolute;
  inset:-1px -1px auto -1px;          /* stick to top & sides */
  height:16px;
  background:linear-gradient(135deg, var(--violet-lt), #7928ca);
  border-top-left-radius:inherit;
  border-top-right-radius:inherit;
}

.introjs-tooltip-title{
  margin:8px 0 12px;
  font-size:20px;
  font-weight:600;
  color:var(--yellow);
}

/* ‣ Arrow that points to the element */
.introjs-arrow.top    { border-top-color:   var(--violet-dk) !important; }
.introjs-arrow.bottom { border-bottom-color:var(--violet-dk) !important; }
.introjs-arrow.left   { border-left-color:  var(--violet-dk) !important; }
.introjs-arrow.right  { border-right-color: var(--violet-dk) !important; }

/* ‣ Next / Back / Done buttons */
.introjs-button{
  background:var(--yellow);
  color:var(--violet-lt);
  font-weight:600;
  padding:6px 18px;
  border:none;
  border-radius:8px;
  transition:filter .25s;
}
.introjs-button:hover{ filter:brightness(1.1); }

.introjs-prevbutton{ margin-right:10px; }  /* small spacing */
.introjs-skipbutton{ display:none !important; } 
/* ‣ Skip link (top-right)  */
.introjs-skipbutton,

.introjs-skipbutton:hover {
  background: none;
  color: #ccc;
  font-size: 14px;
}

/* ‣ Highlight ring around the target element */


/* ‣ Dimmed overlay */
.introjs-overlay{
  /* ✨ DON’T force a full-screen size here – remove width/height/top/left */

  background: rgba(0,0,0,) !important;   /* nice deep dim */
               /* optional soft blur */
  opacity: 1 !important;                    /* make sure it isn’t 0 */
  z-index: 12998 !important;                /* still below ring & tooltip */
}

/* Optional: make the bullets in the step-progress bar yellow */
.introjs-bullets a { background:#4b4b4b; }
.introjs-bullets li a.active,
.introjs-bullets li a:hover{
  background:var(--yellow);
}

.step-map.introjs-tooltip{
  /* 1 – tighten the internal padding: keep top roomy, cut bottom to 6 px */
  padding-block: 14px 6px !important;     /* top 14 px   bottom 6 px */

  /* 2 – (optional) nudge the whole box upward 12 px so the arrow sits closer */
  transform: translateY(-12px);
}

/* 3 – close up the gap above the NEXT/BACK buttons */
.step-map .introjs-tooltipbuttons{
  margin-top: 2px;                         /* default is ~15 px */
}
.introjs-tooltip       { font-size: 20px !important; }   /* body text  */
.introjs-tooltip-title { font-size: 26px !important; }  


.ad-wrapper{
  position: absolute;
  top: 50%;                 /* vertically centre on the map */
  right: 0;                 /* hug the right edge */
  transform: translateY(-50%);
  width: 270px;             /* 250 ad + 10-px padding both sides */
  pointer-events: auto;     /* make sure the ad is clickable */
  z-index: 2000;            /* above the map but below modals/toolbars */
}


.ad-slot{
  flex: 0 0 270px;            /* 250-px creative + 20-px breathing room   */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.ad-box{
  width: 200px;
  height: 700px;
  background:#222 url('https://via.placeholder.com/250x300?text=AD') center/cover no-repeat;
  border: 2px solid var(--violet-lt);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0,0,0,.45);
  overflow: hidden;
  z-index: 2000;
   display: none !important;
}
.ad-slot.fixed {
  position: fixed;              /* take it out of the flex row      */
  top: 50%;                     /* halfway down the screen          */
  right: 0;                     /* hug the right edge               */
  transform: translateY(-50%);  /* perfect vertical centring        */

  width: 300px;                 /* same size as the creative        */
  height: 250px;
  z-index: 2000;                /* in front of map & sidebar        */

  /* optional cosmetics while the real ad hasn't loaded yet */
  background: #222 url('https://via.placeholder.com/300x250?text=AD') center/cover no-repeat;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0,0,0,.45);
}
@media (max-width: 992px){
  .ad-wrapper{ display: none; }
}
/* STEP-2-D  – optional: hide ad on small screens */
@media (max-width:992px){
  .ad-slot{ display:none; }
}
@media (max-width: 992px) {
  .ad-slot.fixed { display:none; }
}
/* Adjusted Help Button */
/* Make sure the Help button stays outside the sidebar */
.help-btn {
  position: fixed;             /* Fixes it to the screen */
  top: 12px;                   /* 12px from the top of the screen */
  right: 420px;                /* Place it just outside the sidebar (sidebar width is 400px + 20px for margin) */
  background-color: #4B0082;   /* Background color */
  color: white;                /* Text color */
  padding: 10px 20px;          /* Padding */
  border-radius: 5px;          /* Rounded corners */
  font-size: 1rem;             /* Font size */
  cursor: pointer;            /* Pointer cursor on hover */
  z-index: 15000;              /* Ensure it stays on top of other content */
  transition: background-color 0.3s ease, transform 0.2s ease;
 margin-left: 80px;
}

/* Hover effect for Help Button */
.help-btn:hover {
  background-color: #3a006e;  /* Darken on hover */
  transform: scale(1.05);      /* Slightly enlarge on hover */
}

/* Mobile styling (if needed to hide it) */
@media (max-width: 992px) {
  .help-btn {
    display: none; /* Optionally hide it on mobile if not needed */
  }
}

/* sidebar is already `position: relative;` in your CSS – perfect */
/*  DESKTOP  ──────────────────────────────────────────────── */
.sidebar .help-btn{
  position:absolute;
  top:12px;
  left:100%;
  margin-left:12px;

  /* remove the old width rule */
  /* width:clamp(90px,25%,140px);   ← delete this line */

  /* let the text decide the size */
  width:auto;               /* defaults to “shrink‑to‑fit” */
  min-width:90px;           /* ↑ optional floor so it never gets too tiny */

  background:#4B0082;
  color:#fff;
  border:none;
  border-radius:6px;
  padding:.55rem 1.1rem;
  font-weight:600;
  cursor:pointer;
  transition:background .25s, transform .2s;
  z-index:12000;
}
.sidebar .help-btn:hover{
  background:#3a006e;
  transform:scale(1.05);
}

/*  MOBILE  ───────────────────────────────────────────────── */
@media (max-width:992px){
  .sidebar .help-btn{ display:none; }   /* sidebar is hidden on phones */
}
.agent-heading{
  margin:0 0 .75rem;
  font-size:1rem;          /* 16 px = comfortable line height */
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.4px;
 text-shadow:0 1px 2px #000;
  color:#fff;
  pointer-events:none;     /* label never blocks clicks */
}
.timeframes-heading{
  
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #fff;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;      /* never blocks clicks */
}
/* position the bar and keep it readable */
.ad-box{ position:relative; }

/* ── tiny header strip ────────────────────────────── */
.ad-bar{
  position:absolute;   /* float on top of the ad */
  inset:0 0 auto 0;    /* stick to the top edge */
  height:28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 8px;       /* left / right breathing room */
  background:rgba(0,0,0,.65);
  font:600 12px/1 sans-serif;
  color:#fff;
  z-index:2;           /* above the creative */
}

.ad-label{ text-transform:uppercase; letter-spacing:.4px; }

/* link looks like a button but stays a real anchor */
.remove-ads-btn{
  color:#f3e462;
  text-decoration:none;
  font-size:11px;
}
.remove-ads-btn:hover{
  color:#fff;
  text-decoration:underline;
}

/* push the creative down so the bar doesn’t cover it */
.ad-box ins.adsbygoogle{ display:block; margin-top:28px; }

.video-modal { z-index: 15000 !important; }
/* Ko-fi top-center placement */
.kofi-top-center{
  position: fixed;
  top: 10px;                       /* space from top */
  left: 57%;
  transform: translateX(-50%);
  z-index: 12050;                  /* above user-controls(9999) / toolbar(11000) */
  pointer-events: auto;

}

/* Keep it clear of notches and your fixed bars on phones */
@media (max-width: 992px){
  .kofi-top-center{
    top: calc(env(safe-area-inset-top) + 10px);
  }
}
