.woods-state-map {
    overflow: auto;
}

.woods-state-map::before {
    content: 'Scroll horizontally to see more';
    position: relative;
    font-size: 80%;
}

.woods-state-map svg {
    max-width: fit-content;
}

.woods-state-map .state path {
    fill:#d0d0d0;
}

.woods-state-map .woods-state-link *,
.woods-state-map .woods-state-link path {
    fill: var(--color-brand-blue, #0C5DA2);
    cursor: pointer;
    transition: fill 0.1s ease-in-out;
}

.woods-state-map .woods-state-link:hover *,
.woods-state-map .woods-state-link:hover,
.woods-state-map .woods-state-link:focus * {
    fill: var(--color-brand-maroon, #7D090E);
}

@media screen and (min-width: 56.88em) {
    .woods-state-map::before {
        display: none;
    }
    .woods-state-map svg {
        max-width: 100%;
        width: 100%;
    }    
}


/* popup content styling */
#woods-states-tooltip {
    padding: 0;
    border: 0;
    box-shadow: 0 0 20px 12px rgba(0, 0, 0, 0.25);
    margin: auto;
    max-width: 500px;
    height: 90vh;
    overflow-y: scroll;
}

.tooltip-header {
    padding: 12px 0;
    background-color: var(--color-brand-maroon, #7D090E);
    color: #fff;
    display: grid;
    place-content: center;
    text-align: center;
}

.tooltip-header .h4 {
    margin-bottom: 0;
}

.btn--popup-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    background-color: #fff;
    color: var(--color-brand-blue, #0C5DA2);
    transition: background-color 0.2s ease-in-out !important;
    cursor: pointer;
}

.btn--popup-close:hover,
.btn--popup-close:focus {
    background-color: var(--color-brand-blue, #0C5DA2) !important;
    color: #fff !important;
    transform: none !important;
}

.tooltip-body {
    padding: 16px;
    overflow-y: scroll;
}

#woods-states-tooltip .wp-block-details {
    margin-bottom: 0.5em;
}



.state-map-legend {
    display: grid;
    justify-self: end;
    padding: 16px;
    box-shadow: var(--wp--preset--shadow--shallow, 0 0 30px 5px rgba(0, 0, 0, 0.15));
    width: fit-content;
    font-size: 90%;
}

.state-map-hints {
    font-size: 90%;
}

.state-map-legend .title,
.state-map-hints .title {
    margin-bottom: 8px;
    font-weight: bold;
}

.legend-item p {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    gap: 16px;
}

.legend-color {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.available {
    background-color: var(--color-brand-blue, #0C5DA2);
}

.no-features {
    background-color: #d0d0d0;
}


/* Mobile responsiveness for tooltips */
@media screen and (max-width: 768px) {
    .tippy-box[data-theme~='woods-states'] {
        max-width: 250px;
        font-size: 13px;
    }
    
    #woods-states-tooltip .h4 {
        font-size: 14px;
    }
    
    #woods-states-tooltip ul {
        padding-left: 12px;
    }

    .state-map-legend {
        margin: 48px 0;
        width: 100%;
    }

    .state-map-hints .desktop {
        display: none;
    }
    
}