/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  padding: 8px 12px;
  background: #fff;
  color: #151515;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Will need to be maintained when the style sheet is upgraded, added because Esri's style sheet uses light and dark color schemes throughout*/
:root {
  --calcite-color-border-white:#f8f8f8;
  --calcite-color-border-ghost: #7575754d;
  --calcite-color-border-input: #757575;
  --calcite-color-border-3: #404040;
  --calcite-color-border-2: #4a4a4a;
  --calcite-color-border-1: #555;
  --calcite-color-text-link: #00a0ff;
  --calcite-color-text-inverse: #151515;
  --calcite-color-text-3: #fff;
  --calcite-color-text-2: #ffff;
  --calcite-color-text-1: #fff;
  --calcite-color-inverse-press: #f3f3f3;
  --calcite-color-inverse-hover: #fff;
  --calcite-color-inverse: #f8f8f8;
  --calcite-color-status-danger-press: #d90012;
  --calcite-color-status-danger-hover: #ff0015;
  --calcite-color-status-danger: #fe583e;
  --calcite-color-status-warning-press: #f5d000;
  --calcite-color-status-warning-hover: #fe3;
  --calcite-color-status-warning: #ffc900;
  --calcite-color-status-success-press: #00b81b;
  --calcite-color-status-success-hover: #3bed52;
  --calcite-color-status-success: #36da43;
  --calcite-color-status-info-press: #009af2;
  --calcite-color-status-info-hover: #3db8ff;
  --calcite-color-status-info: #00a0ff;
  --calcite-color-brand-underline: #00a0ff66;
  --calcite-color-brand-press: #00619b;
  --calcite-color-brand-hover: #007ac2;
  --calcite-color-brand: #009af2;
  --calcite-color-transparent-tint: #2b2b2bcc;
  --calcite-color-transparent-scrim: #000000d9;
  --calcite-color-transparent-press: #ffffff14;
  --calcite-color-transparent-hover: #ffffff0a;
  --calcite-color-transparent: #fff0;
  --calcite-color-foreground-current: #214155;
  --calcite-color-foreground-3: #151515;
  --calcite-color-foreground-2: #202020;
  --calcite-color-foreground-1: #2b2b2b;
  --calcite-color-background: #353535
}


