:root {
  --dark-background-color: #121212;
  --dark-surface-color: #121212;
  --dark-theme-overlay-01dp: rgba(255,255,255,0.05);
  --dark-theme-overlay-02dp: rgba(255,255,255,0.07);
  --dark-theme-overlay-03dp: rgba(255,255,255,0.08);
  --dark-theme-overlay-04dp: rgba(255,255,255,0.09);
  --dark-theme-overlay-06dp: rgba(255,255,255,0.11);
  --dark-theme-overlay-08dp: rgba(255,255,255,0.12);
  --dark-theme-overlay-12dp: rgba(255,255,255,0.14);
  --dark-theme-overlay-16dp: rgba(255,255,255,0.15);
  --dark-theme-overlay-24dp: rgba(255,255,255,0.16);
  --dark-theme-on-background: white;
  --dark-theme-on-surface: white;
  --dark-theme-surface-hovered: rgba(255,255,255,0.04);
  --dark-theme-surface-focused: rgba(255,255,255,0.12);
  --dark-disabled-label-color: rgba(255,255,255,0.38);
  --dark-disabled-container-color: rgba(255,255,255,0.12);
  --dark-high-emphasis-text-color: rgba(255,255,255,0.87);
  --dark-medium-emphasis-text-color: rgba(255,255,255,0.60);
  /* --dark-primary-color: #bb86fc;  */
  --dark-primary-color: #12BCFA;
  --dark-primary-color-bg: #12BCFA1F;
  --dark-theme-shadow-24dp: 0 9px 46px 8px rgba(0, 0, 0, 0.14),
                            0 11px 15px -7px rgba(0, 0, 0, 0.12),
                            0 24px 38px 3px rgba(0, 0, 0, 0.20);
}

html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--dark-background-color);
    font-family: 'Roboto', sans-serif;
}

#map {
    width: 100vw;
    height: 100vh;
    background-color: var(--dark-background-color);
    cursor: crosshair;
}

/* Common style for top and bottom toolbars. */
.toolbar {
  position: fixed;
  left: 50%;
  width: 450px;
  height: auto;
  margin: 0px 0 0 -233px;
  padding: 8px;
  border-radius: 10px;
  z-index: 100;
  background-color: rgba(0,0,0,0.8);
  box-sizing: border-box;
}

@media all and (max-width: 768px) {
  .toolbar {
      left: 0;
      width: 100%;
      border-radius: 0px;
      margin: 0;
    }
}

  .navbar {
    top: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: var(--dark-medium-emphasis-text-color);
    flex-flow: row wrap;
    touch-action: none;
  }

  .navbar > div {
    flex-grow: 1;
    text-align: center;
    font-size: 0.75em;
  }

  .navbar > button {
    flex-grow: 1;
    text-align: center;
    font-size: 0.75em;
  }


  #timecontrol {
    bottom: 0;
    color: var(--dark-theme-on-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
  }


  .playbar {
    width: 100%;
    height: auto;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-flow: row;
    padding: 8px;
    touch-action: none;
  }

  .playbar > div {
    flex-grow: 1;
    text-align: center;
    /**font-size: 2em;**/
  }

  #timeline {
    display: flex;
    margin: 0;
    padding: 0;
    width: 100%;
    z-index: 100;
    border-radius: 10px;
  }

  #timeline > div {
    flex: 1 1 0;
    height: 4px;
    margin: 0;
    
  }

  .timeline-on {
    /* background-color:  #7B7C7D; */
    background-color: var(--dark-primary-color);
    border-left: 1px solid rgb(0, 84, 99);
  }
  .timeline-off {
    background-color: #3C3D3E;
  }

@supports (padding: max(0px)) {
    .navbar {
        padding-top: max(8px, env(safe-area-inset-top));
    }
    #timecontrol {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}
  
.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
      -webkit-user-select: none; /* Safari */
         -moz-user-select: none; /* Firefox */
              user-select: none;
                   cursor: default;
}

i.material-icons:before{display:none;}

#currentTimeTxt {
  color: var(--dark-medium-emphasis-text-color);
}

#infopanel {
    position: absolute;
    background-color: rgba(0,0,0,0.7);
    color: #cccccc;
    /* font-family: 'Noto Sans', sans-serif; */
    font-size: 0.9em;
    z-index: 50000;
    margin: 0px;
    padding: 0px;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    overflow-y: auto;
    max-height: 100vh;
}

.infoItem {
    padding: 0px;
    margin: 0px;
    flex: 1;
}

.infoLabel {
    background-color: var(--dark-primary-color-bg);
    color: var(--dark-primary-color);
    font-weight: bold;
    text-align: center;
    margin: 2px;
    padding: 4px;

}

.infoValue {
    text-align: center;
    border: 0px solid;
    margin: 2px;
    padding: 5px;
}

@media screen {
    #infopanel {
        top: 0px;
        left: 0px;
        width: 140px;
        display: block;
    }
}

@media all and (max-width: 768px) {

    #infopanel {
        top: auto;
        bottom: 0px;
        left: 0px;
        width: 100%;
        height: 70px;
        display: none;
    }
   
     #infoItemMap, #infoItemCursor, #infoItemObservation, #infoItemLightning, #infoItemPosition, #infoItemSatellite, .infoLabel {
        display: none;
    }

    .infoValue {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        margin: 0px;
    }
    #radarDateValue, #currentDateValue, #currentUTCTimeValue {
        display: none;
    }
}

