html, body{
    font-family: 'Roboto','Sans Serif';
    height: 100%;
    width: 100%;
    margin: 0;
}
button {
    background-color: #175A68;
    border-radius: 10px;
    padding: 0 15px;         
    border: none;
    color: #ffffff;
    font-size: 1rem;
    min-width: 100px;
    height: 30px;            
    display: flex;           
    justify-content: center; 
    align-items: center;     
    text-align: center;     
    cursor: pointer;         
}
button:hover{
    background-color: #59979bff;
    box-shadow: 0 0 8px rgba(32, 127, 147, 0.5);
}
#add-layer-button{
    font-size: 1.125rem;
    padding: 3px 20px;
}
body{
    display: flex;
    flex-direction: column;
}
header{
    color: #175A68;
    background-color: #F0F0F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo {
  height: 3em;  
  width: auto;   
}
header h1{
    margin: 0.5em;
}
h1 {
  font-size: 1.5rem; 
}
h2 {
  font-size: 1.2rem; 
}
nav{
    background-color: #175A68;
    color: #F0F0F0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 10px; 
}
nav button{
    margin: 5px 2px 5px 2px;
}
nav a {
  text-decoration: none;
}
main{
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    height: calc(100vh - 4em);
}
#map-navigation {
    top: 0;
    background-color: #E7F4F0;
    padding: 5px;        
    box-sizing: border-box;
}
.map-flex{
    display: flex;
    flex-direction: column;
    margin: 0 5%;
}
#mid,#bottom{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 1.125rem;
}
#mid *,#bottom *{
    margin: 2%;
    white-space: nowrap;
}
#layer-banner{
    padding: 1% 5%;
    margin: 0;
    background-color: #535353;
    color: white;
}
#map{
    height: 100%;
    width: 100%;
    float: right;
}
#layer-content{
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto; /* take remaining space */  
    max-height: 40vh;      
    min-height: 100px;     
    padding-right: 5px;    
}
#layer-content-budapest,
#layer-content-vienna {
  flex: 1;               /* ocupar espacio sobrante */
  overflow-y: auto;      /* activar scroll */
  overflow-x: hidden;
  padding-right: 5px;    /* dejar espacio para scroll */
}
#layer-controller{
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%; 
}
.layer{
    padding: 3% 5%;
    border-bottom: 1px solid gray;
    background-color: #F0F0F0;
    min-height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#city-selection{
    font-size: 1.125rem;
    padding: 3px 20px;
    border-radius: 10px;
    background-color: white;
    border: 2px solid #124852;
    min-width: 100px; 
}

/* icons */

.icon{
    height: 25px;
    width: 25px;
}
.icon:hover{
    box-shadow: 0 0 8px rgba(32, 127, 147, 0.5);
    border-radius: 3%;
}
/* Grayout*/
.grayout {
    display: none;
    position: fixed;
    left: 0px;
    top: 0px;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    justify-content: center;
    align-items: center;
}
.hidden{
    display: none;
}
.flex{
    display: flex;
}
#small-box{
    height: 70%;
    width: 80%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    position: relative;
}

.outer-container {
    display: flex;
    flex-direction: column; 
    width: 100%;
    height: 100%;
}

.outer-container-text{
    width: 100%;
    height: 100%;
    text-align: left;
}
.outer-container-text li{
    list-style-type: square;
}
.layer-selection-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow: hidden;
    background: #E7F4F0;   
    padding: 2vh 2vw;
    box-sizing: border-box;
}

.layer-selection-option-container {
    flex: 1 1 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
    box-sizing: border-box;

    scrollbar-gutter: stable both-edges; 
}
.layer-selection-option-container h3 {
    margin-top: 0.2rem;   
    margin-bottom: 0.7rem;
    font-size: 1.1rem; 
    color: #175A68;
}
#layer-selection-footer {
    flex: 0 0 auto;
    height: 60px;
    width: 100%;
    background-color: #E7F4F0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

}
/*STYLE FOR "GLOSARY" AND "ABOUT" WINDOWS */
.outer-container-text-supplementary {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 10px rgba(178, 178, 178, 0.548);
  border-radius: 15px;
}

.glossary-content-supplementary {
  flex: 1;
  padding: 0rem 4.5rem;
  overflow-y: auto;
  border-radius: 15px;
}

.outer-container-text-supplementary h2 {
    margin-top: 2.5rem;      
    margin-left: 4.5rem; 
    font-size: 1.4rem;
    font-weight: bold;
    color: #175A68;       
}
.glossary-content-supplementary p {
    margin-bottom: 1.3rem;   
    line-height: 1.3;      
}

.glossary-content-supplementary ul {
  list-style: disc;     
  margin-left: 3rem;   
  padding-left: 0;      
}

.glossary-content-supplementary li {
  margin-bottom: 0.5rem; 
}
.funding-logo {
  display: block;
  margin: 1rem auto;
  width: 100%;       
  max-width: 500px;  
  height: auto;      
}

#layer-selection-footer-supplementary {
  height: 60px;
  background-color: #E7F4F0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;        
}
/* *************************************** */ 
.shape-button{
    margin: 1%;
    padding: 0 3%;
}
.layer-selection-option-container{
    flex: 1;
    /* border: 1px solid black; */
    width: 33%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}
