/*new css*/
html, body, #map {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  #mapOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    pointer-events: all;
    cursor: pointer;
  }

  #chartModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    z-index: 1000;
    padding: 16px;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    max-width: 960px;
    width: 90%;
    max-height: 85vh;
    overflow: auto;
  }

  #chartModalHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }

  #chartModalTitle {
    font-weight: bold;
    font-size: 16px;
  }

  #chartModalClose {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
  }

  #chartInfoBtn {
    margin-left: auto;
    margin-right: 10px;
    padding: 4px 10px;
    background: #298d29;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
  }

  #chartInfoText {
    margin-top: 10px;
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    position: relative;
  }

  #chartInfoTextClose {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 18px;
    cursor: pointer;
    font-weight: bold;
  }

  #chartInfoMore {
    color: #298d29;
    cursor: pointer;
    text-decoration: underline;
  }

  .customRow {
    display: flex;
    flex-direction: row;
  }
  
  .customCellButtons {
    width: 32px;
    height: 32px;
    background-color: white;
    border: 1px solid #ccc;
    text-align: center;
    line-height: 32px;
    cursor: pointer;
    margin: 2px;
  }
  
  #mainToolBar,
  #secondToolBar {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    padding: 5px;
    border-radius: 3px;
  }

  #dataDateInfo {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    width: auto;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    z-index: 98;
    background-color: rgba(245,245,245,0.7);
    box-shadow: 0px 0px 0.75em #777;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    cursor: help;
  }
  
.esri-popup__content {
    /* display: flex;
    flex-direction: column;
    align-items: center;
	  overflow: hidden !important; */
}

/*.esri-popup__main-container {
    width: 900px !important;
     height: 600px !important; 
	  max-height: 600px;
}*/

/* .esri-popup__content {
    overflow: hidden !important;
} */

/* #chartDiv {
    width: 750px;
    height: 500px;
}

#control_div{
	padding-top: 200px;
} */

/*   #chartContainer {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 3px;
  } */
  
/* title pane area */

#headerPane {
  height: 100px;
  min-height: 100px; 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

#viewDiv {
  height: calc(100% - 100px - 74px); /* Account for header (100px) and footer (~105px) */
  width: 100%;
  position: absolute;
  top: 100px;                 /* Pushes it below the header */
  left: 0;
  overflow: hidden;
  z-index: 1;                 /* Below the header */
}

#headerPane > div {
  display: flex;
  align-items: center;
  width: 100%;
}

#logo_lwf {
  margin-right: auto; /* Pushes the logo to the left */
}

#title {
  width: 50%;
  display: flex;
  flex-grow: 1;
  font-size: 2.9em;
  font-weight: bold;
  color: #298d29;
  text-align: center;
  justify-content: center;
	vertical-align: middle;
}

#logo_lwf_gross, #logo_stmelf {
  margin-left: 10px; /* Adds space between the logos on the right */
}

#logo_lwf_gross img,
#logo_stmelf img {
  height: 80px;
}

#legendDiv {
  position: absolute;
  bottom: 10px;
  right: 10px;
  /* Additional legend styling */
}

#esriTextBox {
  position: absolute;
  top: 7px;
  left: 60px;
  width: 250px;
  padding: 10px;
  font-size: 12px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 100;
  display: block; /* Default visible */
}

a {
  text-decoration: underline;
		color: #338233;
}

/*old css*/
/* Screensize xs: */
/* General settings */
html {
    height: 100%;
    width: 100%;
    margin: 0px;
    padding: 0px;
    overflow: auto;
 }
 body {
    margin: 0px;
    padding: 0px;
    height: 100%;
    width: 100%;
    font-size: 62.5%;
    font-weight: normal;
    font-family: Arial, Verdana, Helvetica, sans-serif;
    overflow: hidden;
 }
 #loadingOverlayPageContainer {    
     background:  #fff;
     top: 0;    
     left: 0;    
     position: absolute;    
     height: 100%;    
     width: 100%;    
     z-index: 1001;    
     display: block;
 } 
 #loadingOverlayContainer{
     top: 50%;
     left: 50%;
     position: relative;
     font-size: 1.4em;
     color: #999;
 }
