:root {
  --header-height: 50px;
  --mode-height: 40px;
  --bg: #ffffff;
  --fg: #000000;
}

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

.map-frame {
    position: absolute;
    inset: 10px;
    border: 3px solid #555;
    border-radius: 10px;
    overflow: hidden;
    margin-top: var(--header-height);
}

.header-frame {
    position: absolute;
    inset: 2px;
    overflow: hidden;
    height: 45px;
    top: 7px;
}

#map {
    width: 100%;
    height: 100%;
}

#pointer-coords {
    position: absolute;
    z-index: 1000;
    right: 4em;
    font-size: 18px;
    left: auto;
    margin-top: calc(20px + var(--header-height));
}

.ol-popup {
    position: absolute;
    background: var(--bg);
    color: var(--fg);
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #999;
}

.ol-zoom {
  top: 0.5em;
  right: 0.5em;
  left: auto;
}

.cesium-zoom {
    position: absolute;
    top: 4.4em;
    right: 1.4em;
    z-index: 3000;
    background-color: (128, 128, 128, 0.25);
    border-radius: 4px;
}

.cesium-zoom button {
    display: none;
    margin: 1px;
    padding: 0;
    color: #666666;
    font-weight: bold;
    text-decoration: none;
    font-size: inherit;
    text-align: center;
    height: 1.375em;
    width: 1.375em;
    line-height: .4em;
    background-color: white;
    border: none;
    border-radius: 2px;
}

.app {
    position: absolute;
    top: calc(20px + var(--header-height));
    left: 20px;
    width: 300px;
    height: calc(100% - 40px - var(--header-height));
    background: var(--bg);
    color: var(--fg);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.app.closed {
    display: none;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #444;
    color: white;
    border-radius: 10px 10px 0 0;
}

.app-header button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.toolbar {
    padding: 10px;
    overflow-y: auto;
}

.toolbar.closed {
    display: none;
}

.app-icon{
    position: absolute;
    left: 20px;
    width: 0px;
    height: 0px;
    border: none;
    font-size: 22px;
    cursor: pointer;
    z-index: 2001;
    display: block;
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.app-icon.visible {
    display: block;
}

#expert-settings-app-icon {
    top: calc(220px + var(--header-height) + var(--mode-height));
}

#proj-app-icon {
    top: calc(100px + var(--header-height) + var(--mode-height));
}

#tiling-app-icon {
    top: calc(140px + var(--header-height) + var(--mode-height));
}

#layer-app-icon {
    top: calc(60px + var(--header-height) + var(--mode-height));
}

#tile-app-icon {
    top: calc(180px + var(--header-height) + var(--mode-height));
}

#home-icon {
    top: calc(20px + var(--header-height) + var(--mode-height));
}

#zone-icon {
    top: calc(60px + var(--header-height) + var(--mode-height));
}

#basic-tiling-icon {
    top: calc(100px + var(--header-height) + var(--mode-height));
}

#basic-settings-app-icon {
    top: calc(140px + var(--header-height) + var(--mode-height));
}


.bbox {
  display: none;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.5rem;
  align-items: center;
  justify-items: center;
  margin-bottom: 10px;
  margin-top: 10px;
}

.north {
  grid-column: 2;
  grid-row: 1;
}

.west {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
}

.east {
  grid-column: 3;
  grid-row: 2;
  justify-self: start;
}

.south {
  grid-column: 2;
  grid-row: 3;
}

.bbox input {
  width: 2rem;
}

.bbox label {
  white-space: nowrap;
}

#query-tiles{
    width: 100px;
    margin-top: 10px;
    margin-left: 1rem;
}

.tile-results{
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border-radius: 10px;
    border-color: #999;
    background-color:#f0f0f0;
    margin-top: 20px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 25px;
    height: 100%;
    overflow-y: auto;
}

#tile-list {
  list-style: none;
  padding: 0;
}

.tile-item {
  padding: 6px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 5px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(241, 238, 238, 0.4);
  background: rgba(250, 249, 249, 0.6);
  color: black;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.tile-item.active {
  background: rgba(251, 186, 74, 0.6);
}


#toggle-3d-icon {
    position: absolute;
    top: 125px;
    right: 70px;
    width: 0px;
    height: 0px;
    border: none;
    font-size: 40px;
    cursor: pointer;
    z-index: 1000;
    display: block;
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

#toggle-3d-icon.visible {
    display: block;
}


#continent-list {
  list-style: none;
  padding: 0;
  vertical-align: middle;
  margin-top: 20px;
}

.continent-item {
  padding-left: 0;
  background: white;
  color: black;
  cursor: grab;
  gap: 8px;
  vertical-align: middle;
  padding-top: 5px;
  padding-bottom: 5px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  border-radius: 10px;  
  background-color:#f0f0f0;
  margin-top: 10px;
  margin-left: 10px;
  margin-right: 10px;
}

.continent-item.dragging {
  opacity: 0.5;
}

.continent-header{
    margin-bottom: 10px; 
    padding-left: 10px;
}

.tiling-list {
  list-style: none;
  padding: 0;
  margin-left: 0px;
}

.tiling-item {
  padding: 6px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 5px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(241, 238, 238, 0.4);
  background: rgba(122, 122, 122, 0.6);
  color: black;
  align-items: center;
  gap: 8px;
  cursor: grab;
}

.tiling-item.dragging {
  opacity: 0.5;
}

.continent-item.collapsed .tiling-item {
  display: none;
}

.toggle-tiling{
    cursor: pointer;
}

