.hoverlayer .hovertext {
    z-index: 9999 !important;
}

/* Alternative targeting if the above doesn't work */
.plotly .hoverlayer {
    z-index: 9999 !important;
}

/* For mapbox hover specifically */
.mapboxgl-popup {
    z-index: 9999 !important;
}

/* Nudge the map colorbar title down (desktop and mobile) */
.choropleth-figure .cbtitle {
    translate: 0 5px;
}

.region-msa-toggle {
    margin-bottom: -65px;
}

@media (max-width: 768px) {
    .region-msa-toggle {
        margin-bottom: 0px;
    }
}


/* --------------------------------------------
   INTRO NAV CARD RULES FOR XL SCREEENS 
--------------------------------------------- */
/* Media query for large screens */
@media (min-width: 2219px) {
    .navigation-card-grid .mantine-Grid-inner {
        flex-wrap: nowrap !important;
        gap: 40px;
    }

    .navigation-card-grid-col {
        flex: 0 0 400px !important;
        max-width: 400px !important;
        padding: 0 !important;
        width: 400px !important;
    }

    #image-container { /* DIV containing everything*/
    height: 340px !important;
  }

  #banner-image { 
    height: 340px !important; 
    object-position: left 33% !important;
    transform: none !important;
  }

  #banner-overlay { /* DIV wrapper that contains text and buttons*/
    top: 50px !important;
  }
}

/* --------------------------------------------
   INTRODUCTION FOR MEDIUM SCREENS
--------------------------------------------- */
@media (min-width: 1162px) and (max-width: 1455px) {

  #banner-overlay { /* DMC button and link*/
    top: -25px !important;
  }
}

/* --------------------------------------------
   INTRODUCTION FOR SMALL SCREENS
--------------------------------------------- */
@media (min-width: 769px) and (max-width: 1161px) {
  #image-container { /* DIV containing everything*/
    display: flex !important; 
    flex-direction: column !important;
    position: relative !important; /* Positions itself relative to parent container. 
                                    Creates "boundary box" for child elements */
    width: 100vw !important;
    height: auto !important;
    overflow: hidden;
  }

  #banner-image { 
    width: 100% !important;
    height: 240px !important; 
    object-fit: cover;
  }

  #banner-overlay { /* DIV wrapper that contains text and buttons*/
    position: static !important; /* Must be static so the title escapes it and also pushes everything else down */
    inset: auto !important;
    padding: 20px !important;
    margin-top: 0 !important;
    margin-bottom: -20px !important;
  }

  #banner-content { /* Controls Stack*/
    position: static !important; 
    width: 100% !important; /* Uses full screen length */
    transform: none !important;
  }

  #banner-title { /* INFRASTRUCTURE PIPELINE Title */
    position: absolute !important; /* Escapes overlay and places itself at absolute coords */
    top: 125px !important;  
    left: 20px !important; 
    font-size: 35px !important;
    /* max-width: calc(100% - 40px) !important; */
    max-width: 45% !important;
    z-index: 10;
  }

  #banner-description { /* Pipeline description */
    font-size: 16px !important;
    line-height: 1.35 !important;
    max-width: calc(100% - 80px) !important;
    margin-top: 0 !important; 
  }

  #banner-actions { /* DMC button and link*/
    margin-top: 16px !important;
  }
}

/* --------------------------------------------
   INTRODUCTION FOR SMALL-MEDIUM SCREENS
--------------------------------------------- */

@media (min-width: 992px) and (max-width: 1161px) {
    #banner-title { /* INFRASTRUCTURE PIPELINE Title */
    font-size: 40px !important;
    max-width: 45% !important;
    top: 85px !important; 
  }
}


    
/* --------------------------------------------
   INTRODUCTION NAV CARD RULES
--------------------------------------------- */

.navigation-card,
.navigation-link {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.navigation-link {
    display: block;
}

.navigation-card:hover,
.navigation-link:hover {
    transform: scale(1.03);
}

.navigation-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.navigation-card:active,
.navigation-link:active {
    transform: scale(0.97);
}

.navigation-card:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


/* --------------------------------------------
   ANIMATIONS
--------------------------------------------- */

/* Keyframes for fade-in-up animation */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Fade-in animation for elements */
.fade-in,
.navigation-card-grid-col,
.intro-iframe-content {
  animation: fade-in-up 0.6s ease-out both;
}

/* Animation delays for navigation card grid columns and intro iframe content */
.navigation-card-grid-col:nth-of-type(1) { animation-delay: 0.15s; }
.navigation-card-grid-col:nth-of-type(2) { animation-delay: 0.3s; }
.navigation-card-grid-col:nth-of-type(3) { animation-delay: 0.45s; }
.navigation-card-grid-col:nth-of-type(4) { animation-delay: 0.6s; }
.navigation-card-grid-col:nth-of-type(5) { animation-delay: 0.75s; }
.intro-iframe-content{animation-delay: 1s;}

@media (prefers-reduced-motion: reduce) { /* Disables animations for users who prefer reduced motion */
  .fade-in, .navigation-card-grid-col, .intro-iframe-content { animation: none; }
}

/* Collapsible section styles */
details[open] summary span:first-child {
    transform: rotate(90deg);
}

details summary span:first-child {
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Fix modal header corners to match rounded corners */
.mantine-Modal-header {
    border-radius: 8px 8px 0 0 !important;
}

.mantine-Modal-content {
    border-radius: 8px !important;
}

/* Make modal close button white */
#dash-project-detail-modal .mantine-Modal-close {
    color: white !important;
}

#dash-project-detail-modal .mantine-Modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

#dash-project-detail-modal .mantine-Modal-close svg {
    color: white !important;
}