/*  a {
   color: inherit;
   text-decoration: none;
 } 
 a:hover {
   text-decoration: underline;
 }*/
 #borderContainer {
     margin-left: auto;
     margin-right: auto;
     top: 0px;
     width: 100%;
     height: 100%;
     max-width: 987px;
     border: 1px solid #9c9c9c;
     box-shadow: 8px 6px 0.8em #777;
     overflow: hidden;
     background-color: white;
 }
 #NoScriptHint {
      font-size: 1.6em;
      font-weight: bold;
      padding: 6px;
      position: relative;
      top: 45%;
      text-align: center;
      z-index: 1002;
      color: #999;
 }
 
 /* title panes area */
 #headerPaneLogo{
     height: 0px;	
     background-color: white;
 }
 #headerPane{
     height: 0px;
 }
 
 /* left pane area */
 #leftPane{
     width: 0px;
     overflow: hidden;
 }
 
 /* bottom pane area */
 #bottomPane{
     height: 0px;
     margin: 0px;
 }
 
 /* ----------------------------------------------------------------------------------------------- */
 /* map pane area */
 #mapPane
 {
   padding: 0px;
   border: solid #9c9c9c;
   border-width: 1px 1px 1px 1px;
   min-height: 200px;
   overflow: auto;
 }
 #map {
    height: 100%;
    width: 100%;
    margin: 0px;
    padding: 0px;
    overflow: hidden;
    z-index: 40;
 }
 .arrow {
      border: 12px solid transparent;
      height: 0px;
      /* left: 36px; */
      left: -24px!important;
      position: absolute;
      /* top: 208px; */
      top: 20px;
      width: 0px;
      z-index: 1000;
      border-right: 12px solid #298d29;
      opacity: 0.9;
 }
 
 .customCellButtons {
      background-color: #298d29;
      background-position: 50% 50%;
      background-repeat: no-repeat;
      background-size: cover;
      display: table;
      height: 32px;
      width: 32px;
      margin: 0px 0px 4px 2px;
      z-index: 51;
      color: #fff;
      text-align: center;
      font-size: 2.4em;
      font-weight: bold;
      border: 1px solid #6c6c6c;
      border-radius: 4px;
 }
 .customCellButtons:hover {
     box-shadow: 0px 0px 10px #fff;
 }
 
 .disabled {
      background-color: #ccc;
 }
 
 .customRow {
      display: table-row;
 }
 
 #mainToolBar {
      left: 4px;
      position: absolute;
      top: 4px;
      z-index: 1000;
 }
 
 #secondToolBar {
      left: 4px;
      position: absolute;
      top: 200px;
      z-index: 1000;
 }
 
 #toggleLayers {
      background-image: url("img/toggleLayers.png");
 }
 
 #toggleBaseMap {
      background-image: url("img/changeBasemap.png");
 }
 
 #zoomIn {
      border-radius: 6px 6px 0px 0px;
      border: 1px solid #6c6c6c;
      height: 28px;
      margin: 0px 0px 2px 2px;
      opacity: 1;
 }
 
 #initialExtent {
      background-image: url("img/zoomToBayern.png");
      border: 1px solid #6c6c6c;
      border-radius: 0px;
      height: 30px;
      margin: 0px 0px 2px 2px;
      opacity: 1;
 }
 
 #zoomOut {
      border-radius: 0px 0px 6px 6px;
      border: 1px solid #6c6c6c;
      height: 28px;
 }
 
 #fullSize {
      background-image: url("img/goToFullScreen.png");
      margin: 4px 2px 0px;
 }
 
 #toggleLegend {
      background-image: url("img/toggleLegend.png");
 }
 
 #toggleTimeSlider {
      background-image: url("img/toggleTimeSlide.png");
 }
 
 .tundra .dijitToggleButton {
     background: #eee;
     margin-right: 0px;
     margin-bottom: 2px;
 }
 .tundra .dijitToggleButtonChecked{
 
   background: url("img/background_header_verlauf_gruen_schwarz.png");
   background-position: 50% 50%;
   background-repeat: no-repeat;
   background-size: cover;
 }
 .tundra .dijitToggleButtonChecked .dijitButtonNode{
 
   background: url("img/background_header_verlauf_gruen_schwarz.png");
   background-position: 50% 50%;
   background-repeat: no-repeat;
   background-size: cover;
 }
 .tundra .dijitToggleButton .dijitButtonNode {
      border: none;
 }
 .tundra .dijitToggleButtonHover .dijitButtonText {
      color: #000;
 }
 .tundra .dijitButtonNode {
     border-radius: 4px;
     padding: 4px;
 }
 .toggleBeetleOn {
   
   border: 1px solid #6c6c6c;
   display: block;
   position: relative;
   font-size: 1.3em; 
   font-weight: bold;
   color: #fff;
   border-radius: 4px 0px 0px 4px;
   background-color: #298d29;
 }
 .toggleBeetleOff {
   
   border: 1px solid #6c6c6c;
   display: block;
   position: relative;
   font-size: 1.3em;
   font-weight: bold;
   border-radius: 4px 0px 0px 4px;
   color: #6c6c6c;
 }
 .toggleBeetleOn:hover {
        box-shadow: 0px 0px 10px #fff;
 }
 .toggleBeetleOff:hover {
        box-shadow: 0px 0px 10px #fff;
 }
 
 #copyRight{
     font-size: 1em;
     right: 12px;
     bottom: 2px;
     position: absolute;
     text-align:right;
     z-index: 98;
 }
 .copyRightText {
   color: white; /*#338233;*/
   /*text-shadow: 4px 4px 2px rgba(150, 150, 150, 1);*/
       text-shadow:  1px  1px 1px #777,
                   1px -1px 1px #777,
                  -1px  1px 1px #777,
                  -1px -1px 1px #777;
   /*text-shadow: 4px 0px 2px rgba(255, 255, 255, 1);*/
 }
 .copyRightTextAerial {
   color: #fff;
 }
 
 #dataDateInfo{
     display: none;
     position: absolute;
     bottom: 20px;
     left: 0;
     right: 0;
     width: 70%;
     margin-right: auto;
     margin-left: auto;
     padding: 5px 10px 5px 10px;
     border-radius: 4px;
     z-index: 98;
     box-shadow: 0px 0px 0.75em #777;
     background-color: rgba(245,245,245,0.7);
     text-align: center;
     font-weight: bold;
     font-size: 1.3em;
 }
 
 .dijitTooltipContainer{
     left: 0;
     right: 0;
     max-width: 400px;
     margin-right: auto;
     margin-left: auto;
 }
 
 #timeHeader {
      border-radius: 4px 4px 0px 0px;
      background-image: url("img/background_header_verlauf_gruen_schwarz.png");
      background-position: 50% 50%;
      background-repeat: no-repeat;
      background-size: cover;
      color: #fff;
      font-family: inherit;
      font-size: 0.8em;
      font-weight: bold;
      text-align: center;
      padding: 5px;
 }
 
 #timeSliderPanel {
   position: absolute;
   bottom: 30px;
   left: 10px;
   width: 45%;
   max-width: 500px;
   z-index: 50;
   background: rgba(255,255,255,0.92);
   border-radius: 4px;
   box-shadow: 0 2px 8px rgba(0,0,0,0.2);
   padding: 4px 10px;
 }
 #timeSliderHeader {
   display: flex;
   align-items: center;
   gap: 8px;
   margin-bottom: 4px;
   font-size: 0.9em;
 }
 #timeSliderHeader label {
   font-weight: bold;
 }
 #timeSliderYearSelect {
   padding: 2px 6px;
   border-radius: 3px;
   border: 1px solid #ccc;
 }
 #daterange {
   margin-left: auto;
   font-style: italic;
   color: #555;
 }

 .esriTimeSlider {
   display: block;
 }
 .esriTimeSlider .tsTicks {
     height: 4px;
 }
 .esriTimeSlider .ts {
     margin: -5px 10px 2px 10px;
     padding: 0px;
 }
 
 #legendContainer {display: none;}
 /* not used right now: legend on map: #legendContainer,#legendTitle,#legend */
 
 .LocateButton .zoomLocateButton {
   margin: 8px 0px 0px 2px;
   width: 28px;
   height: 28px;
   background-color: #298d29;
   border-radius: 4px;
   border: 1px solid #6c6c6c;
 }
 
 .LocateButton .zoomLocateButton:hover {
   background-color: #298d29;
   box-shadow: 0px 0px 0.5em #fff;
        
 }
 .esriAttribution {
   display: none;
 }
 
 #loadingLyr {
      left: 50%;
      margin: -30px 0px 0px -30px;
      opacity: 0.8;
      position: absolute;
      top: 50%;
      z-index: 1000;
 }
 #mapLoading { 
     position: absolute;
     height: 100%;    
     width: 100%;    
     z-index: 999;    
     display: block; 
     /* background:  #fff; */
     opacity: 0.7;
 }
 .loadingMessageMap 
 {    
   font-size: 1.4em;
   font-weight: normal;
   font-family: sans-serif,Arial, Verdana, Helvetica;  
   color: #2C3539;
   text-align: center;
   margin-top: 50%;
 }
 
 #baseLayerContainer {
      background-color: #298d29;
      border-radius: 4px;
      box-shadow: 0px 0px 0.75em #777;
      color: #fff;
      display: block;
      font-size: 1.3em;
      left: 52px;
      opacity: 1;
      padding: 4px;
      position: absolute;
      top: 184px;
      z-index: 1000;
 }
 .baseLayerInvisible {
   font-style: italic;
 }
 
 #layerContainer {
      display: block;
      position: absolute;
      right: 0px;
      top: 2px;
      z-index: 1000;
 }
 
 #chartBox {
      display: none;
      z-index: 100;
 }
 
 .dijitDialog{
     border-radius: 6px 6px 0 0; 
     color: #000;
     box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.4); 
 }
 #chartNoData{
     display: none;
     text-align: center;
     z-index: 101;
     font-size: 1.6em;
     color: #999;
     position: relative;
     top: 50%;
 }
 #chartNode {
     background-color: #ffffff;
     position: relative;
     z-index: 100;
 }
 #chartInfobutton{ 
     position: relative;
     float: right;
     clear: left;
     right: 10px;
     z-index: 101;
     font-size: 1.1em;
 } 
 
 #chartInfoText{
     background-color: #ffffff;
     position: absolute; 
     /*top: 30%; */
     /*margin-right: 25%; */
     top: 30px;
     right: 10px;
     width: 80%;
     padding: 15px;
     text-align: left;
     z-index: 1050;
     display: inline;
     font-family: inherit;
     font-size: small;
     line-height: 1.5;
     display: none;
     border: 1px solid #9c9c9c;
     border-radius: 4px;
 }
 #read_more{
     display: inline;
     text-decoration: underline;
     color: #338233;
 }
 #more_text{
     display: none;
 }
 
 #yearPickerContainer {
     display: inline-block;
     border-radius: 4px;
     position: absolute;
     z-index: 51;
     right: 8px;
     top: 2px;
 }
 
 #yearPicker {
      border-radius: 4px;
      color: #ffffff;
      font-family: inherit;
      font-size: inherit;
      position: relative;
      z-index: 100;
 }
 
 #bottomPanel{
     display: none;
 }
 
 .tundra .dijitDialogTitleBar {
      background-image: url("img/background_header_verlauf_gruen_schwarz.png");
      background-position: left center;
      background-repeat: no-repeat;
      background-size: cover;
      border: 0px none;
      color: #ffffff;
      padding: 6px;
      font-size: 1.3em;
 }
 #legendNode{
     font-size: 1.1em;
 }
 
 .tundra .dijitDialogUnderlay {
      background-color: #000;
 }
 
 #hrXAxisSliderContainer {
      margin-bottom: 10px;
      margin-left: 84px;
      margin-right: 28px;
      position: relative;
 }
 
 #hrXAxisSliderRule {
      height: 8px;
      margin: 0px;
 }
 
 /* hide maximize button */
 .esriPopup .titleButton.maximize
  {
   display: none;
  }
 .tundra .esriLegendLayerLabel {
   font-weight: bold;
 }
 .tundra .esriPopup .esriPopupWrapper {
      border-radius: 4px;
      box-shadow: 0px 0px 0.75em #777;
 }
 
 .tundra .esriPopup .titlePane {
      background-color: #298d29;
      color: #fff;
      font-weight: bold;
      padding: 0px 2px 2px 8px;
 }
 
 .tundra .dijitSelect .dijitButtonContents, .tundra .dijitSelect, .tundra .dijitTextBox .dijitValidationTextBox {
      background: none repeat scroll 0% 0% #298d29;
      border-radius: 4px 0px 0px 4px;
      padding: 2px;
 }
 .tundra .dijitMenuItem td{
     font-size:1.2em;
 }
 .tundra .dijitDownArrowButton {
      border-radius: 0px 4px 4px 0px;
 }
 .tundra .dijitAccordionTitle
 {
   background-image: url("img/background_header_verlauf_gruen_schwarz.png");
        color: #fff;
      font-weight: bold;
 }
 
 #chartNode span b{
     padding: 10px;
 }
 
 .esriPopup .titleButton.prev {
     right: 34px;
 }
 .esriPopup .titleButton.next {
     right: 20px;
 }
 
 #Monitoringstandorte_lbl_layer text{
     text-shadow: 0px 0px 3px rgb(215,215,215), 0px 0px 1px rgb(225,225,225);
 }
 
 /* Screensize xs AND wide: */
