html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden; /* allow vertical scrolling if content needs it */
  font-family: "Lato", sans-serif;
  background: #ffffff; /* or your desired background */
}

/* Main map container */
#chartdiv {
  width: 100%;
  height: 100dvh; /* fill the visible vertical height */
  margin: 0 auto; /* center horizontally */
  background: transparent;
  display: block;
  transition: all 0.3s ease; /* smooth resizing */
  overflow-y:hidden;
}




body {
  margin: 0;
  font-family: "Lato", sans-serif;
  font-size: 1em;
  background: url(../img/map-bg.jpg);
  background-repeat: no-repeat;
  background-size: 100vw 100vh;
  overflow-x: hidden;
  padding: 0;
}


@media screen and (orientation:portrait) { 
  .landscape-container{display:none;}
  .portrait-container{display: block;
  width:100vw;
height: 100vh;
background-color: #425563;
background-image: url(../img/device-mode.png);
background-size: cover;
background-position: center;}
}

@media screen and (orientation:landscape) { 
  .landscape-container{display:block;}
  .portrait-container{display: none;}
}

.blocker{
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0);
  width: 100%;
  height: 100%;
  z-index: 0;
  display: none;
}

a{
  color: #3f5563;
}

.lato-thin {
  font-family: "Lato", serif;
  font-weight: 100;
  font-style: normal;
}

.lato-light {
  font-family: "Lato", serif;
  font-weight: 300;
  font-style: normal;
}

.lato-regular {
  font-family: "Lato", serif;
  font-weight: 400;
  font-style: normal;
}

.lato-bold {
  font-family: "Lato", serif;
  font-weight: 700;
  font-style: normal;
}

.lato-black {
  font-family: "Lato", serif;
  font-weight: 900;
  font-style: normal;
}

.lato-thin-italic {
  font-family: "Lato", serif;
  font-weight: 100;
  font-style: italic;
}

.lato-light-italic {
  font-family: "Lato", serif;
  font-weight: 300;
  font-style: italic;
}

.lato-regular-italic {
  font-family: "Lato", serif;
  font-weight: 400;
  font-style: italic;
}

.lato-bold-italic {
  font-family: "Lato", serif;
  font-weight: 700;
  font-style: italic;
}

.lato-black-italic {
  font-family: "Lato", serif;
  font-weight: 900;
  font-style: italic;
}

p, li{
  line-height: 1.4em;
}

h2{
  color: #425563;
  font-weight: 300;
  font-style: normal;
  margin-top: 1.5em;
  margin-bottom: 1em;;
}

.dragMessage{color: #5c778b;
display: block;
padding: 30px;
text-transform: uppercase;
font-weight: bold;
font-size: 0.8em;
position: absolute;
bottom: 0px;
align-items: center;

}

.dateStamp{color: #5c778b;
  display: block;
  padding: 30px;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 0.8em;
  position: absolute;
  top: 0px;
  align-items: center;
  
  }

.dragMessage img{
  width:30px;
  vertical-align: middle;
  margin-top: -5px;
  margin-right: 5px;
}




#startPane {
  position: absolute;
  width: 50%;
 height: 100vh;
  border-radius: 0px 10px 10px 0;
  color: #FFF;
  background-color: #425563;
  border: 1px solid #425563;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
  overflow-y: auto;

}

.start-content{
  width:75%;
  height: 50%;
  padding-bottom: 50px;
  position: absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  margin: auto;
}

.start-content h1{
 font-size: 2.5em;
 font-weight: 100;
 margin-top: 0;
}
.start-content p{
  font-size: 1em;
  line-height: 1.5em;
  font-weight: lighter;
  margin-bottom: 30px;
 }
 .btn-light{
  background-color: #DDD;
  color: #425563;
  font-size: 1em;
  font-weight: lighter;
  padding: 10px 20px 10px 20px;
  border-radius: 6px;
  border:#425563 solid 1px;
  cursor: pointer;
 }


 button.navBtn{
  background-color: #FFF;
  color: #425563;
  font-size: 1em;
  font-weight: lighter;
  border-radius: 6px;
  border:#c5ced5 solid 1px;
  margin: 3px;
  line-height: 30px;
  cursor: pointer;
 }

 .btnActive{
  background-color: #DDD !important;
  border:#a9b1b7 solid 1px !important;
 }


 .btn-dark{
  background-color: #425563;
  color: #FFF;
  font-size: 1em;
  font-weight: normal;
padding-left: 20px;
padding-right: 20px;
  border-radius: 6px;
  border:#425563 solid 1px;
  margin-left: 5px;
  margin-right: 5px;
  
  line-height: 40px;
  cursor: pointer;
 }





 button img{
  width: 30px;
  height: 30px;
  position: relative;
  float: right;
  top:5px;
  margin-left: 10px;
  margin-right: -10px;
 }

 button.navBtn img{
  width: 15px;
  height: 15px;
  position:inherit;
  float: none;
  margin: 0px;
  margin-top: 10px;
  margin-left: 5px;
  margin-right: 5px;

 }

/* Style for the buttons */
.button-container {
  position: absolute;
  top: 45px;
  right: 45px;
  display: flex;
  flex-direction: column;
}


