/* File:        style.css
 * Author:      Erik Johannes Husom
 * Description: Stylesheet for Peakbase
 */

:root {
    --main-font-color: rgb(57, 56, 56);
    --secondary-font-color: rgb(142, 142, 142);
    --tertiary-font-color: rgb(70, 70, 70);
    --button-download-color: #4caf50;
    --button-download-hover-color: white;
    --button-import-color: #3377ff;
    --button-import-hover-color: white;
    --button-bg-color: #f0f0f0;
    --button-text-color: black;
    --button-border-color: black;
    --button-hover-bg-color: #ddd;
    --button-hover-text-color: black;
    --border-radius: 0.5rem;
    --header-height: 80px;
}

html, body {
    font-family: "Helvetica", "Arial", sans-serif;
    color: var(--main-font-color);
    /* padding: 0; */
    display: flex;
    flex-direction: column;  /* Stack the header and main vertically */
    height: 100vh;  /* Full viewport height */
    margin: 0;  /* Remove default margin */
}

/*Header{{{*/
header {
    /* padding: 0.3em; */
    /* padding-top: 0.6em; */
    /* padding-left: 0.8em; */
    margin-top: 0.5em;
    margin-left: 0.8em;
    margin-bottom: 0.8em;
    /* margin: 0.8em; */
    /* border-bottom: 2px solid rgb(233, 233, 233); */
    /* width: 100%; */
}

#title {
    display: inline-block;
    vertical-align: middle;
    padding-right: 0.5em;
}

header h1 {
    display: inline;
    font-size: 1.2em;
}

.subheading {
    color: var(--secondary-font-color);
    text-transform: lowercase;
    display: table-cell;
}
/*}}}*/

/*Nav{{{*/
nav {
    display: inline;
    /* padding: 1em; */
}

#showInstructions {
    width: 1.5em;
    vertical-align: middle;
    margin: 0.6em;
    cursor: pointer;
}

#backToApp {
    padding: 0.4em;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid;
  border-radius: var(--border-radius);
  width: auto;
  padding: 6px 8px;
  z-index: 10000;
}

.dropdown:hover .dropdown-content {
  display: block;
}
/*}}}*/

/* Map and edit forms{{{ */
#map {
    /* width: 100%; */
    /* height: 100%; */
    /* height: 100%; */
    flex-grow: 1;  /* This will fill up the remaining space */
    /* overflow-y: auto;  /1* Enable scroll if content is more *1/ */
}

.peaks {
    border-radius: 50%;
    background-color: rgba(217, 83, 79, 0.9);
    text-align: center;
    vertical-align: middle;
    color: white;
}

.peaks-visited {
    border-radius: 50%;
    background-color: rgba(66, 139, 202, 0.9);
    text-align: center;
    vertical-align: middle;
}

.newPeakInput {
    display: inline;
}

#newPeakEle {
    width: 12ch;
}

.peakInfoLabel {
    font-weight: 600;
    white-space: nowrap;
}

.menuItem {
    margin-left: 0.5em;
}

.hidden {
    display: none;
}

.header-item {
    padding: 0.3em;
    background-color: #f7f7f7;
    border: 1px solid #686868;
    border-radius: var(--border-radius);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.header-form {
    display: none;
}

.peaksStatistics {
    display: inline-flex;
}

details {
    display: inline;
}

details ol {
    position: absolute;
    z-index: 1000;
    background: #ffffff;
    margin: 0;
    padding: 0.2em;
    border: 1px solid;
    border-radius: var(--border-radius);
    list-style: none;
    cursor: pointer;
}
/* }}} */

/*Hr (line){{{*/
hr {
  border: 0.1rem solid rgb(233, 233, 233);
}
/*}}}*/

/*Links{{{*/
a:link, a:visited {
  color:  var(--secondary-font-color);
  text-decoration: none;
}

a:hover {
  color: rgb(17, 131, 185);
}

a.ghost:link, a.ghost:visited, a.ghost:hover {
  color: var(--main-font-color);
  text-decoration: none;
}
/*}}}*/

/*Footer{{{*/
footer {
  right: 0;
  bottom: 0;
  left: 0;
  margin-top: 0.5rem;
  padding: 0.5rem;
  text-align: center;
}
/*}}}*/

/* Info site{{{ */
article {
    max-width: 70ch;
    padding: 3em 1em;
    margin: auto;
    line-height: 1.5;
    font-size: 1.25em;
}
/* }}} */

/* Buttons{{{ */
.button, .button.download, .button.import {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: 1px solid var(--button-border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1em;
    margin: 0.1em;
}

.button:hover {
    background-color: var(--button-hover-bg-color);
    color: var(--button-hover-text-color);
}

.button.download {
    background-color: var(--button-download-color);
}

.button.download:hover {
    background-color: var(--button-download-hover-color);
    color: var(--button-download-color);
}

.button.import {
    background-color: var(--button-import-color);
    color: white;
}

.button.import:hover {
    background-color: var(--button-import-hover-color);
    color: var(--button-import-color);
}
/* }}} */

/* Loading spinner{{{ */
#loading-background {
    display: none;
    position: fixed;
    z-index: 998;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #000;
    opacity: 0.4;
}

.spinner {
    display: none;
    position: fixed;
    z-index: 999;
    height: 2em;
    width: 2em;
    overflow: show;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    border: 0.2em solid #ccc;
    border-top: 0.2em solid #1d2d50;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

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

/* Tutorial{{{ */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  border-radius: var(--border-radius);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover, .close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

img.legend {
    width: 1.0em;
    vertical-align: middle;
    margin-left: 1em;
    margin-right: 0.3em;
    /* padding-bottom: 0.3em; */
}
/* }}} */

/*Tablets and mobile devices{{{*/
@media screen and (max-width: 992px) {
    article {
        width: 100%;
    }
    .peaksStatistics {
        display: none;
    }
    .subheading {
        display: none;
    }
}
/* ======== Tablets ========= */
/* @media screen and (min-width: 481px) and (max-width: 991px) { */
/* } */
/*}}}*/

/*Laptops and large screens{{{*/
@media screen and (min-width: 992px) {
}
/*}}}*/