html, body {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
    overflow-x: clip;
    font-family: "Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;
    scrollbar-color: var(--calcite-color-border-3) var(--calcite-color-border-input);
  }

  .header {
    grid-area: header;
    display: flex;
    justify-content: left;
    align-items: center;
    background-color:rgb(0, 96, 127);
    min-height:60px;
  }

  .pngLogo img{
    width:260px;
    height:auto;
  }

  .logo {
    width: 50px;
    height: auto;
    margin-left:10px;
    margin-top:2px;
    margin-right:5px; /* adjust spacing between logo and tile*/
  }

  .logo img {
    width:100%;
    height:auto;
    object-fit: contain;
  }

  .companyInfo{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    padding:5px;
    align-items: center;
  }


  .NeRFFBig{
    font-size: 3rem; 
    font-weight: 600;
    margin: 0;
    padding:5px;
    font-family:Arial, sans-serif;
    
  }

  .NeRFFlongname{
    color: rgb(186, 191, 51);
    font-weight: 500;
    font-size:2rem;
    padding: 5px;
  }


  .navigation {
    grid-area: navigation;
    display: flex;
    /*flex-wrap: wrap;*/
    justify-content: flex-end;
    align-items: center;
    background-color:rgb(0, 96, 127);
  }

  .menubar {
    grid-area: menubar;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--calcite-color-foreground-1);
  }


  #searchDiv {
    position: absolute;
    right: 15px;
    width: 15%;
  }


  .header h2{
    float:inline-start;
    color: var(--calcite-color-text-1);
    display: table-cell;
    vertical-align: middle;
  }

  .footer{
    background-color: rgb(0, 96, 127, 1);
  }

  .footerL{
    grid-area: footerL;
    display: flex;
    justify-content: left;
    background-color: rgb(0, 96, 127, 1);
    align-items: center;
  }

  .footerM{
    grid-area: footerM;
    display: flex;
    padding:10px;
    align-items: center;
    align-content: center;
    justify-content: right;
    background-color: rgb(0, 96, 127, 1);
    font-size: 11px
  }

  .navfooter{
    grid-area: navfooter;
    display: flex;
    justify-content: right;
    align-items: center;
    background-color: rgb(0, 96, 127, 1);
    font-size: 11px
  }

  .map {
    grid-area: map;
  }

  .wrapper {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
     "header header navigation"
     "menubar menubar menubar"
     "map map map"
     "footerL footerM navfooter";
    width: 100vw;
    height: 100vh;
  }


  .about-menubar{
    grid-area: menubar;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top:5em;
    background: linear-gradient(#7b95af, #00607F,#708090,#00607F,#7b95af,#F9F9F9);
    padding: 3rem;
    height:5rem;
  }

  .title {
    width: 90%;
    padding:20;
     justify-content: center;
  }
  .about-menubar h2 {
    align-content: center;
    text-overflow: ellipsis;
  }

  .about-container {
    position: relative;
    grid-area:map;
    width: 90%;
    margin: 0 auto;
    margin-top:2em;
    max-width: 70em ;   
    display: flex;
    flex-direction: column;
    padding: 10px auto;
    align-items: center;
  }  

  .about-row {
    width: 100%;
    display: flex;
    align-content: space-around;
    padding: 1em;
  }
  .about-row-mission-goals {
    position:relative;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-content: space-around;
    padding: 2em;
    padding-bottom: 2em;        
  }

  .about-row-content {
    background-color: #F9F9F9;
  }
  .about-row-mission-goals span {
    color:#00607F;
    text-transform: uppercase;
  } 
  .about-mission {
    width:40%;
    margin: 1em;
    padding:1em;
    padding-top:0;
    padding-left:0.5em;
    padding-right:2em;
    margin-top:0;
    max-width: 30em;
    justify-content: left;
    align-content: flex-start;
  }
  .about-goals {
    width:50%;
    max-width:  30em;
    margin: 0 auto;
  }

  .about-mission h3,
  .about-goals h3 {
    padding-top:0.5em;
    font-weight: 600;
    padding-bottom: 0.2em;
    border-bottom: solid 1px #708090;
  }
  .about-left {
    width:35%;
    margin: 0 auto;
    max-width: 25em;
  }
  .about-right {
    width:60%;
    max-width:  40em;
    margin: 0 auto;
  }

  .about-goals ul li {
    list-style-type: square;
  }
  .about-img-L {    
    width: 100%;
    margin: 0 auto;
    padding: 1em;
  }

  .box {
    color: #fff;


  }

  .menuButton {
    border: none;
    background-color: var(--calcite-color-foreground-1);
    color: var(--calcite-color-text-1);
    padding: 3px 5px;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    margin: 4px 8px;
    transition-duration: 0.1s;
    cursor: pointer;
  }
  .menuButton .bx{
    font-size:1rem;
  }

  .menuButton:hover, .menuButton:focus{
    background-color: rgb(186, 191, 51);
    border-radius: 7px;
    color: var(--calcite-color-foreground-1);
  }

  .menuButton:disabled {
    color:gray;
    cursor: not-allowed;
  }

  .camera-action {
    border: 0;
    padding: 2px;
    margin: 0 4px 0 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    vertical-align: middle;
  }

  .camera-action:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }

  .camera-action img {
    width: 16px;
    height: 16px;
    display: block;
  }

  #DnrCamPopupContainer {
    max-width: min(420px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    max-height: min(327px, calc(100dvh - 16px));
    overflow: hidden;
  }

  #DnrCamPopupContainer img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 28px);
    max-height: min(315px, calc(100dvh - 28px));
    object-fit: contain;
  }

  /* Touch-first devices have no stable hover state. Keep preview-only popups hidden;
     camera buttons still open their full image/page through the click handler. */
  @media (hover: none), (pointer: coarse) {
    #gageMODiv,
    #HiViCamPopupContainer,
    #DnrCamPopupContainer {
      display: none !important;
    }
  }

  /* Dropdown for menu Additional Layers  */
  .dropdown {
    position: relative;
    display: inline-block;
    overflow: visible;  /* Ensure child dropdown is not clipped */
  }
  
  .dropdown-content {
    display: none;
    visibility: hidden;
    position: absolute;
    top: 100%;  /* Below the button in desktop */
    left: 0;
    background-color: var(--calcite-color-foreground-1);
    width: 250px;
    min-height: 100px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.8rem;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
  }
  
  /* Show dropdown on hover OR when .visible is applied */
  .dropdown:hover .dropdown-content,
  .dropdown-content.visible {
    display: block;
    visibility: visible;
  }
  
  /* Dropdown links */
  .dropdown-content a {
    background-color: rgb(0, 96, 127);
    color: var(--calcite-color-text-1);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
  }
  
  .dropdown-content a:hover {
    background-color: rgb(186, 191, 51);
    color: var(--calcite-color-foreground-1);
  }
  
  /* Mobile Styles: when screen width is 600px or less */
  @media screen and (max-width: 800px) {
    .dropdown-content {
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-75%);
      min-width: 300px;  /* Ensure the dropdown is wide enough */
      max-width: 90vw;   /* Do not exceed 90% of the viewport width */
      max-height: 70vh;  /* Limit vertical space */
      overflow-y: auto;
      padding: 10px;
      z-index: 9999;
    }
  }

  .disclaimer-overlay {
    position: fixed;    
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 9998; /* Below the disclaimer container */
  }

  .disclaimer-container {
    position: fixed;
    top: 50%; /* Position the top at 50% of the viewport height */
    left: 50%; /* Position the left at 50% of the viewport width */
    transform: translate(-50%, -50%); /* Center the container */
    width: 80%;
    height: 90%;
    /*max-height: 70vh;
    max-width: min(80vw, 1344px);*/
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background-image: url('../img/DisclaimerBackgroundImg.jpeg');
    background-size: cover;
    background-position: center;
    }

  .disclaimer-container:focus {
    outline: none;
  }

   .disclaimer-content {
    color: var(--calcite-color-text-1);
    width: 100%;
    max-height: 100%; 
    overflow: auto; 
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.3);
    text-align: left;
  }

   .disclaimer-logo-container {
    display: flex;
    justify-content: center;
    margin-top: 20px; 
  }
  
  .disclaimer-logo-container img {
    max-width: 100%;
    height: auto;
  }

  .disclaimer-content p {
    margin: 1em;
    padding: 5px;
  }

  .disclaimer-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .disclaimer-content ul li {
    position: relative;
    padding-left: 2em; 
    margin-left:2em;
  }

  .disclaimer-content ul li:before {
    content: "\2022"; 
    color: var(--calcite-color-text-1); 
    font-size: 16px; 
    position: absolute;
    left: 0;
  } 
  
  .disclaimer-button {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin-top: auto;
    margin-right:5%;
    padding-top: 10px;  
  }
  
  .disclaimer-button button {
    border-radius:5px;
    padding:10px 20px;
    margin-top:auto;
    background-color: #007bff;
    color: var(--calcite-color-text-1);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
  }

  .navigation a{
    display: inline-flex;
    padding: 10px 20px;
    align-items: center;
  }
  
  .navfooter a{
    display: table;
    padding: 10px 20px;
  }
  
  .menubar a{
    padding: 2px 20px;
  }

  .menubar a li{
    justify-content: center;
    color: var(--calcite-color-text-1);
    font-size: 14px;
  }

  img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
  }

  /* Filters Modal styling */
  #filtersModal {
    display: none;
    position: relative;
    width: max-content;
    height: min-content;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 5px;
    z-index: 110;
  }

  /* Table cell vertical alignment */
  #filtersModal table td {
    vertical-align: top;
  }
  /* Mobile styling for screens 960px or less */
  @media screen and (max-width: 960px) {
    /* Make the modal full width and center it */
    #filtersModal {
      width: 95%;
      margin: 0 auto;
      padding: 10px;
    }
    
    /* Convert the table into a block layout */
    #filtersModal table,
    #filtersModal thead,
    #filtersModal tbody,
    #filtersModal tr,
    #filtersModal td,
    #filtersModal th {
      display: block;
      width: 100%;
    }
    
    /* Hide the original header row */
    #filtersModal thead tr {
      position: absolute;
      top: -9999px;
      left: -9999px;
    }
    
    /* Each row becomes a block with a border and spacing */
    #filtersModal tbody tr {
      border: 1px solid #ccc;
      margin-bottom: 15px;
      padding: 10px;
    }
    
    /* Each cell is displayed as a block with left padding for the label */
    #filtersModal tbody tr td {
      position: relative;
      padding-left: 45%;
      margin-bottom: 10px;
    }
    
    /* Pseudo-element to inject header labels into each cell */
    #filtersModal tbody tr td:before {
      position: absolute;
      top: 0;
      left: 10px;
      width: 35%;
      padding-right: 10px;
      white-space: nowrap;
      font-weight: bold;
    }
    
    /* Use nth-of-type to assign the proper header label for each cell.
      Adjust the content values to match the corresponding column.
    */
    #filtersModal tbody tr td:nth-of-type(1):before { content: "Station Type"; }
    #filtersModal tbody tr td:nth-of-type(2):before { content: "Source"; }
    #filtersModal tbody tr td:nth-of-type(3):before { content: "Minimum Risk"; }
    #filtersModal tbody tr td:nth-of-type(4):before { content: "Trend"; }
    #filtersModal tbody tr td:nth-of-type(5):before { content: "Data Availability"; }
    #filtersModal tbody tr td:nth-of-type(6):before { content: "Flood Sources"; }
    #filtersModal tbody tr td:nth-of-type(7):before { content: "River Basins"; }

  }

  #floodSliderDiv {
    position: absolute;
    top:0px;
    background-color: transparent;
    height: 150px;
  }

  #floodbyFreqRadioBtnsDiv {
    position: absolute;
    background-color: transparent;
    width:100%;
    height: 150px;
    visibility: hidden;
  }

  #floodbyFreqRadioBtnsDiv >*{
    color:var(--calcite-color-text-1);
  }
  #floodbyFreqRadioBtnsDiv fieldset{
    margin-top:30px;
    padding-left:20px;
    padding-right:20px;
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    border:none;
  }
  #floodbyFreqRadioBtnsDiv .radio-button{
    position:relative;
    padding:5px;
  }

  #floodbyFreqRadioBtnsDiv .radio-button:hover{
    border:2px blue dashed;
  }

  .radio-button label {
    padding: 5px 5px;
    font-family: sans-serif, Arial;
    font-size: 1.1rem;
  }

  .radio-button input[type="radio"]:disabled + label {
    color:rgba(118, 118, 118,0.8);
   
  }
  /* position need to match records on slider tab */
  #floodByFreqNotes{ 
    position:absolute;
    color:var(--calcite-color-text-1);
    top:108px;
    right:0;
    margin-top:0px;
    margin-bottom: 0.05rem;
    padding: 10px;
    font-size: 0.7rem;    
  }

  #floodSliderContainer {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    min-height: 180px;
    width: 50%;
    min-width:800px;
    text-align: bottom;
    display: none;
    background-color: rgba(0, 0, 0, 0.85);
  }

  /* Collapsing is a mobile map-space feature; desktop keeps the established panel. */
  #toggleFloodSimulatorSize,
  #floodSimulatorCollapsedLabel {
    display: none;
  }

  #floodByStageBtn {   
    position: absolute;
    width: 200px;
    height: 30px;
    top: -30px;
    border: none;
    color: var(--calcite-color-text-1);
    border-top-right-radius: 7px;
    border-top-left-radius: 7px;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.85);
  }

  #floodByRecurrenceBtn {
    position: absolute;
    width: 200px; 
    height: 30px;
    left: 200px;
    top: -30px;
    border: none;
    color: var(--calcite-color-text-1);
    border-top-right-radius: 7px;
    border-top-left-radius: 7px;
    font-size: 14px;
    background-color: rgb(0, 96, 127);
  } 

  .hidden {
    display: none;
  }
  
  .visible{
    display:block;  
  }

  #LegendContainer {
    background-color: var(--calcite-color-transparent-scrim);
    color: var(--calcite-color-text-1);
    position: fixed;
    padding:5px;
    padding-top:10px;
    max-height: 60%;
    min-width:12rem;
    max-width: 30rem;
    bottom: 3.5rem;
    left: 0.5rem;
    display: none;
  }
  #neRainUIPopup {
    background-color: var(--calcite-color-transparent-scrim);
    color: var(--calcite-color-text-1);
    position: fixed;
    padding:5px;
    padding-top:10px;
    max-height: 50%;
    max-width: 90rem;
    bottom: 3.5rem;
    left: 30rem;
    display: none;
  }