.button-container button img {
  top:0;
}

/* Ensure the button is relatively positioned */
.button-container button {
  position: relative;
}

/* Tooltip box positioned to the left of the button with space for the arrow */
.button-container button::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);  /* tooltip box sits 10px to the left of the button */
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.8em;
  line-height: 1.5em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

/* Tooltip arrow attached to the tooltip box */
.button-container button::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% + 5px);  /* arrow is 5px closer to the button than the tooltip box */
  transform: translateY(-50%);
  /* Create a triangle pointing right (its tip toward the button) */
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.75);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 9;
}

/* Show tooltip and arrow on hover */
.button-container button:hover::after,
.button-container button:hover::before {
  opacity: 1;
}





/* Modal popup styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  
}



.modal-content {
  background-color: white;
  position: absolute;
  left:0;
  right: 0;
  top:0;
  bottom: 0;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 10px;
  width: 550px;
  height:180px;
  text-align: center;
  animation: fadeIn; /* referring directly to the animation's @keyframe declaration */
  animation-duration: 1s; /* don't forget to set a duration! */
}

.close {
  color: #aaa;
  position: absolute;
  top:10px;
  right:20px;
  font-size: 28px;
  font-weight: bold;
}

.close-help{

  color: #aaa;
 float: right;
 margin-right: -15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Layers toggle menu */
.layers-menu {
  position: absolute;
  top: 80px;
  right: 100px;
  width:480px;
  background-color: white;
  border: 1px solid #ccc;
  padding: 30px;
  border-radius: 10px;
  display: none;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  animation: fadeIn; /* referring directly to the animation's @keyframe declaration */
  animation-duration: 1s; /* don't forget to set a duration! */
}

.layers-sections{  position: absolute;
  top: 40px;
  right: 100px;
  width:330px;
padding-top: 30px;
padding-bottom: 30px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  display: none;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  animation: fadeIn; /* referring directly to the animation's @keyframe declaration */
  animation-duration: 1s; /* don't forget to set a duration! */}

  .layers-sections a{
    width: 79%;
    display: inline-block;
    text-decoration: none;
    line-height: 2em;
    color: #425563;
    border: 1px solid #EEE;
    padding-left: 10%;
    padding-right: 10%;
    cursor: pointer;
  }
  .layers-sections a:hover{
    background-color: #EEE;
  }
  .layers-sections p{
    padding-left: 10%;
    margin-top: 0;
  }

.layers-menu label {
  margin: 5px;
  font-size: 1em;
  line-height: 1.8em;
}
.layers-menu p{margin-top: 0;}

/* Tour pop-up styling */
.tour-popup {
  display: none;
  position: absolute;
  top:0;
  left:0;
  width: 50%;
  height: 100%;
  border-radius: 0px 10px 10px 0;
  color: #425563;
  background-color: #FFF;
  z-index: 10;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

.tour-popup h3 {
  margin-top: 0;
  font-weight: 400;
  font-size: 2em;
}

.tour-popup h4 {
  margin-top: 0;
  font-weight: 400;
  font-size: 1.3em;
}

.tour-popup .controls {
  width: 97%;
  margin-top: 10px;
  padding-left: 10px;
  height:50px;
  padding-top: 5px;
}



#nextBtn, #prevBtn{float:right;}

.tourBody{
  padding:60px;
  /* border: #888 1px solid; */
  overflow-y: scroll;
  height: calc(100% - 195px);
}


 /* Sanctions pop-up styling */
 #sanctionsPopup {
  display: none;
  position: absolute;
  
  bottom: 0;
  left: 50;
  top:0;
  margin: auto;
  margin-left: 50px;
  width: 400px;
  max-height: 500px;
  background-color: white;
  border: 1px solid #ccc;
  padding: 40px;
  border-radius: 10px;
  display: none;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);

}
#sanctionsText{
  height: 90%;
  margin-bottom: 40px;
  overflow: auto;
}

#NoSanctionsPopup {
  display: none;
  position: absolute;
  
  bottom: 50px;
  left: 50px;
  width: 500px;
  max-height: 200px;
  padding: 20px;
  border-radius: 10px;
  color: #FFF;
  background-color: #425563;
  border: 1px solid #425563;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);


}

#SDNtext, #FTOtext {
  display: none;
  position: absolute;
  
  top: 50px;
  left: 50px;
  width: 450px;
  max-height: 400px;
  padding: 20px;
  padding-bottom: 40px;
  border-radius: 10px;
  color: #FFF;
  background-color: #425563;
  border: 1px solid #425563;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);


}

#SDNtext a, #FTOtext a{
  color: #FFF;
}

#sanctionsPopup .closePopup{
  color: #BBB;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: transparent ;
  border: none;
  padding: 0;
  margin-top: -30px;
  margin-right: -20px;
}

.DivBounceIn{
  animation: bounceInLeft; /* referring directly to the animation's @keyframe declaration */

  animation-duration: 1s; /* don't forget to set a duration! */
}
.FadeUpIn{
  animation: fadeIn; /* referring directly to the animation's @keyframe declaration */

  animation-duration: 1s; /* don't forget to set a duration! */
}