/*.layer-selection-option-middle{
    border-left: 1px solid black;
    border-right: 1px solid black;
}*/
.layer-selection-option-last{
    margin-bottom: 5%;
}
ul{
    list-style-type: none;
}

/* Remove extra space between nested lists */
.layer-selection-option-container ul {
  margin: 0.3em 0;
  padding-left: 1.2em; /* controls the indentation (reduce for smaller indent) */
  list-style: none; /* optional: hides default bullets */
}

/* Reduce vertical spacing between list items */
.layer-selection-option-container li {
  margin: 5px 0; /* controls vertical spacing */
  padding: 0;
}

/* Adjust style for <summary> elements */
.layer-selection-option-container summary {
  cursor: pointer; /* shows pointer on hover */
  font-weight:480; /* makes text normal weight (instead of bold) */
  padding: 2px 0; /* reduces vertical padding */
  display: block;
  position: relative;
  padding-left: 1.5rem;   /* reserva espacio a la izquierda */
  text-indent: -1.5rem;   /* “saca” el ícono fuera del bloque */
}

.layer-navi-buttons{
    display: flex;
    justify-content: space-between;
    flex-direction: row;
}
.temp-button-design{
    width: 20px;
}
.legend-toggle-button{
    padding: 5px 10px;
}

.legend-container{
    padding: 5px 10px;
    width: 30vw;
    height: 50vh;
    bottom: 0;
    left: 0;
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    margin: 1%;
    overflow-y: auto;
    overflow-x: hidden;
}

.legend-section{
    width: 100%;
    box-sizing: border-box;
}
.legend-button-navi{
    display: flex;
    justify-content: end;
    border-bottom: 1px solid black;
    padding: 1%;
    padding-bottom: 2%;
}
.legend-btn{
    padding: 1%;
}
.legend-main1 i {
    vertical-align: middle;
}
.legend-main1{
    display: flex;
    justify-content: space-evenly;
}

.legend-main-top{
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 3%;
    padding-bottom: 1%;
}
.legend-main-middle{
    display: flex;
    margin: 1% 0;
    margin-bottom: 3%;
    padding-bottom: 1%;
    justify-content: space-evenly;
    border-bottom: 1px solid black;
}
.legend-main-bottom{
  margin-bottom: 2%;
  border-bottom: 1px solid black;
}
.legend2-section-titles{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.disabledButton {
  pointer-events: none;
  cursor: default;
}
.align-mid{
    text-align: center;
}





/* Hierarchical menu */
details summary::-webkit-details-marker {
  display: none;
}
details summary {
  list-style: none;
  cursor: pointer;
}

details summary::before {
  content: "";
  display: inline-block;
  width: 20px;   
  height: 13px; 
  margin-right: 6px;
  background: url("../app_icons/menu_plus_sqr.svg") no-repeat center center;
  background-size: contain;  
  /*   vertical-align: middle; */
  cursor: pointer;
}
details[open] > summary::before {
  background-image: url("../app_icons/menu_minus_sqr.svg");
}







/*TOOLTIP*/
.summary-with-info .tooltip {
  position: relative;
  left: 1.5rem; /* 💡 “compensa” la sangría del summary */
  flex-shrink: 0; /* evita que el icono se comprima si el texto es largo */
}
/* Resetea la sangría heredada dentro del tooltip */
.summary-with-info .tooltip .tooltiptext {
  text-indent: 0 !important;
  padding-left: 10px; /* asegúrate de que no haya desplazamiento adicional */
}

/* Tooltip wrapper */
.tooltip {
  position: relative;
  display: inline-block;
}

/* Info icon */
.info-icon {
  width: 15px;
  height: 15px;
  cursor: pointer;
  opacity: 0.8;
  vertical-align: middle;
  transition: opacity 0.2s;
  z-index: 1; /* asegura que el icono quede sobre el contenido */
}

.info-icon:hover {
  opacity: 1;
}

/* Tooltip box */
.tooltip .tooltiptext {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;

  position: fixed;
  top: auto;

  /* 👇 clave: centrado */

  /* the 2 lines of code below this line caused the issue with the hover text lightly misaligned*/
  /* 
  left: 50%;
  transform: translateX(-50%);
  */
  width: auto;
  min-width: 250px;
  max-width: 50vw; /* más flexible que 20vw */
  margin: 0;

  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  display: inline-block;
  overflow: hidden;

  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}


/* Mostrar tooltip */
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Flechita */
.tooltip .tooltiptext::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #333 transparent;
}







/* --- TOOLTIP STYLE ONLY --- */
.icon-tooltip a {
  position: relative;
}

/* Tooltip text */
.icon-tooltip a::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -36px; /* 👈 posición debajo del ícono */
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Tooltip arrow */
.icon-tooltip a::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

/* Show tooltip on hover */
.icon-tooltip a:hover::after,
.icon-tooltip a:hover::before {
  opacity: 1;
  visibility: visible;
}
.icon-tooltip a::after {
  transform: translateX(var(--tooltip-translate, -50%));
}