/* Fake the legend for gage layer */
  .legendTables{
    margin-bottom: 1px;
    padding-left:0.5em;
    }

    .legendTables >*{
      margin-left:0.2rem;
    }

  .legendTables h3{
    margin-top: 0.3rem;
    text-align:left; 
    margin-left:0.1rem; 
    margin-bottom:0px;
  }
  .legendTables h5{
    margin-block-start: 0.2em;
    margin-block-end:0.2em;
    margin-left:0.4rem; 
    size:0.9rem;
  }
  .legendTables h4{
    text-align:left; 
    margin-left:0.2rem; 
    margin-bottom:0px;
    size:0.4rem;
    font-weight: 200;
  }
  .legendTables td{
    padding-left:0.3rem;
    size:0.4rem;
    color:var(--calcite-color-text-1);
   }

  .gageLegendTable td{
    vertical-align:top;
    text-align:left;
  }

  .gageLegendTable img{
    width:16px;
    height: 16px; 
  }

  #mapLegendTable2 img{
    width:16px;
    height: 16px;
  }
  #mapLegendTable3 img{
    width:16px;
    height: 16px;
  }
/* end of Gage Faked Legend  */

  #closeButton {
    position: absolute;
    background: rgb(36, 35, 35); 
    border-radius: 7px; 
    top: 10px;
    right: 2px;
    border: none;
    transition-duration: 0.1s;
    cursor: pointer;
  }

  .closeButton4 {
    border-radius: 7px; 
    color: white; 
  }

  .closeButton4:hover {
    border-radius: 7px;
    color: rgb(186, 191, 51);
  }

  #floodTitle {
    position: absolute;
    top: 10px;
    left: 1%;
    font-size: 14px;
    font-weight: bold;
    color: grey;
  }

  #floodByFreqTitle {
    position: relative;
    top: 10px;
    left: 0;
    padding-left: 1%;
    font-size: 14px;
    font-weight: bold;
    color: grey;
    visibility: hidden;
  }


  #viewDepthGridsDiv {
    position: absolute;
    top: 125px;
    left: 4%;
    font-size: 1rem;
    font-weight: bold;
    color: var(--calcite-color-text-1);
    padding-bottom:15px;
  }

  #viewDepthGridsRecDiv {
    position: absolute;
    top: 125px;
    left: 4%;
    font-size: 1rem;
    font-weight: bold;
    color: var(--calcite-color-text-1);
    padding-bottom:15px;
  }

  #floodRecordInfo {
    position: absolute;
    top: 132px;
    right: 1%;
    font-size: 10px;
    font-weight: bold;
    color: grey;
  }
  #opacitySliderStageDiv{
    position: absolute;
    left: 20%;
    right: 1%;
    top: 125px;
  }
  /* ⬇️ desktop / tablet – when forecast is showing */
  #opacitySliderStageDiv.with-forecast            { top: 150px; left: 32%; }

  #opacitySliderFreqDiv{
    position: absolute;
    left: 20%;
    right: 1%;
    top: 115px;
  }

  #floodForecastInfo {
    position: absolute;
    top: 114px;
    left: 28%;
    font-size: 10px;
    font-weight: bold;
    color: grey;
  }

  #floodForecastDateRange {
    position: absolute;
    top: 132px;
    left: 28.5%;
    font-size: 9px;
    color: grey;
  }

  #StageTrend {
    position: absolute;
    top: 130px;
    left: 1%;
    font-size: 12px;
    font-weight: bold;
    color: grey;
  }

  #footUnit {
    position: absolute;
    top: 85px;
    left: 2.5%;
    font-size: 11px;
    color: grey;
  }

  .span {
    text-align: center;
  }
  
  /* customize depth grid slider */
  .depthSlider{
    border:yellow solid 1px;
    width: 300px;
    margin: 20px;
    position: relative;
    top:55px;
  }

  #gageMODiv{
    position:absolute;
    max-height: 200px;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--calcite-color-text-1);
    font-weight: 400;
    font-size:0.8rem;
    padding-left: 15px;
    padding-right: 15px;
    border-radius: 7px 7px 0 0;
    visibility: hidden;
    text-align: center;

  }
  .popupOnRight {
    text-align: center;
  }
  .popupOnRight::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 1px;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0;
    height: 0;
    border-width:10px;
    border-style:solid;
    border-color: transparent transparent  rgba(0, 0, 0, 0.8)  rgba(0, 0, 0, 0.8) ;
  }
  .popupOnLeft {
    text-align: center;
  }
  .popupOnLeft::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0;
    height: 0;
    border-width:10px;
    border-style:solid;
    border-color:  rgba(0, 0, 0, 0.8)  rgba(0, 0, 0, 0.8) transparent transparent ;
  }

  #line0 {
    color:rgb(186, 191, 51);
    width:100%;
    padding-top:5px;
    padding-bottom: 2px;
    font-size:0.9rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid rgb(150, 146, 146);
    white-space: nowrap;
  }
  #line1,#line2,#line3,#line4,#line5{
    padding:2px;
  }

  #line1 {
    margin-top:5px;
  }

  #line2 {
    margin-top:0;
  }

  #line3{
    font-size: 0.6rem;
    padding-top:0;
  }

  #line6 {
    position:absolute;
    font-size:0.6rem;
    padding-top: 15px;
    padding-bottom: 5px;
    align-self: flex-end;
    margin-bottom: 10px;
  }


  .esri-icon-close:before {
    content: "";
    color: white;
  }

  .esri-icon-down-arrow:before {
    content: "";
    color: white;
  } 

  .esri-icon-search:before {
    content: "";
    color: white;
  }

  .esri-icon-plus:before {
    content: "";
    color: white;
  }

  .esri-icon-minus:before {
    content: "";
    color: white;
  }

  .esri-icon-home:before {
    content: "";
    color: white;
  }

  .esri-icon-locate:before {
    content: "";
    color: white;
  }

  .esri-icon-basemap:before {
    content: "";
    color: white;
  }
  
  .esri-popup--is-docked-top-right .esri-popup__main-container {
    max-height: 100%
  }
  .esri-popup__main-container {
    pointer-events: auto;
    position: relative;
    z-index: 1;
    max-width: 380px;
    background-color: #242424;
    display: flex;
  }

  .esri-icon-bookmark:before {
    content: "\e666";
    color: inherit;
  }

  #loading{
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-right: -50%;
  }

  a {
    color: white;
    text-decoration: none;
  }
  .esri-widget__table tr {
    font-weight: bold;
  }

  .esri-slider__tick-label {
    color: white;
    font-weight: bold;
  }

  .esri-slider__segment {
    height: 100%;
    color: purple;
    left: 0;
    position: absolute;
    top: 0;
    touch-action: none;
    transform-origin: 0 0;
    width: 6px;
    will-change: transform;
  }

  .esri-slider--horizontal .esri-slider__track {
    height: 8px;
    width: 100%;
  }

  .esri-slider__track {
    background: grey;
    display: inline-block;
    touch-action: none;
    position: relative;
  }

  .esri-slider__thumb {
    background-color: #242424;
    border: 3px solid white;
    border-radius: 16px;
    height: 16px;
    left: -7px;
    position: absolute;
    top: -4px;
    touch-action: none;
    width: 16px;
    transition: transform 125ms ease-in-out;
    z-index: 1;
  }

  .esri-widget__heading {
    color:white;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
  }

  .esri-legend__layer-caption {
    color:white;
    font-weight: bold;
    display: table-caption;
    padding: 6px 0;
    word-break: break-word;
  }
  .esri-legend__layer-cell--info {
    color:white;
    font-size: 12px;
    padding-left: 7px;
    padding-right: 7px;
    word-wrap: normal;
    word-break: normal;
    max-width: 250px;
  }

  .esri-layer-list {
    text-align: left;
  }

  .esri-features__container:not(:empty) {
    padding: 4px 8px;
  }

  .esri-feature-media__container {
    margin: 0px 0px;
  }

  .esri-popup__header-title {
    border-radius: 2px;
    color: var(--calcite-color-text-1);
    font-size: 12px;
    padding: 6px 7px;
    margin: 6px auto 6px 7px;
    display: block;
    transition: background-color 125ms ease-in-out;
    white-space: pre-wrap;
    word-break: break-all;
    word-wrap: break-word;
    word-break: break-word;
  }

  .esri-popup__content {
    display: flex;
    flex-flow: column nowrap;
    flex: 1 1 auto;
    font-size: 12px;
    font-weight: 400;
    margin-top: 0px;
    margin-right: 8px;
    margin-bottom: 12px;
    margin-left: 8px;
    overflow: auto;
    line-height: small;
  }
  .esri-feature__content-element {
    padding: 0 7px;
    margin-bottom: 5px;
  }

  .esri-popup__content header.header{
    display:none !important;
  }

  .esri-legend__service {
    padding: 12px 15px;
    word-wrap: break-word;
    border-bottom: none;
  }

  
  .esri-legend__message{ 
    display: none;
    visibility: hidden;
  }
  
  #floodSliderDiv .custom-labels {
    font-size: 0.7rem;
    color: white;
    margin-top: -48px !important;
  }

  #floodSliderDiv .custom-ticks {
    background-color:white;
    width: 2px;
    height: 10px;
    margin-top: -30px; 
  }

  .arrow-down {
    display: block;
    margin: 0 auto;
    width: 5px;
    height: 5px;
    margin-top: -30px !important;
  }
   .arrow-down:after {
      content: '';
      display: block;
      margin-left:-4px;
      padding: 0;
      width: 10px;
      height: 10px;
      border-top: 2px solid white;
      border-right: 2px solid white;
      transform: rotate(135deg);
  }


  li {
    list-style-type: none;
    margin: 0;
    padding: 0;
  }

    .navigation a:hover {
      color: orange;
    }

    .navfooter a:hover {
      color: orange;
    }

