.leaflet-control-attribution{
    display: none;
}

.hide-layer{
    display: none!important;
}


*{
    box-sizing: border-box;
}

/* Flag Colors */

.en-blue{fill:#232F5D;}
.en-red{fill:#C91430;}
.gl-red{fill:#C91430;}
.da-red{fill:#C91430;}
.svg-white{fill:#FFFFFF;}

/* Language controls */

.lang-controls-wrapper{
    margin: 10px 10px 0 0;
    pointer-events: all;
    cursor: auto;
}

.lang-controls{
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    border: 2px solid #fff;
    background-color: #fff;
    display: flex;
    gap: 4px;
    border-radius: 4px;
}

.language-option{
    width: 24px;
    cursor: pointer;
    border: 4px solid #fff;
    border-radius: 4px;
    transition: border-color 250ms ease-in-out;
}

.language-option:hover{
    border-color: #e3e3e3;
}

.language-option--active{
    border-color: #ccc;
}

.language-option svg{
    display: block;
}

/* Hooks */

.leaflet-right {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Season controls */

.season-controls-wrapper{
    pointer-events: all;
    cursor: auto;
    z-index: 800;
    position: relative;
    margin: 0 10px 10px 0;
}

.season-controls{
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    border-radius: 4px;
}

.season-select {
    background-color: #fff;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-right: none;
    transition: background-color 250ms ease-in-out;
    cursor: pointer;
    display: flex;
    gap: 6px;
    align-items: center;
}

span.label-headline:before {
    content: "";
    width: 0;
    height: 10px;
    display: inline-block;
    margin-right: 0;
    border-radius: 5px;
    background-color: #7b6a58;
    opacity: 0;
    transition: all 225ms ease-in-out;
}

.period-select--active span.label-headline:before {
    width: 10px;
    margin-right: 6px;
    opacity: 1;
}

.period-select--active span.label-year {
    padding-left: 16px;
}

.season-select--active {
    background-color: #e3e3e3;
}


.season-select:hover {
    background-color: #f3f3f3;
}

.season-select:first-child {
    border-radius: 4px 0 0 4px;
}

.season-select:last-child {
    border-radius: 0 4px 4px 0;
    border-right: 1px solid #ccc;
}

.season-select:before {
    display: block;
    content: "";
    width: 0;
    height: 16px;
    opacity: 0;
    background-position: center center;
    transition: all 225ms ease-in-out;
}

.season-select.season-select--active:before {
    display: block;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    width: 16px;
    opacity: 1;
}

.season-select.season-select--summer:before {
    background-image: url("ressources/summer.svg");
}

.season-select.season-select--winter:before {
    background-image: url("ressources/winter.svg");
}

/* period controls */

.period-controls-wrapper{
    pointer-events: all;
    cursor: auto;
    z-index: 800;
    position: relative;
    margin: 0 10px 10px 0;
}

.period-controls{
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    border-radius: 4px;
}

.period-select {
    background-color: #fff;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-right: none;
    transition: background-color 250ms ease-in-out;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

span.label-year {
    font-size: 0.8em;
    letter-spacing: 0.5px;
    color: #777;
    transition: all 225ms ease-in-out;
}

.period-select--active {
    background-color: #e3e3e3;
}

.period-select--active span.label-year {
    padding-left: 16px;
}


.period-select:hover {
    background-color: #f3f3f3;
}

.period-select:first-child {
    border-radius: 4px 0 0 4px;
}

.period-select:last-child {
    border-radius: 0 4px 4px 0;
    border-right: 1px solid #ccc;
}

/* Panes */

.leaflet-pane.leaflet-pane--grouped{
    display: none;
}

.leaflet-pane.leaflet-pane--grouped.leaflet-pane--active{
    display: block;
}

/* Popup */

.leaflet-popup-pane{
    opacity: 0;
    transition: opacity 250ms ease-in-out;
}

.leaflet-popup-pane.active{
    opacity: 1;
}

.leaflet-container a.leaflet-popup-close-button{
    font-size: 0;
    color: transparent;
    cursor: pointer;
    width: 30px;
    height: 30px;
    background-image: url(ressources/close.svg);
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.4;
    transition: opacity 250ms ease-in-out;
    margin: 6px 6px 0 0;
}

.leaflet-container a.leaflet-popup-close-button:hover{
    opacity: 1;
}

.leaflet-popup-content {
    max-width: 100%;
    min-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 20px;
    padding-right: 20px;
    overflow-y: auto;
}

.leaflet-popup-content::-webkit-scrollbar{
    width: 6px;
    background-color: transparent;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: #d3d3d3;
    transition: background-color 250ms ease-in-out;
}

.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.leaflet-popup-content tr:first-child td:not(.english, .danish, .greenlandic) {
    font-weight: bold;
    font-size: 18px;
}

.leaflet-popup{
    width: 500px;
}

.leaflet-popup table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.leaflet-popup-pane.text-rich .leaflet-popup table {
    grid-template-columns: 1fr;
}

.leaflet-popup table:has(td.youtube:not(:empty)) {
    grid-template-columns: 1fr;
}

.leaflet-popup tbody,
.leaflet-popup tr {
    display: contents;
}
.leaflet-popup td:empty {
    display: none;
}
.leaflet-popup td.title {
    font-size: 32px;
    font-weight: bold;
    grid-column: 1 / -1;
}

.leaflet-popup td.link {
    grid-column: 1 / -1;
    order: 1;
}

/*Hide empty popups*/
.leaflet-popup:has(tr:only-child td:only-child) {
    display: none!important;
}

.youtube iframe,
.youtube-iframe{
    display: block;
    max-width: 100%;
    height: auto;
    aspect-ratio: 560 / 315;
}

td.youtube{
    display: none;
}

td.youtube--active{
    display: block;
}

.leaflet-popup-content td img {
    max-width: 100%;
    height: auto;
    width: auto;
    border-radius: 4px;
    border: 4px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    display: block;
}

.leaflet-popup td.english,
.leaflet-popup td.greenlandic,
.leaflet-popup td.danish,
.leaflet-popup tr:has(td.english),
.leaflet-popup tr:has(td.greenlandic),
.leaflet-popup tr:has(td.danish){
    display: none;
}

#map[data-lang="en"] .leaflet-popup td.english,
#map[data-lang="en"] .leaflet-popup tr:has(td.english){
    display: block;
}
#map[data-lang="gl"] .leaflet-popup td.greenlandic,
#map[data-lang="gl"] .leaflet-popup tr:has(td.greenlandic){
    display: block;
}
#map[data-lang="da"] .leaflet-popup td.danish,
#map[data-lang="da"] .leaflet-popup tr:has(td.danish){
    display: block;
}

td.english:before,
td.greenlandic:before,
td.danish:before {
    width: 25px;
    display: inline-block;
    border: 1px solid #ccc;
    height: 15px;
    margin-bottom: 4px;
    margin-right: 6px;
}

td.english:before{
    content: url(ressources/en.svg);
}

td.danish:before{
    content: url(ressources/dk.svg);
}

td.greenlandic:before{
    content: url(ressources/gl.svg);
}

path.leaflet-interactive{
    transition: all 225ms ease-in-out;
}

/*
path.leaflet-interactive[fill="none"] {
    stroke: #333!important;
    stroke-opacity: 0.2!important;
    stroke-width: 2px!important;
}
path.leaflet-interactive[fill="none"]:hover {
    stroke: #333!important;
    stroke-opacity: 0.5!important;
    stroke-width: 2px!important;
}

[data-season="summer"] path.leaflet-interactive[fill="none"] {
    stroke: #ddfffb !important;
    stroke-opacity: 0.4 !important;
}

[data-season="summer"] path.leaflet-interactive[fill="none"]:hover {
    stroke: #ddfffb !important;
    stroke-opacity: 0.7 !important;
}*/

:root{
    --path-1-color: #666;
    --path-2-color: #796a57;
    --path-3-color: #796a57;
    --path-base-color: #cbbb9f;
}
:root [data-season="summer"]{
    --path-1-color: #ccc;
    --path-2-color: #b19b80;
    --path-3-color: #aaa;
    --path-base-color: #cbbb9f;
}

path{
    stroke: var(--path-base-color) !important;
    stroke-width: 3px !important;
    stroke-opacity: 0.8 !important;
    filter: drop-shadow(0px 0px 1px black)!important;
}
path:hover{
    stroke-opacity: 1 !important;
}

path.path-ArcticCircleTrail_21.leaflet-interactive,
path.path-ArcticCircleTrailSarfannguitroute_20 {
    stroke: var(--path-1-color) !important;
    stroke-dasharray: 10px, 8px !important;
}


path.path-ATVsporanlagtlinje_19.leaflet-interactive,
path.path-WinterArcticCircleTrail_46.leaflet-interactive {
    stroke: var(--path-2-color) !important;
}



path.path-UNESCOboundarycopy_2.leaflet-interactive,
path.path-Layers_Boundary_of_nominated_property_31.leaflet-interactive {
    stroke: var(--path-3-color) !important;
    pointer-events: none!important;
    cursor: auto!important;
}


path.leaflet-interactive[fill-opacity] {
    fill-opacity: 1;
    position: relative;
    z-index: 1;
}

img.leaflet-marker-icon.leaflet-interactive {
    width: 52px !important;
    height: 32px !important;
    object-fit: contain;
    padding: 0px;
    object-position: bottom left;
}

img.leaflet-marker-icon{
    display: none;
}

img.leaflet-marker-icon.leaflet-marker--active{
    display: block;
}

/* Layer corrections */

/*ATV Trail skal kun vises i nutiden og om sommeren*/
#map .path-ATVsporanlagtlinje_19{ display: none!important;}
#map[data-season="summer"][data-period="modern"] .path-ATVsporanlagtlinje_19{
    display: block!important;
}

/*Responsive controls*/

@media screen and (max-width: 600px){
    .period-controls {
        flex-direction: column;
        border-radius: 4px;
        overflow: hidden;
    }
    .period-select:first-child,
    .period-select:last-child {
        border-radius: 0;
    }
}