html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
}

#header {
    padding-top: 2.4rem;
    margin-bottom: 2.4rem;
}

#wrapper-map {
    flex: 1;
    position: relative;
}

#map {
    height: 100%;
}

#catalog {
    width: 25vw;
    position: absolute;
    left: var(--padding);
    top: var(--padding);
    height: calc(100% - var(--padding)*2);
    background-color: var(--color-white);
    border-radius: var(--radius);
    padding: calc(var(--padding)*0.66667);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#navigation {
    width: 100%;
    display: flex;
    margin-bottom: calc(var(--gutter)/2);
}
#navigation-buttons {
    display: flex;
    gap: calc(var(--gutter)/4);
    margin-left: calc(var(--gutter)/2);
}
#navigation-buttons a {
    display: flex;
    height: 100%;
    aspect-ratio: 1;
    background-color: var(--color-white);
    border-radius: calc(var(--radius)/2);
    box-sizing: border-box;
    border: solid 1px var(--color-background-greige);
    color: var(--color-background-greige);
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: background-color 200ms ease-out;
}
#navigation-buttons a:hover {
    background-color: var(--color-background-sand);
}

#type-filter {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23beb4aa" d="M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 2rem center;
    
    font-family: "Manrope", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    color: var(--color-text);
    line-height: 1.2;

    display: block;
    flex: 1;
    font-size: 1.6rem;
    border-radius: calc(var(--radius)/2);
    padding: 2rem 2rem 2rem 2.4rem;
    cursor: pointer;
    border: solid 1px var(--color-background-greige);
    background-color: var(--color-white);
    outline: none;
    transition: background-color 200ms ease-out;
}
#type-filter:hover {
    background-color: var(--color-background-sand);
}
#type-filter optgroup {
    font-size: 1.2rem;
    text-transform: uppercase;
}
#type-filter option {
    font-size: 1.6rem;
    text-transform: none;
    font-weight: normal;
}

#count {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gutter)/2);
    margin-bottom: var(--gutter);
}
#count p {
    padding: calc(var(--padding)/3);
    background-color: var(--color-background-sand);
    border-radius: calc(var(--radius)/2);
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: 0.025em;
    position: relative;
}
#count span {
    display: block;
    position: absolute;
    right: calc(var(--padding)/3);
    top: calc(var(--padding)/3);
    font-size: 2.4rem;
}

#catalog h2 {
    font-size: 1.6rem;
    margin-bottom: calc(var(--gutter)/2);
}



#sites {
    width: 100%;
}
.site {
    height: auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: calc(var(--gutter)/2);
    padding: calc(var(--padding)/3);
    border-radius: calc(var(--radius)/2);
    background-color: var(--color-background-sand);
    border: solid 1px var(--color-background-sand);
    box-sizing: border-box;
    cursor: pointer;
    transition:
        background-color 200ms ease-out,
        border-color 200ms ease-out;
}
.site.active {
    background-color: var(--color-white);
    border-color: var(--color-background-greige);
}
.site__badge {
    border-radius: calc(var(--radius)/2);
    border: solid 1px var(--color-background-greige);
    box-sizing: border-box;
    padding: calc(var(--padding)/3);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.site__badge img {
    width: 80%;
    display: block;
    margin: 0 auto 1.2rem auto;
}
.site__badge span {
    display: block;
     text-align: center;
    font-size: 1.2rem;
}
.site__info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--padding)/3) 0;
}
.site__info h3 {
    font-size: 1.8rem;
}
.site__info span {
    display: block;
    font-weight: ;
    font-size: 1.4rem;
    margin-top: 0.6rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1;
    text-wrap: balance;
}
.site__info p {
    font-size: 1.4rem;
    margin: calc(var(--gutter)/2) 0;
}
.site__meta {
    display: flex;
    font-size: 1.2rem;
}
.site__meta li {
    display: flex;
    align-items: center;
}
.site__meta li:after {
    content: "";
    display: block;
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 50%;
    background-color: var(--color-primary);
    margin: 0 0.6rem;
}
.site__meta li:last-child:after {
    display: none;
}

.gm-ui-hover-effect {
    display: none !important;
}
.gm-style-iw-ch {
    padding-top: 12px;
}
.info {
    position: relative;
}
.info__image {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    margin-bottom: 12px;
}
.info__title {
    font-size: 1.8rem;
    margin-bottom: 6px;
}
.info__meta {
    font-size: 1.4rem;
    margin-bottom: 6px;
    border-bottom: dashed 1px #ccc;
    padding-bottom: 6px;
    display: flex;
    align-items: center;
}
.info__name {
    font-weight: bold;
}
.info__address {
    max-width: 288px;
    overflow-wrap: break-word;
    margin-bottom: 6px;
    border-bottom: solid 1px #ccc;
    padding-bottom: 6px;
}
.info__meta span {
    display: flex;
    align-items: center;
}
.info__meta span:last-child:not(:only-child)::before {
    content: "";
    display: block;
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 50%;
    background-color: var(--color-primary);
    margin: 0 0.6rem;
}
.info__scores li {
    display: flex;
    justify-content: space-between;
    font-size: 1.4rem;
}
.info__scores li span {
    display: block;
    margin-left: 12px;
}
.info__scores li:last-child {
    margin-top: 6px;
    border-top: solid 1px #ccc;
    padding-top: 6px;
    font-weight: bold;
}
.info__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}


#overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 30, 20, 0.5);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 700;
}
#overlay__box {
    border-radius: calc(var(--radius) / 2);
    background-color: var(--color-white);
    color: var(--color-text);
    box-sizing: border-box;
    padding: var(--padding);
    width: 360px;
    display: none;
    flex-direction: column;
    align-items: center;
}
#overlay__box svg {
    height: 9.6rem;
    margin-bottom: 2.4rem;
}
#overlay__box h2 {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}
#overlay__box p {
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 2.4rem;
    text-align: center;
}
#overlay__loader {
    --color-1: #FF0000;
    --size: 1px;
    width: 4.8rem;
    height: 4.8rem;
    border: 0.6rem solid var(--color-white);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}
@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}





@media (orientation: portrait) {
    #wrapper-map {
        overflow-x: hidden;
    }
    #catalog {
        width: auto;
        width: calc(100% - var(--gutter)*2);
        height: calc(100% - var(--gutter)*2);
        left: var(--gutter);
        top: var(--gutter);
        background-color: transparent;
        border-radius: 0;
        padding: 0;
        pointer-events: none;
    }
    #catalog * {
        pointer-events: auto;
    }
    #catalog h2 {
        visibility: hidden;
        flex: 1;
        pointer-events: none;
    }
    #navigation {
        order: 1;
        margin-bottom: 0;
    }
    #navigation-buttons a {
        border: none;
        box-shadow: 0 2px 7px 1px rgba(0,0,0,.2);
    }
    #type-filter {
        border-color: var(--color-white);
        box-shadow: 0 2px 7px 1px rgba(0,0,0,.2);
    }
    #sites {
        overflow: visible;
        margin-bottom: calc(var(--gutter)/2);
    }
    .site {
        width: 100%;
        background-color: var(--color-white);
        border-color: var(--color-white) !important;
        box-shadow: 0 2px 7px 1px rgba(0,0,0,.2);
    }
    #count p {
        background-color: var(--color-white);
        box-shadow: 0 2px 7px 1px rgba(0,0,0,.2);
    }
    
}