body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", serif;
    font-optical-sizing: auto;
    overflow: hidden;
}

.brand-logo {
    position: absolute;
    top: 1em;
    left: 1em;
    z-index: 10;
    background-color: #fff;
    border-radius: 5em;
    border: 1px solid  rgb(173, 173, 173);
    padding: 5px 10px 5px 5px;
}

.brand-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo .small-logo{
    width: 50px; 
    height: 50px;
}
.brand-logo a .portal-name {
    font-family: Inter, sans-serif;
    padding: 5px;
    border-left: 1px solid #ccc;
    margin-left: 5px;
    color: #2b365e;
    font-size: 14px;
    line-height: 1;
}
.brand-logo a .portal-name div:first-child {
    font-weight: bold;
    font-size: 16px;
}

.no-select {
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+ */
}

.version-nr{
    position: absolute;
    bottom: 1em;
    right: 1em;
    font-size: 12px;
    color:gray;
}

#map {
    width: 100%;
    height: 100vh;
}


.relative {
    position: relative;
}
.absolute {
    position: absolute;
}

/* 
 * LAYERS MENU TREE
 */
#layerTreeContainer {
    position: absolute;
    top: 10px;
    right: 10px;
    /* background-color: white; */
    background: rgb(255,255,255);
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(237,239,243,1) 100%);
    border-radius: 5px;
    padding: 10px;
    /* border: 1px solid #ccc; */
    border: 1px solid rgb(173, 173, 173);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform: translateX(0);
    opacity: 1;
    z-index: 100;
}
#layerTreeContainer.hidden {
    transform: translateX(100%);
    opacity: 0;
}
.layerTree{
    overflow-y: auto;
    max-height: 75vh;
    /* padding-top: 4px; */
    margin-top: 1em;
    border-top: 1px solid #e1e1e1;
}
.layerTree .highlight{
    font-weight: 500;
    letter-spacing: 0.9px;
}


/* 
 * MENU TOGGLE BUTTON
 */
.menu-toggle-button {
    position: absolute;
    top: 18px;
    right: 13px;
    padding: 5px 10px;
    /* background-color: #0078d4; */
    /* background-color: #dfdfdf; */
    background-color: white;
    border-radius: 5px;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 200;
    transition: transform 0.3s ease-in-out;

    /* background-color: transparent; */
    /*--s: 10px; */ /* the size on the corner */
    /*--t: 1px;*/  /* the thickness of the border */
    /*--g: 3px;*/ /* the gap between the border and image */
    
    /*padding: calc(var(--g) + var(--t));
    outline: var(--t) solid #8f8f8f;
    outline-offset: calc(-1*var(--t));
    mask:
        conic-gradient(at var(--s) var(--s),#0000 75%,#000 0)
        0 0/calc(100% - var(--s)) calc(100% - var(--s)),
        linear-gradient(#000 0 0) content-box;
    transition: .4s; */
}

.menu-toggle-button:hover{
    transform: scale(0.9);
}


ul {
    list-style-type: none;
    padding-left: 0;
}

li {
    /* margin: 8px 0; */
    margin: 12px 0;
}

li.top-exception{
    margin-top: 14px;
}

ul .toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    margin-left: 7px;
    border-bottom: 1px solid #e1e1e1;
    letter-spacing: 1px
}