/* Add a color to the active/current link */
    .navigation a.active {
      color: rgb(186, 191, 51);
    }

/* Styles for the loading container */
.loading-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%; /* Set the desired width of the spinner container (1/4 of the map size) */
  max-width: 150px; 
  background-color: rgba(255, 255, 255, 0); 
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Ensure it's on top of the map */
  border-radius: 8px; 
  min-height: 150px;
}

  /* loading spinner */
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 5px solid rgba(0, 0, 0, 0.3); /* Border color */
    border-top: 5px solid #007bff; /* Color of the spinner */
    border-radius: 50%; /* Make it a circle */
    animation: spin 1s linear infinite; /* Animation for rotation */
  }


  /* Animation for rotation */
  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

  .error-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(41, 38, 36, 0.8); /* Red background for error container */
    color: #fff; /* White text color for error message */
    padding: 25px;
    border-radius: 8px;
    display: none; /* Hide the error container initially */
    z-index: 9998; 
    max-height: 200px;
    min-height: 30px;
  }

  .error-close-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    font-size: 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #fff;
  }



  @media only screen and (min-width: 544px)  {
    .wrapper {
      width: 100vw;
      height: 100vh;
      grid-template-columns: 20% auto;
      grid-template-rows: 60px  40px  auto  40px;
      grid-template-areas:
        "header header navigation"
        "menubar menubar menubar"
        "map map map"
        "footerL footerM navfooter";
      }

}