/*  @media (max-height:440px){ 
     #secondToolBar{
         top: 146px;
     }
     #baseLayerContainer{
         top: 131px;
     }
 } */
 

/* .esri-popup__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden !important;
} */

/*.esri-popup__main-container {
  width: 900px !important;
   height: 600px !important; 
  max-height: 600px;
}*/

/* .esri-popup__content {
  overflow: hidden !important;
} */

#chart_div {
  width: 100%;
  height: 200px;
}

#chartDiv {
  width: 750px;
  height: 590px;
}

#control_div{
  margin-left: 50px;
  padding-top: 200px;
}

.esri-popup--shadow.esri-popup--is-collapsible{
	margin-top: 30px;
}

.esri-popup__pointer {
	display: none;
}

.esri-popup__main-container{
  width: auto !important;
  max-width: 350px !important;
	max-height: 300px !important;
}

.esri-popup__content{
	min-height: auto;
}

footer a {
    color: #338233;
    text-decoration: none;
}

/* Smartphone-Anpassungen */
@media (max-width: 768px) {
  /* Zeitverlauf (Panel + Umschalt-Button), Legende, Infofenster standardmäßig ausblenden */
  #timeSliderPanel,
  #toggleTimeSlider {
    display: none !important;
  }
  .esri-legend {
    display: none;
  }
  #esriTextBox {
    display: none;
  }

  /* Header: nur Titel, keine Logos */
  #logo_lwf,
  #logo_lwf_gross,
  #logo_stmelf {
    display: none;
  }
  #headerPane {
    height: 50px;
    min-height: 50px;
  }
  #title {
    font-size: 1.4em;
    width: 100%;
  }

  /* Fußzeile ausblenden */
  footer {
    display: none;
  }

  /* viewDiv an reduzierten Header anpassen (kein Footer) */
  #viewDiv {
    height: calc(100% - 50px);
    top: 50px;
  }

  /* Kontrollempfehlung-Popup auf Mobile zuverlässig zentriert anzeigen.
     Wichtig: KEIN transform auf .esri-popup – das würde fixed-positionierte Kinder an den
     Host statt an das Viewport binden und das gedockte Popup verschieben/abschneiden.
     Stattdessen: Host als bildschirmfüllender Flex-Container, sichtbarer Container mittig. */
  .esri-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    z-index: 9999 !important;
  }
  .esri-popup__main-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
    pointer-events: auto !important;
    max-width: 90vw !important;
    max-height: 75vh !important;
  }
  /* Popup-Ebene über die Werkzeugleisten (z-index 1000) heben, sonst verschwindet das
     gedockte Popup hinter den Buttons. .esri-ui ist pointer-events:none → Leisten bleiben klickbar. */
  .esri-ui {
    z-index: 1001 !important;
  }
}