.change-add-del{
    float: right;
    margin-right: 5px;
    cursor: pointer;
}

.do-add-del{
    float: right;
    margin-right: 5px;
    cursor: pointer;
}

.select-tiling{
    float: right;
    margin-right: 5px;
}

#company-icon {
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
}

#header-title{
    margin-left: 10px;
}

#header-tools{
    float: right;
    line-height: 45px;
    margin-right: 10px;
}

#modeContainer {
    position: absolute;
    top: calc(15px + var(--header-height));
    left: 20px;
    font-size: 25px;
    height: 50px;
    z-index: 2001;
    display: block;
}

#basicMode{
    font-size: 16px;
    margin-right: 5px;
}

#expertMode{
    font-size: 16px;
}

#modeContainer button.active{
    background-color: #dcdcdc;
    border-color: #000000;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.14);
}

#modeContainer button {
    background-color: #f2f2f275;
    color: #333;
    border: 1px solid #d6d6d6;
    padding: 5px 9px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* initial subtle lift */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.github-icon {
    display: inline-block; 
    margin-right: 10px;
}

.github-icon img{
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 12px; 
}

.help-icon {
    display: inline-block; 
    font-size: 35px;
    text-decoration: none;
}

#layer-toolbar input[type="color"]{
  width: 15px !important;
  height: 15px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 50%;
}

input[type="color"]::-webkit-color-swatch {
  border-radius: 50%;
}

input[type="color"]::-moz-color-swatch {
  border-radius: 50%;
}

.cesium-viewer-bottom {
  right: 10px !important;
  left: auto !important;
  bottom: 10px !important;
  text-align: right;
}

.cesium-viewer-credits {
  justify-content: flex-end;
}

.loader-container{
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 30px;
    float: left;
    width: 150px;
}

#load-tiling{
    width: 100px;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    animation: spin 2s linear infinite;
    display: inline-block;
    margin-left: 7px;
    vertical-align: middle;
 }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.query-tools-container{
    margin-left: 10px;
    width: 300px;
}

#bbox-button {
    width: 15px;
    height: 10px;
    border: none;
    font-size: 38px;
    cursor: pointer;
    z-index: 2001;
    display: inline-block;
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

#bbox-draw-button {
    margin-left: 40px;
    width: 1px;
    height: 1px;
    border: none;
    font-size: 25px;
    cursor: pointer;
    z-index: 2001;
    display: inline-block;
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

#poly-draw-button {
    margin-left: 40px;
    width: 1px;
    height: 1px;
    border: none;
    font-size: 22px;
    cursor: pointer;
    z-index: 2001;
    display: inline-block;
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.copy-tiles-container{
    margin-left: 10px;
    margin-bottom: 50px;
}

.copy-tile-icon{
    width: 1px;
    height: 1px;
    border: none;
    font-size: 25px;
    cursor: pointer;
    z-index: 2001;
    display: block;
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

#copy-traffos-icon {
    margin-left: 47px;
}

#copy-e7tiles-icon {
    margin-left: 92px;
}

#del-e7tiles-icon {
    margin-left: 142px;
}

.continent-container{
    margin-top: 10px;
    margin-left: 10px;
}

#continent-selection{
    margin-left: 10px;
    margin-right: 10px;
    float: right;
}

.tiling-id-container{
    margin-top: 10px;
    margin-left: 10px;
}

#tiling-id{
    text-align: right;
    float: right;
    width: 10%;
    margin-right: 10px;
}

.tilesize-container{
    margin-top: 10px;
    margin-left: 10px;
}

#tilesize{
    text-align: right;
    float: right;
    width: 55%;
    margin-right: 10px;
}

.coord-container{
    margin-top: 10px;
    margin-left: 10px;
}

.coord{
    text-align: right;
    float: right;
    width: 80%;
    margin-right: 10px;
}

.coord-e7{
    text-align: right;
    float: right;
    width: 65%;
    margin-right: 10px;
}

#proj-continent-selection{
    margin-right: 10px;
    float: right;
}

#reproject-coord{
    margin-top: 20px;
    width: 100px;
    margin-left: 10px;
}

.proj-switch-container{
    height: 50px;
    margin: auto;
    width: 30px;
    vertical-align: middle;
}

#proj-switch-icon {
    width: 0px;
    height: 0px;
    border: none;
    font-size: 30px;
    cursor: pointer;
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin-top: 7px;
}

.slider-wrap{
    margin-left: 10px;
    margin-top: 20px;
}

.slider-emoji {
  font-size: 20px;
  width: 30px;
  height: 30px;
  pointer-events: none;
  background: #dddcdc;
  border-radius: 10px;
  text-align: center;
  display: inline-block;
}

#stroke-width-slider{
    display: inline-block;
    width: 83%;
}

#opac-slider{
    display: inline-block;
    width: 83%;
}

.label-tiles-switch-container{
    margin-top: 20px;
    margin-left: 10px;
}

.tile-label-checkbox{
    margin-left: 10px;
}

#sampling-switch-container{
    margin-left: 10px;
    margin-top: 20px;
}

#tiles-tiling{
    margin-left: 10px;
}

.tiles-grid-settings{
    margin-left: 45px; 
    margin-top: 20px;
}

#sampling-input{
    text-align: right;
    width: 10%;
}


.coord-copy-icon {
    margin-left: 5px;
    margin-top: 5px;
    width: 1px;
    height: 1px;
    border: none;
    font-size: 25px;
    cursor: pointer;
    z-index: 2001;
    display: inline-block;
    fill: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}