/* ----------------------
   Global Styles
------------------------ */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    width: 100%;
}

/* ----------------------
   Map Container
------------------------ */
#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

/* ----------------------
   Sidebar
------------------------ */
#sidebar {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 23%; /* 280*/
    height: 90%;
    background: rgba(255,255,255,0.7); /* weiß, leicht transparent */
    z-index: 10;
    padding: 10px;
    font-family: sans-serif;
    overflow-y: auto;
}

/* Tabs */
.tabs {
  flex-wrap: wrap;
  display: flex;
  margin-bottom: 8px;
}

.tab-button {
  flex: 1;
  padding: 6px 12px;
  background: #ffffff00;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9em;
}

.tab-button.active {
  background: #000000;
  color: #ffffff;
}

/* Subtabs */
.subtabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.subtab-button {
  padding: 4px 10px;
  margin-right: 4px;
  background: #ffffff78;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
}

.subtab-button.active {
  background: #000000;
  color: #ffffff;
}

/* Tab contents */
.tab-content, .subtab-content {
    display: none;
}

.tab-content.active, .subtab-content.active {
    display: block;
}


/* ----------------------
   Others
------------------------ */
button {
    cursor: pointer;
}

#loadingSplash {
display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    display: flex;
}

#progressBar {
    width: 0%;
    height: 16px;
    background: rgb(169, 30, 230);
    border-radius: 8px;
}

#tooltip, #measureTooltip {
    display: none;
    position: absolute;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    pointer-events: none;
    font-family: sans-serif;
    font-size: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    background: white;
    z-index: 1000;
}

#measureTooltip {
    background: rgba(255, 255, 255, 0.9);
}

#toggleMeasure {
    padding: 4px 10px;
    margin-right: 4px;
    width: 48%;
    background: #eee;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}

#toggleMeasure.active {
    background: #000000;
    color: #ff6a00;
}

#heightLegend {
    position: absolute;     
    right: 1%;   
    top: 30px;
    height: 30%;
    width: auto;
    display: none;
}

#appendix {
    position: absolute;
    right: 0;
    top: 87%;          
    width: 60px; /* 280*/
    height: 25px;
    background: rgba(255,255,255,0.8); /* weiß, leicht transparent */
    z-index: 10;
    padding: 10px;
    font-family: sans-serif;
    overflow-y: auto;
}

#download {
    position: absolute;
    right: 0;
    top: calc(87% - 50px);          
    width: 60px; /* 280*/
    height: 25px;
    background: rgba(255,255,255,0.8); /* weiß, leicht transparent */
    z-index: 10;
    padding: 10px;
    font-family: sans-serif;
    overflow-y: auto;
}

.ortho-buttons {
    display: flex;
    justify-content: space-between;
}

.ortho-buttons button {
    flex: 1 1 auto;
    margin: 2px;
    padding: 4px 8px;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    color: black;
    transition: all 0.2s;
}

.ortho-buttons button.selected {
    background: black;
    color: white;
}

.soon-button {
    background: rgb(200, 200, 200);
    color: rgb(149, 149, 149);
    padding: 4px 10px;
    width: 48%;
    min-width: 50px;
    border: none;
    font-size: 0.9em;
}



/* ========================
   Mobile Layout
======================== */

@media (max-width: 768px) {

  #sidebar {
    position: absolute;
    left:  0;
    right: 0;
    bottom: 0;
    width: 97%;
    height: 40%;
    top: auto;
    transform: none;
    border-radius: 12px 12px 0 0;
    background: rgba(255,255,255,0.9);
  }

#heightLegend {
    position: absolute;     
    left: 1%;   
    top: 30px;
    height: 26%;
    width: auto;
    display: none;
}

#appendix {
    position: absolute;
    right: 0;
    top: 17%;          
    width: 50px; /* 280*/
    height: 23px;
    background: rgba(255,255,255,0.6); /* weiß, leicht transparent */
    z-index: 10;
    padding: 10px;
    font-family: sans-serif;
    overflow-y: auto;
}

#download {
    position: absolute;
    right: 0;
    top: calc(17% - 50px);          
    width: 50px; /* 280*/
    height: 23px;
    background: rgba(255,255,255,0.6); /* weiß, leicht transparent */
    z-index: 10;
    padding: 10px;
    font-family: sans-serif;
    overflow-y: auto;
}

.ortho-buttons button {
    flex: 1 1 auto;
    margin: 2px;
    padding: 4px 8px;
    cursor: pointer;
    border: none;
    background: rgba(0,0,0, 0.3);
    color: black;
    transition: all 0.2s;
}

.soon-button {
    background: none;
    color: rgb(149, 149, 149);
    padding: 2px 4px;
    width: 48%;
    min-width: 20px;
    border: none;
    font-size: 0.9em;
}
   
}
