@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Medium.woff2') format('woff2'),
    url('../fonts/Montserrat-Medium.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Black.woff2') format('woff2'),
    url('../fonts/Montserrat-Black.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

body {
    background: url('../img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #1d1d1b;
    font-family: 'Montserrat', sans-serif;
    font-weight: normal;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    min-height: calc(100vh - env(safe-area-inset-top));
    position: relative;
}

strong {
    font-weight: bold;
}

a {
    text-decoration: none;
    color: #e0191c;
}

button, a.button {
  background: #e5ac1c;
  color: #1d1d1b;
  border: 4px solid #1d1d1b;
  box-shadow: 5px 5px 0 #1d1d1b;
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  display: inline-block;
  text-align: center;
}

button:disabled, a.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary, a.button.secondary {
  background: #fff;
  padding: 5px 20px;
}

button.action, a.button.action {
  margin: 0 auto;
  display: block;
  width: fit-content;
}

a.button:active, button:active {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 #1d1d1b;
}

header {
  background: #fff;
  border: 5px solid #1d1d1b;
  box-shadow: 8px 8px 0 #1d1d1b;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
  margin: 20px;
  height: 100px;
}

header h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    font-weight: bold;
    color: #000;
    line-height: 50px;
    margin: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 70vw;
}

header h1 img {
    height: 70px;
    vertical-align: middle;
    margin-right: 20px;
}

header #home {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 40px;
    z-index: 1000;
}

header #back {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 40px;
    z-index: 1000;
}

header a {
    color: #000;
}

section#container {
    width: 1000px;
    margin: 20px auto;
    box-sizing: border-box;
}

section#buttons {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
}

section#buttons a.button {
    font-size: 24px;
    display: block;
    margin: 20px 0;
    text-align: center;
}

section#map {
    height: calc(100vh - 100px);
    height: calc(100vh - 100px - env(safe-area-inset-top));
    width: 100vw;
    position: relative;
}

section#map #mapContainer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

section#map aside#searchButton, section#map aside#addButton {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #e0191c;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 5px 5px 0 #1d1d1b;
}

section#map aside#addButton {
    right: 80px;
}

section#map aside#search {
    position: absolute;
    top: 20px;
    right: 70px;
    width: 300px;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 5px;
    display: none;
    z-index: 1000;
    display: none;
}

section#map aside#search input {
    width: 100%;
    padding: 5px 10px;
    font-size: 16px;
    border: 1px solid #e0191c;
    border-radius: 3px;
    box-sizing: border-box;
}

section#map aside#search.active {
    display: block;
}

section#map aside#search #searchResults {
    margin: 10px 0 0 0;
    list-style-type: none;
    padding: 0;
    border: 0;
}

section#map aside#search #searchResults li {
    padding: 5px 10px;
    border-bottom: 1px solid #e0191c;
    margin: 0;
    cursor: pointer;
}

section#map aside#search #searchResults li:first-of-type {
    border-top: 1px solid #e0191c;
}

.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background: #fff;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 10px;
    display: none;
    z-index: 1002;
    box-shadow: 5px 5px 0 #1d1d1b;
}

span.overCapacity {
    color: #f00;
}

.popup select, .popup input[type='date'], .popup input[type='number'], .popup textarea, .popup input[type='text'] {
    width: 100%;
}

.popup #closePopup {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.popup h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    line-height: 30px;
}

.popup.active {
    display: block;
}

section#map section#addToRoutePopup #addToRouteDescription {
    margin: 10px 0 0 0;
}

section#map section#addToRoutePopup button {
    margin: 10px auto 0 auto;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1001;
}

#overlay.active {
    display: block;
}

form#price {
    width: 600px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
    border: 2px solid #e0191c;
    border-radius: 10px;
    text-align: center;
}

form#price h2 {
    margin: 0;
    font-size: 30px;
    line-height: 40px;
}

form#price h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    line-height: 25px;
}

label {
    margin: 0 0 5px 0;
    display: inline-block;
}

form#addRoute input[type='text'], form#addRoute input[type='date'], form#addRoute input[type='number'], form#addRoute select, form#addRoute textarea, form#addRoute input[type='text'] {
    width: 100%;
    padding: 5px 10px;
    font-size: 16px;
    border: 1px solid #1d1d1b;
    border-radius: 3px;
    box-sizing: border-box;
    margin: 0 0 10px 0;
    background: #fff;
}

form#addRoute input[type='date'] {
    padding: 5px 0;
}

input:focus, select:focus {
    outline: 2px solid #e5ac1c;
}

