html, body {
    height: 100%;
    margin: 0;
}
body {
    display: flex;
    flex-direction: column;
}
.toggle-bar {
    padding: 10px;
    color:white;
}
.iframe-container {
    flex: 1;
    position: relative;
}
iframe {
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    width: 100%;
    height: 100%;
    display: none;
}
iframe.active {
    display: block;
}
.toggle-label {
    font-weight: bold;
    margin: 0 10px;
}
.navbar .btn svg {
    width: 27px;
    height: 27px;
}
.navbar .btn {
    padding: 0.25rem 0.5rem; 
}

@media (max-width: 767.98px) {
    .navbar .btn svg {
        width: 20px;
        height: 20px;
    }
    .navbar .btn {
        padding: 0.15rem 0.35rem;
    }
}

.tooltip {
    z-index: 9999 !important; 
  }
  
  #pageLoader {
    opacity: 1;
    transition: opacity 0.6s ease;
  }
  
  #pageLoader.fade-out {
    opacity: 0;
    pointer-events: none;
  }
  


/* BUTTONS */

.zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
  }
  
  .zoom-btn {
    width: 44px;
    height: 44px;
    background: rgb(20, 37, 60);
    border: 1px solid rgb(255, 255, 255);
    border-radius: 4px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
  }
  
  .zoom-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: black;
    border-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
  
  .zoom-btn:active {
    transform: scale(0.95);
  }
  
  /* Container for the globe */
  .cesium-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
  }
  
  .plot-button {
    position: relative;
    background: linear-gradient(145deg, 
        rgba(181, 196, 208, 0.5) 0%,
        rgba(0, 242, 254, 0.08) 35%,
        rgba(174, 222, 214, 0.7) 100%
    );
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 16px;
    color: #000000;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 1rem;
    transition: all 0.1s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    box-shadow:none;
  }
  
  .plot-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, 
        rgba(22, 52, 66, 0.337) 0%,
        rgba(0, 242, 254, 0.1) 35%,
        rgba(140, 212, 228, 0.5) 100%
    );
    opacity: 0;
    transition: opacity 0.1s ease;
    z-index: 1;
  }
  
  .plot-button::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #92e9b9e4 0%, 
        #6be3e7c2 25%, 
        #aff6ffde 50%, 
        #44dccfd4 75%, 
        #97bbdade 100%
    );
    background-size: 200% 200%;
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    animation: gradientShift 4s ease infinite;
    transition: opacity 0.1s ease;
  }
  
  @keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }
  
  .plot-button:hover {
    animation: pulseGlowTeal 2s ease-in-out infinite;
  }
  
  @keyframes pulseGlowTeal {
    0%, 100% {
      box-shadow: 
        0 0 4px rgba(0, 242, 254, 0.2),
        0 0 8px rgba(0, 242, 254, 0.15),
        0 0 12px rgba(0, 242, 254, 0.1);
    }
    50% {
      box-shadow: 
        0 0 6px rgba(0, 242, 254, 0.3),
        0 0 12px rgba(0, 242, 254, 0.2),
        0 0 18px rgba(0, 242, 254, 0.15);
    }
  }
  
  
  .plot-button:hover::before {
    opacity: 1;
  }
  
  .plot-button:hover::after {
    opacity: 1;
  }
  
  .plot-button:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  .plot-button span {
    position: relative;
    z-index: 2;
  }
  
  .paginate-btn{
    background-color: #fafafa;
    border: 1px solid #ced4da!important;
  }
  .paginate-btn:hover{
    background-color: #ecfcff;
  }

  