.slideTourIn{
  animation: slideInLeft; /* referring directly to the animation's @keyframe declaration */

  animation-duration: 1s; /* don't forget to set a duration! */
}


#sanctionsPopup h3, #NoSanctionsPopup h3 {
  margin-top: 0;
}


#NoSanctionsPopup .closePopup, #SDNtext .closePopup, #FTOtext .closePopup {
  color: #BBB;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: transparent ;
  border: none;
  padding: 0;
  margin-top: -10px;
}


#sanctionsPopup .closePopup:hover, #NoSanctionsPopup .closePopup:hover  {
  color: #AAA;
}
#startBtn{margin-bottom: 50px;}

/* Fullscreen overlay */
#navInstructionsOverlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* 30% black background */
  z-index: 100; /* Make sure it's above other content */
  align-items: center;
  justify-content: center;
}

/* Use Flexbox to center the instructions box */
#navInstructionsOverlay.overlay {
  display: flex;
}

/* Centered instructions box */
#navInstructionsOverlay .instructions-box {
  background: #fff;
  padding: 20px 40px 60px 40px;
  border-radius: 8px;
  max-width: 50%;
  text-align: left;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#navInstructionsOverlay .instructions-box p{
  line-height: 1.4em;
  vertical-align: middle;
}

#navInstructionsOverlay .instructions-box img{width:36px; height: 36px; float: left; margin-right: 15px; vertical-align: middle;}

/* Optional: Style the checkbox label */
#navInstructionsOverlay .instructions-box label {
  display: block;
  margin-top: 15px;
  font-size: 0.9em;
  cursor: pointer;
}
.help-item{
  padding: 5px 0 5px 0px;
  border-top: 1px #5c778b solid;
}


/* Container for the switch */
.switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  
}

/* Hide the default checkbox */
.switch input {
  display: none;
}

/* The slider */
.slider {
  display: inline-block;
  position: relative;
  top:8px;
 left:-0;
  width: 50px;
  height: 24px;
  background-color: #DDD;
  border-radius: 24px;
  margin-right: 10px;
z-index: 5;
}

/* The circle inside the slider */
.slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: #333;
  border-radius: 50%;
  transition: transform 0.4s;
}

/* When checkbox is checked, change slider background and move circle */
.switch input:checked + .slider {
  background-color: #e38604;
}

.switch input:checked + .slider:before {
  transform: translateX(26px);
}

/* Optional label styling */
.switch-label {
  font-size: 1.2em;
  color: #333;
  display: inline-block;
  z-index: 1;
  margin-right: 10px;
 font-weight: bold;
}

.sanctions-tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  display: none;
  z-index: 1000;
}


/* On screens that are 992px or less */

@media screen and (max-width: 992px) {
  body {
    font-size: 0.75em;
  }
  .modal-content {
    width: 45%;
    height:130px;
  }
  #NoSanctionsPopup {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 200px;
    max-height: 100px;
    padding: 20px;
  }
  #sanctionsPopup {
    display: none;
    position: absolute;
    bottom: 0;
    left: 20px;
    top:0;
    margin: auto;
    margin-left: 50px;
    width: 300px;
    max-height: 200px;
    padding: 20px;
    border-radius: 10px;
 }

 #sanctionsPopup .closePopup{
  margin-top: -15px;
  margin-right: -10px;
}
.tourBody{
  padding:40px;
  /* border: #888 1px solid; */
  overflow-y: scroll;
  height: calc(100% - 140px);
}

.tour-popup {
  width: 55%;
}

.tour-popup .controls {
  width: 95%;
  margin-top: 10px;
  padding-left: 5px;
  height:30px;
  padding-top: 5px;
}

.layers-menu {
  width:250px;
  padding: 30px;
}
.layers-sections{  position: absolute;
  width:250px;
  padding-top: 20px;
  padding-bottom: 20px;
  }

  .controls button{
    line-height: 30px;
    padding-left: 15px;
    padding-right: 15px;
    
  }
  .controls button img{
    top:3px !important;
    width: 25px;
    height: 25px;
  }
  #navInstructionsOverlay{overflow: auto;}
  #navInstructionsOverlay .instructions-box {max-width:80%; height: 70%; overflow-y: auto;}
  h1{font-size:2em !important;}
  #startPane {

    width: 60%;
   height: 100vh;
  
  }
  #startBtn{margin-bottom: 100px; color:425563; font-weight: bold;}
  #startPane, #tourPopup {
    padding-left: env(safe-area-inset-left);
  }
  .tourBody{padding-left: 10px;}

}

/* On screens that are 720px or less */
@media screen and (max-width: 760px) {
  body {
    font-size: 0.75em;
  }
  .modal-content {
    width: 60%;
  }
  .button-container{top:10px;}
}

.am5-tooltip {
  background: rgba(0, 0, 0, 0.75) !important;
  color: #fff !important;
  border-radius: 4px !important;
  font-size: 0.8em !important;
  padding: 5px 8px !important;
  /* Ensure the tooltip text remains legible */
  pointer-events: none;
}





#spacer {
  height: 1px;
  width: 100%;
}