/* GENERAL */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica', sans-serif;
}

button, .button {
    background: #3b71d7;
    color: #fff;
    padding: 0.3em 0.6em;
    border-radius: 0.3em;
    border: none;
    transition: background ease 0.2s;
    cursor: pointer;
}

button:hover, .button:hover {
    background: #759be3;
}

button[disabled]{
    cursor: not-allowed;
    background: #666;
    color: #aaa;
}

input {
    border: 0.1em solid #3b71d7;
    border-radius: 0.3em;
}


/* NAVBAR */


#navbar {
    width: 100vw;
    height: 10vh;
    display: flex;
    flex-direction: row;
    border-bottom: 2px solid #3b71d7;
}

#navbar .nav_part {
    padding: 5px 10px;
    height: 100%;
    display: flex;
    flex-direction: row;
    flex-flow: wrap;
    align-items: center;
}

#navbar .nav_part:not(:last-child){
    border-right: 2px solid #3b71d7;
}

#logo {
    height: 100%;
    width: 50px;
    background: url('logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#navbar .select_file_container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#navbar #xml-file {
    margin-top: 0.5em;
}

.export_bounds_container {
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}

.export_bound {
    margin-bottom: 5px;
}

.export_bound.is_selecting input {
    background: red;
}

.export_bound.is_selecting button {
    background: red;
}

.export_quality_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 1em;
}

#export-quality-display.too_large {
    color: red;
}

.export_progress_container {
    display: flex;
    flex-direction: column;
}

.export_progress {
    font-size: 70%;
    text-align: center;
    position: relative;
    height: 1.5em;
    width: 10em;
    border: 1px solid #000;
    margin-top: 0.5em;
}

#export-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1;
    background: #95d495;
}

#export-progress-text {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 2;
    color: #000;
}

#export-progress-time-left {
    font-size: 70%;
    text-align: center;
}


/* MAIN */

#main {
    display: flex;
    flex-direction: row;
    width: 100vw;
    height: 90vh;
}


/* TREE VIEW SIDEBAR */

#doc-view {
    width: 20%;
    height: 100%;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#doc-view .doc_bottom {
    display: flex;
    justify-content: center;
    align-items: center;
}

#doc-view .doc_bottom button {
    font-size: 1.1em;
    padding: 0.5em 2em;
}

#tree-view {
    min-height: 80vh;
    max-height: 80vh;
    overflow-y: auto;
}

#tree-view .object {
    background: #d7e2f7;
    padding: 5px;
}

#tree-view .object:after {
    content: '';
    position: absolute;
    top: calc(0.5em + 5px);
    right: 100%;
    width: 7px;
    height: 0;
    border-top: 3px dashed #000;
}

#tree-view .object .name {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#tree-view .object.folder .collapse_toggle {
    width: 1em;
    height: 1em;
    background: url('images/arrowhead_up.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

#tree-view .object.folder.is_collapsed .collapse_toggle {
    background-image: url('images/arrowhead_down.png');
}

#tree-view .object.folder.is_collapsed .children {
    display: none;
}

#tree-view .object .object {
    margin: 0 0 8px 12px;
    position: relative;
    background: #c1cbde;
}

#tree-view .object .object .object {
    background: #d7e2f7;
}

#tree-view .object .object .object .object {
    background: #c1cbde;
}

#tree-view .object .object .object .object .object {
    background: #d7e2f7;
}

#tree-view .object .object:before {
  content: '';
  position: absolute;
  top: 0;
  right: calc(100% + 8px);
  width: 0px;
  height: calc(100% + 8px);
  border-left: 2px dashed #000;
}

#tree-view .object .options {
    display: flex;
    flex-direction: column;
    padding: 5px;
}

#tree-view .placemark .goto {
    font-style: italic;
    font-size: 75%;;
    margin-left: 1em;
    text-decoration: underline;
    color: #2986cc;
    cursor: pointer;
    transition: color ease 0.2s;
}

#tree-view .placemark .goto:hover {
    color: #1C5D8E;
}

#tree-view .object .color_container {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 0.5em;
}

#tree-view .object .color_container .color_circle {
    position: relative;
    display: block;
    width: 1em;
    height: 1em;
    border-radius: 10000px;
    background: url('images/color_circle_background.png');
    background-size: 16px;
    background-repeat: repeat;
    flex-shrink: 0;
}

#tree-view .object .color_container .color_circle .the_color {
    position: absolute;
    top: 0;
    left: 0;
    width: 1em;
    height: 1em;
    border-radius: 10000px;
}

#tree-view .object .color_container .color {
    margin-left: 0.5em;
    min-width: 5em;
}

#tree-view .placemark_type_select {

}


/* MAP */

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



/* POPUP */

.popup {
  position: fixed;
  top: 50vh;
  left: 50vw;
  translate: -50% -50%;
  background: #fff;
  padding: 2em;
  border-radius: 0.5em;
  border: 0.2em solid #555;
  min-width: 20vw;
  min-height: 20vh;
  max-width: 80vw;
  max-height: 80vh;
  overflow: auto;
}

.popup h2 {
    margin: 0 0 0.5em 0;
}

.popup h3 {
    color: #828282;
    font-style: italic;
    margin: 0 0 1.5em 0;
}

.popup p {

}

.popup .buttons {
    margin-top: 3em;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.popup .buttons button {
    color: #555;
    padding: 0.5em 2em;
    border-radius: 0.5em;
    border: 0.2em solid #555;
    transition: background ease 0.2s;
    cursor: pointer;
    background: #fff;
}

.popup .buttons button:hover {
    background: #e6e6e6;
}

.popup.error {
  border-color: red;
}

.popup.error h2 {
    color: red;
}

.popup.warn {
  border-color: #F1C232;
}

.popup.warn h2 {
    color: #F1C232;
}