html {
    box-sizing: border-box;
    height: 100%;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    height: 100%;
    background-color: #fff;
    color: #222;
}

.row > * {
    padding: 0;
}

.main {
    width: 100%;
    height: 100%;
}

.hide {
    display: none !important;
}

.main__inner {
    height: 100%;
}

.map__container {
    height: 100%;
}

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

.leaflet-control-zoom {
    display: flex;
    flex-direction: column;
}

.leaflet-control-zoom-in:hover::before,
.leaflet-control-zoom-out:hover::before,
.leaflet-control-home:hover::before {
    transform: scale(1.1);
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-home {
    position: relative;
    overflow: hidden;
}

.leaflet-control-home {
    order: 1;
}

.leaflet-control-zoom-in::before,
.leaflet-control-zoom-out::before,
.leaflet-control-home::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

/* Base map control styles */
.base-map-control {
    position: relative;
    background: none;
    /* padding: 5px; */
    border-radius: 2px;
    /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); */
    /* cursor: pointer; */
    z-index: 5;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.base-map-maps {
    position: absolute;
    padding: 3px;
    top: 0;
    right: 0;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: #fff;
    transition: left 0.4s ease;
    transition: width 0.4s ease;
}

.base-map-maps.open {
    right: 45px;
    width: 150px;
}

.base-map-maps--list {
    width: auto;
    height: 100%;
    display: flex;
    gap: 5px;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.base-map-maps--item {
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.base-map-maps--image {
    width: 100%;
    height: 100%;
}

.base-map-maps--image.selected {
    border: 1px solid #0d6efd;
    transition: border 0.3s ease;
}

.base-map-name {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 10px;
}

.base-map-button {
    display: block;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    width: 40px;
    height: 40px;
    z-index: 4;
    cursor: pointer;
    border-radius: 4px;
}

.base-map-button:hover::before {
    transform: scale(1.1);
}

/* Loader */
.map__loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #dee2e6;
    z-index: 1100;
}

.close {
    animation: closeAnimation 1s ease forwards;
}

.map__loader-content {
    position: relative;
    width: 200px;
    height: 200px;
}

.earth {
    width: 100%;
    height: 100%;
    /* background: url('https://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg') no-repeat center/cover; */
    background: url("https://upload.wikimedia.org/wikipedia/commons/f/f0/Google_Earth_Icon.png?20170422183509") no-repeat center/cover;
    border-radius: 50%;
    animation: spin 2.5s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes closeAnimation {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.contour-tooltip {
    background: unset;
    border: none;
    box-shadow: unset;
}

/* ///////////////////////// */

.header {
    /* height: 100px; */
    width: 100%;
    border: 1px solid #dfdfdf;
    grid-area: header;
    background-color: #fff;
}

.main {
    /* height: auto; */
    border: 1px solid #dfdfdf;
    grid-area: main;
    background-color: #fff;
    margin-top: 5px;
}

.filter {
    border: 1px solid #dfdfdf;
    grid-area: filter;
    background-color: #fff;
    margin: 5px 0 0 5px;
    padding: 8px;
    overflow-y: scroll;
}

.zoom__inner {
    width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 8px;
}

.soil_elements {
    height: auto;
}

.soil_elements-lead {
}

.soil_elements-list {
    padding: 0;
    width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 8px;
    list-style-type: none;
}

.soil_element:not(:last-child) {
    width: 100%;
    margin-bottom: 4px;
}

.soil_element .btn {
    width: 100%;
}

.soil_element .btn:active {
    box-shadow: none;
    background-color: darkgreen !important;
}

.soil_element .btn:focus {
    color: #ffffff;
    /* background-color: #161617;  */
    border-color: #494f57;
}

/* .soil_element .btn:active {
  background-color: unset;
} */

.soil_element-btn:active {
}

.btn-primary {
}

.soil_element-btn {
}

.monitoring {
    height: 100%;
    /* overflow: hidden; */
}

.monitoring-lead {
}

.monitoring_inner {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 8px;
    /* overflow: auto; */
}

.accordion-body {
    padding: 8px !important;
}

.button-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

/* one item */
.btn-years button:nth-child(1):only-child {
    flex: 1 1 100%;
    max-width: 100%;
}

/* two items */
.btn-years button:first-child:nth-last-child(2),
.btn-years button:first-child:nth-last-child(2) ~ button {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
}

/* three items */
.btn-years button:first-child:nth-last-child(3),
.btn-years button:first-child:nth-last-child(3) ~ button {
    flex: 1 1 calc(33.3333% - 10px);
    max-width: calc(33.3333% - 10px);
}

/* four items */
.btn-years button:first-child:nth-last-child(4),
.btn-years button:first-child:nth-last-child(4) ~ button {
    flex: 1 1 calc(25% - 10px);
    max-width: calc(25% - 10px);
    font-size: 12px;
}

.btn-months {
    margin: 0;
}

.btn-quarters {
    width: 100%;
}

.btn-quarterly {
    flex: 1 1 100%;
    max-width: 100%;
}


.chart {
    border: 1px solid #dfdfdf;
    grid-area: chart;
    background-color: #fff;
}

.weather {
    border: 1px solid #dfdfdf;
    grid-area: weather;
    background-color: #fff;
    padding: 8px;
    margin: 5px 5px 0 0;
    flex-grow: 1;
}

.weather-container {
    border-radius: 10px;
    padding: 0 8px;
    border: 1px solid #dee2e6;
}

.weather > h6 {
    font-weight: bold;
}

.weather-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid #dee2e6;
}

.weather-day:last-child {
    border-bottom: none;
}

.weather-icon {
    width: 30px;
    height: 30px;
}

.weather-day div {
    text-align: center;
    font-size: 14px;
}

.weather-day div:first-child {
    width: 85px;
    text-align: start;
}

.weather-temp {
    font-size: 1em;
    font-weight: 500;
}

/* @media (max-width: 768px) {
  .weather-day {
    flex-direction: column;
  }
  .weather-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
  }
} */

.weather-lead.hourly {
    margin-top: 8px;
}

.contour {
    /*flex-grow: 1;*/
    margin-top: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.contour-lead {
    margin-bottom: 8px;
}

.contour-container {
    /*flex-grow: 1;*/
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 0 8px;
    width: 100%;
}

.contour-data-list {
    margin: 0;
    padding: 0;
}

.contour-data, .predicted-contour-data {
    display: flex;
    font-size: 14px;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid #dee2e6;
}

.contour-soil, .predicted-contour-soil {
    padding: 0 2px;
    border: none;
    border-radius: 8px;
}

.contour-data:last-child {
    border-bottom: none;
}

.contour-data div:last-child {
    font-size: 1em;
    font-weight: 500;
}

.contour-prediction {

}

.wrapper {
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-areas:
    "header header header"
    "weather main filter"
    "weather main filter";
    /* gap: 5px; */
    /* column-gap: 5px; */
    grid-template-rows: 50px auto 1fr;
    grid-template-columns: 20% 1fr 20%;
    background-color: #f8f8f8;
    padding: 5px;
    overflow: auto;
}

#contour_number.invalid {
    border-color: red;
    color: red;
}

.info {
    padding: 6px 8px;
    font: 14px/16px Arial, Helvetica, sans-serif;
    background: white;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
}
.info h4 {
    margin: 0 0 5px;
    color: #777;
}

.legend {
    line-height: 18px;
    color: #555;
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

/* Map events  */

.map__events-container{
    height: auto;
}

.map__events-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map__events-item {
    background-color: #fff;
    width: 40px;
    height: 40px;
    padding: 4px;
    border-radius: 4px;
}

.map__events-weather {
    width: 100%;
    height: 100%;
    cursor: pointer;
    border: unset;
    background: unset;
    background-image: url("../../img/weather.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.map__events-filter{
    width: 100%;
    height: 100%;
    cursor: pointer;
    border: unset;
    background: unset;
    background-image: url("../../img/filter.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.header__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header__btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    transform: scale(1.05);
}

.close-info {
    display: none;
    background-image: url("../../img/close.svg");
    margin-left: auto;
}

.info-btn {
    background-image: url("../../img/info.svg");
    background-size: 20px 20px;
}

.info-icon {
    display: none;
}

@media (min-width: 992px) {
    .map__events-container {
        display: none;
    }
}

@media (max-width: 1025px) {
    .wrapper {
        grid-template-columns: 25% 1fr 25%;
    }
}

@media (max-width: 992px) {
    .map__events-container {
        display: block;
    }

    .wrapper {
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .header {
        height: 50px;
    }

    .weather {
        position: absolute;
        top: 50px;
        left: -1000px;
        display: none !important;
        z-index: 1000;
        width: 100%;
        height: 100%;
        transition: left 0.4s ease;
    }

    
    .weather.weather-open{
        display: block !important;  
        left: 0;
    } 
    
    .filter {
        position: absolute;
        top: 50px;
        right: -1000px;
        display: none !important;
        width: 100%;
        /* height: auto; */
        transition: all 1s ease;
        z-index: 1500;
    }

    .filter.filter-open{
        display: block !important;
        transition: all 1s ease;
        right: 0;
    }    
    

}