#layersButton, #infoItemMap {
    display: none;
}

#currentMapTime {
  font-size: 1.3em;
  color: var(--dark-theme-on-surface);
}

#currentMapDate {
  font-size: 0.8em;
  color: var(--dark-theme-on-surface);
}

#currentSpeed {
  display: none;
  font-size: 1.4em;
  color: var(--dark-theme-on-surface);
}

.valueTxtBig {
    font-size: 1.5em;
    color: var(--dark-theme-on-surface);
}

#currentLocalTimeValue {
  font-size: 1.5em;
  color: var(--dark-theme-on-surface);
}

.selected {
    background-color: rgba(255,255,255,0.7);
    color: #000000;
}

.selectedButton {
    /**color: #5BD5FD; */
    color: var(--dark-theme-on-surface);
}

.flexColumn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.flexCell {
    flex: 1;
    padding: 4px;
    border-radius: 3px;
   /* flex-basis: 20%;*/
}

#radarPlayTxt, #infoItemRadar, #infoItemMap, #infoItemSatellite, #infoItemObservation, #infoItemLightning, #radar, #satellite {
    cursor: default;
}

.infoItem .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    
    /* Position the tooltip */
    position: absolute;
    z-index: 1;
    top: -5px;
    left: 105%;
}

.infoItem:hover .tooltiptext {
    visibility: visible;
}

#playList {
    display: flex;
    flex-direction: column;
    background-color: rgba(0,0,0,0.8);
    color: var(--dark-theme-on-surface);
    position: absolute;
    bottom: -90vh;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 90vh;
    padding-top: 5px;
    padding-bottom: 75px;
    transition: bottom 300ms cubic-bezier(0.17, 0.04, 0.03, 0.94);
    overflow-y: auto;
    box-sizing: border-box;
    border-radius: 10px;
    border: 0px;
 }

 #playList > div {
  flex-grow: 1;
  padding: 5px;
  padding-top: 10px;
  padding-bottom: 10px;
  margin: 5px;
  margin-left: 10px;
  margin-right: 10px;
  background-color: var(--dark-theme-overlay-02dp);
}

#playList > div:hover {
  background-color: var(--dark-theme-overlay-04dp);
}

#playList > div > div {
  padding: 1px;
}

.playListDisabled {
  color: var(--dark-disabled-label-color);
  background-color: var(--dark-disabled-container-color);
}

.name {
  color: var(--dark-medium-emphasis-text-color);
  font-size: 0.7em;
}

.title {
  color: var(--dark-theme-on-surface-color);
  font-size: 1.1em;
  padding-bottom: 2px;
}

#layers > div > .title {
  height: 3em;
}

.abstract {
  color: var(--dark-high-emphasis-text-color);
  font-size: 0.8em;
  padding-bottom: 5px;
  text-align: justify;
}

.attribution {
  color: var(--dark-medium-emphasis-text-color);
  font-size: 0.8em;
}

.styles {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
}

.styles > div {
  background-color: var(--dark-primary-color-bg);
  color: var(--dark-primary-color);
  border-radius: 3px;
  padding: 4px;
  margin-top: 2px;
  margin-bottom: 2px;
  margin-right: 5px;
  font-size: 0.8em;
  border-radius: 3px; 
}

.slider {
  -webkit-appearance: none;
  /* width: 100%; */
  height: 15px;
  border-radius: 5px;   
  background: #00D8FF;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.layerStyle {
  padding: 2px;
  background-color: rgb(27, 79, 88);
}

.layerStyle:hover {
  background-color: #00D8FF;
}

.red-square {
  display: none;
  background-color: rgba(0,0,0,0.8);
  color: var(--dark-theme-on-surface);
  width: 300px;
  height: 300px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 4px;
}

.layerSelect {
  background-color: rgba(0,0,0,0.95);
  color: var(--dark-theme-on-surface);
  width: 75%;
  height: 80%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  overflow-y: auto;
  margin-left: 70px;
  display: none;
  grid-column-gap: 20px;
  grid-row-gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  border-radius: 10px;
}

@media (max-width: 768px) {
  .layerSelect {
    margin-left: 0px;
    width: 95%;
    height: 80%;
  }
}

.layerSelectItem {
  background-color: var(--dark-theme-overlay-02dp);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--dark-theme-overlay-02dp);
}

.layerSelectItem:hover {
  border: 1px dotted var(--dark-primary-color);
}

.selectedLayer {
  background-color: var(--dark-primary-color-bg);
  border: 1px solid var(--dark-primary-color);
}

.responsiveImage {
  width: 100%;
  height: auto;
}

#help {
  display: none;
  background-color: var(--dark-surface-color);
  border-radius: 5px;
  box-shadow: var(--dark-theme-shadow-24dp);
  color: var(--dark-theme-on-surface);
  max-width: 300px;
  padding: 20px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

#help h4 {
  margin-top: 0;
  color: #f9f9f9;
}

#help table {
  background-color: var(--dark-theme-overlay-01dp);
  border-collapse: collapse;
  width: 100%;
}

#help td {

  padding: 8px;
  color: #f9f9f9;
}

#help tr:nth-child(even) {
  background-color: var(--dark-theme-overlay-02dp);
}

#help kbd {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2), 0 0 0 2px #ffffff inset;
  color: #333;
  display: inline-block;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.4;
  padding: 2px 4px;
  white-space: nowrap;
}
