/* zie https://www.goudatijdmachine.nl/over-ons/huisstijl-handboek/ */

:root {
    --gtm-blauw: #3891b1;
    --gtm-rood: #d22c25;
    --gtm-bruin: #533b3b;
    --gtm-grijs: #ebebeb;
    --gtm-zwart: #111111;
    --gtm-wit: #ffffff;
    --gtm-radius: 8px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--gtm-grijs);
}

p {
    line-height: 1.5;
}

#controls {
    padding: 0 20px 20px 20px;
    width: 700px;
    text-align: center;
}

#controls.hidden {
    display: none;
}

#kadPerceel {
    width: 20%;
}

#kadPerceel {
    font-size: 1.5em;
    padding: 8px;
    text-align: center;
    border-radius: var(--gtm-radius);
    border: 1px solid var(--gtm-blauw);
}


#loadGraph {
    width: 40%;
    padding: 8px 16px;
    font-size: 1.5em;
    margin-top: .5em;
}

#loadGraph,
#toonUitleg {
    background-color: var(--gtm-blauw);
    color: white;
    border: none;
    border-radius: var(--gtm-radius);
    cursor: pointer;
}


#loadGraph:hover,
#toonUitleg:hover,
#voorbeelden a:hover {
    background-color: var(--gtm-bruin);
}

#loadGraph:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#graph {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--gtm-blauw);
    overflow: hidden;
}

#graph.visible {
    display: block;
}

#graph.loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

#closeGraph {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--gtm-rood);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

#graph.visible~#closeGraph {
    display: flex;
}

#closeGraph:hover {
    transform: scale(1.1);
    background-color: var(--gtm-bruin);
}

.loading-message {
    font-size: 18px;
    color: var(--gtm-blauw);
    padding: 20px;
    background-color: var(--gtm-grijs);
    border: 2px solid var(--gtm-rood);
    border-radius: var(--gtm-radius);
}

.error-message {
    color: var(--gtm-rood);
    padding: 20px;
    border: 2px solid var(--gtm-rood);
    border-radius: var(--gtm-radius);
    background-color: var(--gtm-grijs);
    margin: 20px;
}

.info-message {
    color: #3498db;
    padding: 20px;
    border: 2px solid var(--gtm-blauw);
    border-radius: var(--gtm-radius);
    background-color: #d6eaf8;
    margin: 20px;
}

#graph svg {
    display: block;
}

.tooltip {
    position: absolute;
    padding: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

#beeldmerkb {
    position: absolute;
    left: 1em;
    bottom: 1em;
    width: 4em;
    display: none;
}

#beeldmerka {
    display: inline;
    width: 1.3em;
}

#controls p {
    font-size: 1.3em;
    text-wrap-style: balance;
}

#controls h1 {
    color: var(--gtm-blauw);
    font-size: 3.2em;
    margin: 0;
}

#kaart_wrapper {
    position: fixed;
    top: 0;
    right: -100vw;
    width: 100vw;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
    z-index: 900;
    transition: right 0.3s ease-in-out;
    display: flex;
    z-index: 1000;
}

@media screen and (min-width: 768px) {
    #kaart_wrapper {
        right: -35vw;
        width: 35vw;
    }
}

.hiddenss {
    display: none;
}

@media screen and (min-width: 768px) {
    .hiddenss {
        display: inline;
    }
}

#kaart_wrapper.visible {
    right: 0;
}

#kaart_wrapper .handle {
    width: 1em;
    height: 100%;
    background-color: var(--gtm-rood);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    user-select: none;
}

#kaart_wrapper .handle:hover {
    background-color: var(--gtm-bruin);
}

#kaart {
    flex: 1;
    width: auto;
    height: 100%;
    border: none;
}

#tekstueel {
    display: block;
    padding: 0 1em;
    overflow: auto;
}

.tree {
    --spacing: 1.5rem;
    --radius: 7px;
}

.tree li {
    display: block;
    position: relative;
    padding-left: calc(2 * var(--spacing) - var(--radius) - 2px);
}

ul.tree {
    margin-left: -2.5em
}

.tree ul {
    margin-left: calc(var(--radius) - var(--spacing));
    padding-left: 0;
}