form#price input[type='text'] {
    width: 100%;
    font-size: 20px;
    text-align: center;
    padding: 5px 10px;
    margin: 0 0 10px 0;
    border: 1px solid #e0191c;
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

button.addToRoute, a.openInMaps, button.editLocation {
    width: 100%;
    height: auto;
    line-height: normal;
    font-size: 14px;
    padding: 5px 10px;
    margin: 10px 0 0 0;
    cursor: pointer;
    box-sizing: border-box;
}

a.openInMaps, button.remove {
    background: #e0191c;
    color: #fff !important;
}

section#content {
    width: 90vw;
    max-width: 800px;
    margin: 20px auto;
}

section#content table {
    width: 100%;
    border-collapse: collapse;
}

section#content table th, section#content table td {
    text-align: left;
}

section#content table tr {
    height: 30px;
    border-bottom: 1px solid #ccc;
}

footer {
    position: fixed;
    bottom: -50px;
    left: 0;
    width: 100vw;
    height: 50px;
    background: #000;
    padding: 10px 0;
    color: #fff;
    text-align: center;
    font-size: 20px;
    line-height: 30px;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
    transition: 1s all ease-in-out;
    z-index: 2000;
}

footer.active {
    bottom: 0;
}

input, select, textarea {
    font-family: 'Montserrat', sans-serif;
}

select, input[type='date'], input[type='number'], textarea, input[type='text'] {
    width: 300px;
    padding: 5px 10px;
    font-size: 16px;
    border: 1px solid #1d1d1b;
    border-radius: 3px;
    box-sizing: border-box;
    margin: 0 0 10px 0;
    background: #fff;
}

input[type='date'] {
    padding: 5px 0;
    text-align: center;
}

textarea {
    resize: none;
    height: 100px;
}

aside#header select {
    margin: 0 0 10px 0;
}

aside#header a.button {
    float: right;
    display: block;
    font-size: 16px;
    margin: 0;
}

aside#header::after {
    content: "";
    display: table;
    clear: both;
    margin-bottom: 20px;
}

button span.material-symbols-outlined, a.button span.material-symbols-outlined {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 3px;
    color: #000;
    background: #fff;
    border-radius: 50%;
    position: relative;
    top: -1px;
}

section#locations ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    border-top: 1px solid #000;
}

section#locations ul li {
    border-bottom: 1px solid #000;
    padding: 10px 0;
    display: flex;
    align-items: center;
}

section#locations ul li span.draghandle {
    margin: 0 10px 0 0;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

section#locations ul li.state-0 aside.info {
    color: #999;
}

section#locations ul li.state-0 .draghandle {
    opacity: 0;
    pointer-events: none;
}

section#locations ul li aside.actions {
    margin-left: auto;
    text-align: right;
}

section#locations ul li aside.actions span.material-symbols-outlined {
    cursor: pointer;
    margin-left: 20px;
    font-size: 30px;
    background: #e0191c !important;
    vertical-align: middle;
    color: #fff !important;
    border-radius: 4px;
    box-shadow: 5px 5px 0 #1d1d1b;
}

section#locations ul li aside.actions span.material-symbols-outlined:active {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 #1d1d1b;
}

section#locations ul li aside.actions span.litersInfo {
    font-size: 14px;
    color: #000 !important;
    margin-left: 0;
}

section#locations ul li.state-1 aside.actions span.enterLocationInfo {
    display: none;
}

section#locations ul li.state-1:not(.state-1 ~ .state-1) aside.actions span.enterLocationInfo {
    display: inline-block !important;
}

button#startCapacity {
    float: right;
    margin: 0;
}

.burst {
  position: absolute;
  top: -18px;
  right: -14px;
  background: #e5ac1c;
  color: #1d1d1b;
  border: 4px solid #1d1d1b;
  border-radius: 50%;
  padding: 12px;
  font-weight: 900;
  transform: rotate(12deg);
}

.leaflet-container {
    font-family: 'Montserrat', sans-serif !important;
}

table.fuelInfo {
    text-align: center;
    border-collapse: collapse;
}

table.fuelInfo th {
    font-weight: normal;
    vertical-align: bottom;
    border-bottom: 1px solid #000;
}

table.fuelInfo tr td {
    padding: 5px 0;
    border-bottom: 1px solid #000;
}

table.fuelInfo tr:last-of-type td {
    border-bottom: 0;
}

@media only screen and (max-width: 1200px) {
    section#container {
        width: 90vw;
        margin: 20px auto;
    }

    header h1 .name {
        display: none;
    }
}

.hidden {
    display: none !important;
}