@media only screen and (max-width:1130px){
  .NeRFFlongname{
    display:none;
  }
}

@media only screen and (max-width:835px){
  #floodSliderContainer {
    width: 100%; /* Takes full width */
    min-width: 100%; /* Override the min-width */
    left: 0; /* Align to the left edge */
    transform: none; /* Remove the transform */
  }

  #toggleFloodSimulatorSize {
    position: absolute;
    top: 7px;
    right: 52px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    padding: 0;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: rgb(36, 35, 35);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }

  #toggleFloodSimulatorSize:hover,
  #toggleFloodSimulatorSize:focus-visible {
    color: rgb(186, 191, 51);
    outline: 2px solid #fff;
    outline-offset: 1px;
  }

  /* Reduce only the panel footprint. Simulation layers remain active and unchanged. */
  #floodSliderContainer.is-collapsed {
    min-height: 40px;
    height: 40px;
  }

  #floodSliderContainer.is-collapsed #floodSimulatorControls {
    display: none;
  }

  #floodSliderContainer.is-collapsed #floodSimulatorCollapsedLabel {
    display: block;
    padding: 11px 92px 0 12px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #floodSliderContainer.is-collapsed #closeButton {
    top: 9px;
  }

  #floodTitle,
  #floodByFreqTitle {
    max-width: calc(100% - 96px);
  }
  #floodByFreqNotes{
    display:none;
  }
  #searchDiv{
    display:none;
  }

  /* switch align list from left to the right */
  .dropdown-content {
    right: 0; 
    margin-left: 0; 
    margin-right: 0.01rem; 
  }
  #opacitySliderStageDiv{
    position: absolute;
    left: 20%;
    right: 1%;
    top: 80%;
  }
  #opacitySliderStageDiv.with-forecast          { top: 85%;  left: 28%; }

  #opacitySliderFreqDiv{
    position: absolute;
    left: 20%;
    right: 1%;
    top: 80%;
  }

  #floodRecordInfo.with-forecast {
    position: absolute;
    top: 145px;
    right: 1%;
    font-size: 10px;
    font-weight: bold;
    color: grey;
  }

}