ul .arrow {
    margin-right: 8px;
    width: 5px;
    height: 5px;
    border-top: 2px solid black;
    border-right: 2px solid black;
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.active.arrow {
    transform: rotate(135deg);
}

.nested {
    display: none;
    margin-left: 1em;
}

.active {
    display: block;
}


/* 
 * MENU LEGEND
 */
.legend {
    margin: 0.5em 1em;
}

.legend-item {
    display: flex;
    /* align-items: center; */
    margin-top: 2px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 5px;
}

.legend-line {
    width: 12px;
    height: 3px;
    /* border-radius: 50%; */
    margin: 5px;
}

.legend-square {
    width: 10px;
    height: 10px;
    /* margin: 5px; */
    margin: 2px 5px;
}

.legend-point-square {
    width: 8px;
    height: 8px;
    margin: 5px;
    /* border-radius: 4px; */
}

/* 
 * RENATURIZATION ACTIVITIES LINES 2027 
 */
.legend-bg-reactiv-2027-high-influence {
    background-color: #006ffa;
}
.legend-bg-reactiv-2027-influence {
    background-color: #9dbfef;
}
.legend-bg-reactiv-2027-low-influence {
    background-color: #47e701;
}
.legend-bg-reactiv-2027-no-influence {
    background-color: #818181;
}

/* 
 * RENATURIZATION ACTIVITIES POINTS 
 */
.legend-bg-re-activities-points-modifications{
    background-color: #000000;
 }
.legend-bg-re-activities-points-additional {
    background-color: #006ffa;
}
.legend-bg-re-activities-points-technical {
    background-color: #fb0000;
}
.legend-bg-re-activities-points-in-catchment {
    background-color: #47e701;
}
.legend-bg-re-activities-points-not-applicable {
    background-color: #818181;
}

/* 
 * RENATURIZATION ACTIVITIES LINES 
 */
.legend-bg-re-activities-lines {
    background-color: #000000;
}
.legend-bg-re-activities-polygons {
    background-image: repeating-linear-gradient(45deg,  
    #fff,
    #fff 2px,
    #000 2px,
    #000 4px);
    border: 1px solid black;
}

/*
 * FLOOD HAZARD AREA
 */
.legend-bg-drought-10 {
    background-color: #cef4f5;
}
.legend-bg-drought-1 {
    background-color: #cef4f5;
}

/* 
 * JCWP - LINES
 */
.bg-jcwp-lines {
    background-color: #38b6ff;
}

/* 
 * DROUGHT DURATION
 */
.legend-bg-drought-duration-vlong {
    background-color: #bc1f16;
}
.legend-bg-drought-duration-long {
    background-color: #ce6248;
}
.legend-bg-drought-duration-moderate {
    background-color: #e5ab8a;
}
.legend-bg-drought-duration-short {
    background-color: #fdecd7;
}
/* .legend-bg-drought-duration-vshort {
    background-color: #b5fc96;
} */

/* 
 * DROUGHT RECURRENCE
 */
.legend-bg-drought-recurrence-voften {
    background-color: #bc1f16;
}
.legend-bg-drought-recurrence-often {
    background-color: #ce6248;
}
.legend-bg-drought-recurrence-moderate {
    background-color: #e5ab8a;
}
.legend-bg-drought-recurrence-rare {
    background-color: #fdecd7;
}

/* 
 * HYDROMORFOLOGY - LAKES
 */
.legend-bg-lake-water-gauges-vgood{
    background-color: #48c3fd;
}
.legend-bg-lake-water-gauges-ltvgood{
    background-color: #f42717;
}

/* 
 * HYDROMORFOLOGY - RIVERS
 */
.legend-bg-water-gauges-2025-vgood {
    background-color: #48c3fd;
}
.legend-bg-water-gauges-2025-good {
    background-color: #5fe51b;
}
.legend-bg-water-gauges-2025-moderate {
    background-color: #fcff29;
}
.legend-bg-water-gauges-2025-poor {
    background-color: #f7ad20;
}
.legend-bg-water-gauges-2025-bad {
    background-color: #de281f;
}
.legend-bg-water-gauges-2025-nd {
    background-color: #818181;
}

/* 
 * ADMINISTRATIVE DIVISION UNITS
 */
.legend-border-voivodeship {
    border: 2px solid #ff5757;
}
.legend-border-counties {
    border: 1px solid #ff5757;
}
.legend-border-commune {
    border: 1px solid #ff575793;
}

/* 
 * BORDERS
 */
.legend-border-gray {
    border: 1px solid #a6a2b3;
}
.legend-border-navy {
    border: 2px solid #1f386e;
}
.legend-border-blue {
    border: 1px solid #4e7aa9;
}

/* 
 * JCWP POLYGONS
 */
.legend-bg-jcwp-polygons {
    background-color: #dacef6;
}

/* 
 * RIVERS BASIN AREAS
 */
.legend-bg-rivers-basin-areas {
    background-color: #e1e806;
}

/* 
 * BASE MAPS THUMBNAILS
 */
#thumbnail-container {
    /* position: fixed; */
    /* left: 1em; */
    /* bottom: 1em; */
    display: flex;
    /* justify-content: center; */
    /* margin-bottom: 20px; */
}

.thumbnail {
    width: 32px;
    height: 32px;
    object-fit: contain; /* Preserve aspect ratio */
    margin: 0 5px;
    cursor: pointer;
    /* border: 2px solid transparent; */
    /* background: #b7b7b7; */

    /* the size on the corner */
    --s: 15px; 
    /* the thickness of the border */
    --t: 1px;  
    /* the gap between the border and image */
    --g: 3px;
    
    padding: calc(var(--g) + var(--t));
    outline: var(--t) solid #8f8f8f;
    outline-offset: calc(-1*var(--t));
    mask:
        conic-gradient(at var(--s) var(--s),#0000 75%,#000 0)
        0 0/calc(100% - var(--s)) calc(100% - var(--s)),
        linear-gradient(#000 0 0) content-box;
    transition: .3s;
}
.thumbnail:hover{
    transform: scale(0.9);
}
.thumbnail.active {
    /* outline: var(--t) solid #0003d3; */
    outline: var(--t) solid #0003d1;
}

/* 
 * MAP ZOOM CONTROL POSITION
 */
.ol-zoom.ol-unselectable.ol-control {
    left: 10px; /* Ustaw pozycję na lewo */
    bottom: 10px; /* Ustaw pozycję na dół */
    right: auto; /* Usuń domyślną pozycję z prawej strony */
    top: auto; /* Usuń domyślną pozycję z góry */
  }

/*
* FIXED MODAL
*/

.modal {
    display: none;
    position: fixed;
    top: 50vh;
    left: 1rem;
    transform: translateY(-50%);
    /* width: 90%; */
    max-width: 600px;
    /* max-width: 90vw; */

    /* max-width: 80vw; */
    /* background-color: #fff; */
    /* border: 1px solid #ccc; */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 300;

    /* padding: 20px; */
    max-height: 80vh;
    overflow-y: auto;

    /* border: 1px solid #e1e1e1; */
    /* border-radius: 5px; */
    /* background: #f7f7f7; */
    /* background: #fbfbfb;
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(237,239,243,1) 100%); */


    background: rgb(255,255,255);
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(237,239,243,1) 100%);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgb(173, 173, 173);
    /* bottom: 12px; */
    /* bottom: 0px; */
    /* left: -50px; */
    /* left: 0px; */
    /* min-width: clamp(21.25rem, 7.708rem + 52.083vw, 49.375rem); */
    /* font-size: clamp(0.8rem, 0.205vw + 0.72rem, 1rem); */
    font-size: clamp(0.9rem, 0.102vw + 0.86rem, 1rem);
}

@media (max-width: 600px) {
    .modal {
      padding: 5px;
      max-width: 90vw;
    }
  }

.modal-flex{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

#modal-header {
    margin-top: 5px;
    margin-right: 3rem;
    margin-left: 5px;
    font-weight: bold;
    /* font-size: clamp(0.8rem, 0.41vw + 0.64rem, 1.2rem); */
    font-size: 1.2em;
}

#modal-table {
    width: 100%;
    /* border-collapse: collapse; */
    background-color: white;
    /* border-radius: 5px; */
    border-radius: 8px;
    border: 1px solid #bbbbbb;
    table-layout: fixed;

    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* .modal-table th,  */
#modal-table td {
    /* border: 1px solid #ddd; */
    /* padding: 8px; */
    padding: clamp(0.2rem, 0.307vw + 0.08rem, 0.5rem);
    text-align: left;
    /* word-wrap: break-word;
    word-break: break-word; */
    /* white-space: pre-wrap; */
}
#modal-table tr:not(:first-of-type) td {
    border-top: 1px solid rgb(197, 197, 197);
}