.tree ul li {
    border-left: 2px solid var(--gtm-blauw);
}

.tree ul li:last-child {
    border-color: transparent;
}

.tree ul li::before {
    content: '';
    display: block;
    position: absolute;
    top: calc(var(--spacing) / -2);
    left: -2px;
    width: calc(var(--spacing) + 2px);
    height: calc(var(--spacing) + 1px);
    border: solid var(--gtm-blauw);
    border-width: 0 0 2px 2px;
}

.tree summary {
    display: block;
    cursor: pointer;
}

.tree summary::marker,
.tree summary::-webkit-details-marker {
    display: none;
}

.tree summary:focus {
    outline: none;
}

.tree li::after,
.tree summary::before {
    content: '';
    display: block;
    position: absolute;
    top: calc(var(--spacing) / 2 - var(--radius));
    left: calc(var(--spacing) - var(--radius) - 1px);
    width: calc(2 * var(--radius));
    height: calc(2 * var(--radius));
    border-radius: 50%;
    background: var(--gtm-blauw);
}

#toonTekstboom {
    display: none;
    position: fixed;
    top: 100px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--gtm-wit);
    color: var(--gtm-blauw);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

#graph.visible~#toonTekstboom {
    display: flex;
}

#toonTekstboom:hover {
    transform: scale(1.1);
    background-color: var(--gtm-bruin);
}

#toonAlleKaarten {
    display: none;
    position: fixed;
    top: 170px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--gtm-wit);
    color: var(--gtm-blauw);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#graph.visible~#toonAlleKaarten {
    display: flex;
}

#toonAlleKaarten:hover:not(:disabled) {
    transform: scale(1.1);
    background-color: var(--gtm-bruin);
}

#toonAlleKaarten:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.perceel-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
}

#tekstueel_wrapper {
    position: fixed;
    top: 0;
    right: -100vw;
    width: 100vw;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
    z-index: 900;
    transition: right 0.3s ease-in-out;
    display: flex;
    z-index: 1000;
}

@media screen and (min-width: 768px) {
    #tekstueel_wrapper {
        right: -35vw;
        width: 35vw;
    }
}

#tekstueel_wrapper.visible {
    right: 0;
}

#tekstueel_wrapper .handle {
    width: 1em;
    height: 100%;
    background-color: var(--gtm-rood);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    /*    writing-mode: vertical-rl;
    text-orientation: mixed;*/
    user-select: none;
}

#tekstueel_wrapper .handle:hover {
    background-color: var(--gtm-bruin);
}

.leaflet-container .leaflet-control-attribution {
    font-size: 1.3vw !important;
    background: #fff !important;
}

#uitleg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--gtm-grijs);
    overflow: auto;
    z-index: 2000;
    padding: 10px 30px 10px 80px;
    box-sizing: border-box;
}

#uitleg img {
    max-width: 100%;
}

#uitleg a {
    color: var(--gtm-zwart);
}

#uitleg.visible {
    display: block;
}

#closeUitleg {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--gtm-rood);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 2001;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

#uitleg.visible #closeUitleg {
    display: flex;
}

#closeUitleg:hover {
    transform: scale(1.1);
    background-color: var(--gtm-bruin);
}

#voorbeelden {


    a {
        display: inline-block;
        background-color: var(--gtm-blauw);
        color: white;
        border: none;
        border-radius: var(--gtm-radius);
        cursor: pointer;
        padding: 8px 16px;
        font-size: 1.1em;
        text-decoration: none;
        margin: 1em 0.4em;
        width: 3em;
    }
}

#toonUitleg {
    margin-left: 2em;
    padding: 8px 16px;
    font-size: 1.1em;
}

#locate-button {
    vertical-align: bottom;
    width: 45px;
    padding: 0 .8em;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#locate-button.locating {
    opacity: 0.7;
    animation: spin 1s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}

#actie {
    background-color: var(--gtm-wit);
    padding: 2.5em 0 3em;
    margin: 2em 0 1em 0;
    box-shadow: 0 0 5px var(--gtm-blauw);
    border-radius: var(--gtm-radius);
}

p#disclaimer {
    font-weight: 100;
    color: var(--gtm-rood);
    font-size: 1em;
}