@media only screen and (max-width:544px){
  .wrapper {
    grid-template-columns: 23% 39% 38%;
  }
  .about-row {
    display:flex;
    flex-direction: column;
  }
  .about-row-mission-goals {
    display:flex;
    flex-direction: column;
  }
  .about-mission {
    width:100%;
    margin: 0 auto;
    max-width: 25em;
  }
  .about-goals {
    width:100%;
    margin: 0 auto;
    max-width: 25em;
  }
  .title h1 {
    font-size:1.5vw;
  }

  .about-left {
    width:100%;
    margin: 0 auto;
    max-width: 25em;
  }
  .about-right {
    width:100%;
    margin: 0 auto;
    max-width: 25em;
  }
  .box {
    color: #fff;
    padding: 1px;

  }
  .NeRFFlongname {
    display:none;
  }
  .navigation a{
    min-width: 35px;
    padding: 2px 3px;
  }

  #floodSliderDiv .custom-labels {
    margin-top: -40px !important;
  }

  .esri-slider__label {
    line-height: 16px;
    min-width: 80px;   
}

  .esri-popup__main-container{
    max-width:90%;
  }
  #floodSliderContainer {
    width: 100%; 
    min-width: 100%;
    left: 0; /* Align to the left edge */
    transform: none; /* Remove the transform */    
    bottom: 1fr;
  }

  #floodByFreqTitle {
    font-size: 0.8rem;
  }
  #floodTitle {
    font-size: 0.8rem;
  }
  .radio-button label {
    font-size: 0.9rem;
}
}
@media only screen and (max-width:400px){
  
  #floodByStageBtn{
    width:50%;
    min-width:50%;
    left:0px;
  }

  #floodByRecurrenceBtn{
    width:50%;
    left:auto;
    right:0px;
  }

}