#modal-table td:first-child{
    width: 38.2%;
    color: #727272;
}

/* .modal-table tr {
    border: 1px solid rgb(197, 197, 197);
} */

#modal-table tr:first{
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;
}

#modal-closer {
    text-decoration: none;
    /* position: absolute; */
    /* top: 5px; */
    /* right: 10px; */
    position: absolute;
    right: 1rem;
    top: 1rem;
}

#modal-closer:after {
    content: "✖";
    color: gray;
}



/*
 * LAYER OPACITY SETTER
 */
.layer-opacity-setter {
    display: inline-block;
    width: 10px;
    height: 18px;
    margin-right: 1em;
    border-radius: 8px;
    background-color: black;
    cursor: pointer;
    /* opacity: 1; */
    transform-origin: center;
    /* position: relative;
    top: 4px; */
    --t: 0.2s;
    transition: transform .1s ease-in, width var(--t) ease-in-out, height var(--t) ease-in-out, margin var(--t) ease-in-out;
  }

  .layer-opacity-setter.hidden{
    margin-top: 10px;
    margin-right: 1.28em;
    width: 0;
    height: 0;
  }

  .layer-opacity-setter.scale {
    transform: scale(2.5);
    /* height: 20px;
    width: 10px;
    border-radius: 10px; */
  }
  
  /* .layer-opacity-hint{
    opacity: 0;
    right: 2.7em;
    bottom: -3px;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    border-radius: 3px;
    padding: 3px;
    color: #555555;
  } */

  .layer-opacity-hint{
    /* display: none; */
    position: absolute;
    right: 2em;
    background-color: white;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    /* padding: 3px;
    margin-right: 8px; */
    padding: 0px 3px;
    margin-right: 5px;
    color: #555555;
    /* color: rgb(38, 166, 216); */
    
  }
  
  .layer-opacity-setter:hover + .layer-opacity-hint{
    opacity: 1;
  }

  .flex {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    align-content: flex-start;
    gap: 4px;
  }

  .flex-order-2 {
    flex: 1
  }
  .flex-order-1{
    order: 1;
  }  
  .flex-order-2{
    order: 2;
  }
  .flex-order-3{
    order: 3;
  }
  .flex-order-4{
    order: 4;
  }

  /* 
   * ON MAP CLICK MARKER 
   */

    @keyframes pulse {
        0% {
            transform: scale(1);
            opacity: 1;
        }
        50% {
            transform: scale(1.8);
            opacity: 0.5;
        }
        100% {
            transform: scale(1);
            opacity: 1;
        }
    }

  .ol-marker {
    width: 12px;
    height: 12px;
    background: rgb(255,0,0);
    background: radial-gradient(circle, rgba(255,0,0,1) 0%, rgba(243,238,237,0) 100%);
    border-radius: 50%;
    animation: pulse 2.5s infinite;
  }