/* MENU */
.toolbar-container {
    position: fixed;
    top: 10px!important;
    left: 10px;
    display: inline-block;
    z-index: 9999;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    transition: width 1.5s ease, height 1.5s ease;
  }
  
  .menu-dock {
    position: absolute;
    top: 0px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10000;
    pointer-events: auto;
  }
  
  .menu-row {
    position: relative;
    display: flex;
    overflow: visible;
    align-items: flex-start;
  }
  
  .menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.08);
    transition: transform .08s ease, box-shadow .2s ease, background-color .2s ease;
  }
  
  .menu-btn.main-menu{
    background-size: 20px 20px;
    background-image: url('/data_service/models_compass/utils/menu-maximise.svg');
  }
  .menu-btn.is-active.main-menu{
    background-size: 20px 20px;
    background-image: url('/data_service/models_compass/utils/menu-minimise.svg');
  }
  
  .menu-btn.swarm{
    background-size: 25px 25px;
    background-image: url('/data_service/models_compass/utils/satellite-maximise.svg');
  }
  .menu-btn.is-active.swarm{
    background-size: 25px 25px;
    background-image: url('/data_service/models_compass/utils/satellite-minimise.svg');
  }
  
  .menu-btn.legend{
    background-size: 25px 25px;
    background-image: url('/data_service/models_compass/utils/info-maximise.svg');
  }
  .menu-btn.is-active.legend{
    background-size: 25px 25px;
    background-image: url('/data_service/models_compass/utils/info-minimise.svg');
  }
  
  
  .menu-btn:hover {
    background-color: #f7f7f7;
    box-shadow: 0 6px 12px rgba(0,0,0,0.18), 0 3px 6px rgba(0,0,0,0.10);
  }
  
  .menu-btn:active {
    transform: scale(0.97);
  }
  
  .menu-panel {
    position: absolute;
    top: 0;         
    left: 54px;              
    width:auto;
    min-width:clamp(100px,60vw, 600px)!important;
    max-width: calc(100vw - 70px)!important;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    transition: opacity .2s ease, transform .2s ease;
    word-wrap: break-word;  
  }


  #menuPanel1{
    top:0px;
  }
  #menuPanel1::after {
    top: 13px !important;
  }
  #menuPanel2{
    top:-50px;
  }
  #menuPanel2::after {
    top: 63px !important;
  }
  #menuPanel3{
    top:-100px;
  }
  #menuPanel3::after {
    top: 113px !important;
  }

  .menu-panel.blur-bg {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(4px) !important;
  }
  
  .menu-panel.blur-bg::after {
    border-right-color: rgba(255, 255, 255, 0.6) !important;
  }
  
  .menu-panel.blur-bg-subtle {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(4px) !important;
  }
  
  .menu-panel.blur-bg-subtle::after {
    border-right-color: rgba(255, 255, 255, 0.75) !important;
  }
  
  .menu-panel::after {
    content: '';
    position: absolute;
    left: -8px; 
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 9px solid #fff;
    z-index: 99999!important;
  }
  
  
  .menu-panel .panel-close {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border: none!important;
    background: no-repeat center / 18px 18px url('/data_service/models_compass/utils/menu-minimise-gold.svg');
    background-color: none!important;
    cursor: pointer;
    transition: all .2s ease;
  }
  
  .menu-panel .panel-close:hover {
    background: no-repeat center / 16px 16px url('/data_service/models_compass/utils/menu-minimise.svg');
  }
  
  .menu-panel.is-open {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
  
  .menu-panel:not(.is-open) {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
  }
  

.input-group .form-control {
  max-width: 100%;
  box-sizing: border-box;
}

.input-group .col-8 {
  padding-left: 0;
  padding-right: 0;
}

.input-group .btn {
  width: 100%;
}

/* Remove native styling on iOS */
input[type="datetime-local"] {
  -webkit-appearance: none; /* iOS Safari */
  -moz-appearance: none;
  appearance: none;

  max-width: 100%;
  box-sizing: border-box;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  text-align: center;

  overflow: hidden;           /* Needed for ellipsis */
  white-space: nowrap;         /* Prevent line breaks */
  text-overflow: ellipsis;     /* Show "..." when content overflows */
}


/* Custom CSS for select options */
.dropdown-menu {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 0px;
  width: auto;
  min-width: 100%;
}

.dropdown-toggle {
  width: 100%;
  text-align: left;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  background-color: #fff;
  color: #495057;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
}

.dropdown-toggle::after{
  position:absolute;
  right:10px;
  top:45%;
}

.dropdown-toggle:focus {
  border: 2px solid #9fdbdb!important;
  outline: 0;
  box-shadow: 0 0 0 0.5rem rgba(180, 228, 230, 0.85);
}

.dropdown-menu a {
  cursor: pointer;
}

.dropdown-menu a:hover {
  color:white;
  background-color: #162637;
}

.form-control-dropdown .dropdown-toggle {
  height: calc(1.5em + 0.75rem + 2px);
}