.section-map {
    position: relative;
}

.section-map .map-area {
    flex-direction: column-reverse;
}

.section-map .map-key .flex-box:not(:last-of-type) {
    margin-bottom: 0.5rem;
}

.section-map .map-key .flex-box > div:first-of-type {
    align-items: flex-start;
    aspect-ratio: 1 / 1;
    border: 2px solid var(--color-foreground);
    border-radius: 100vw;
    height: 1.25rem;
    margin-right: 0.5rem;
}

.section-map .map-key .flex-box > div:last-of-type {
    flex: 1;
    line-height: 1.333;;
}

.section-map .map-area .map-key, 
.section-map .map-area .map-content {
    flex: none;
    width: 100%;
}

.section-map .map-area .map-key {
    margin-top: 1.5rem;
}

.section-map .map-area .map-key-bottom {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-map .map-area .map-key-bottom > .flex-box, 
.section-map .map-area .map-key-bottom > .flex-box:not(:last-of-type) {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0;
    max-width: 8rem;
}

.section-map .map-key-left > div {
    width: 100%;
}

.section-map .map-key-left .map-area {
    margin-bottom: 1.5rem;
}

.section-map .map-key-left .map-area svg {
    width: 100%;
}

.section-map .map-key-left .map-key p {
    margin-bottom: 0;
}

.page-section .us-map-area .map-content .map-state-selector label {
    display: block;
    font-weight: var(--font-weight-medium);
    margin: 0;
}

.map-area svg path, 
.map-area svg circle {
    transition: 0.75s;
}

.section-map .map-state-selector {
    margin-bottom: 0.75rem;
}

.section-map .state-table-items {
    margin-top: 1.5rem;
}

.section-map .state-table-items .state-table-items-header {
    display: none;
}

.section-map .state-table-items .state-table-items-row:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
}

.section-map .state-table-items .state-table-items-row > div:first-child {
    font-weight: var(--font-weight-semibold);
    padding-bottom: 0.125rem;
}

.section-map .state-table-items .state-table-items-row > div:last-child p:last-child {
    margin-bottom: 0;
}

.section-map .state-table-items .state-table-items-row > div:first-child > span {
    display: inline-block;
    vertical-align: middle;
}

.section-map .state-table-items .state-table-items-row > div:first-child > span:nth-child(2) {
    aspect-ratio: 1 / 1;
    border: 2px solid var(--color-foreground);
    border-radius: 100vw;
    height: 1.25rem;
    margin-left: 0.25rem;
}

.section-map .state-table-no-data-message {
    background-color: var(--color-background-alternate);
    border: 2px solid var(--color-border);
    border-radius: 100vw;
    display: none;
    font-weight: var(--font-weight-semibold);
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    width: max-content;
}

.section-map .linking-study-key {
    margin-top: 1.5rem;
}

.section-map .linking-study-key > .flex-box {
    align-items: center;
}

.section-map .linking-study-key > .flex-box:not(:last-of-type) {
    margin-bottom: 0.5rem;
}

.section-map .linking-study-key > .flex-box > div:first-child {
    aspect-ratio: 1 / 1;
    border-radius: 100vw;
    margin-right: 0.25rem;
    width: 1.5rem;
}

.section-map .linking-study-key > .flex-box > div:last-child {
    flex: 1;
}

.section-us-maps .map-content > svg path, 
.section-us-maps .map-content > svg circle {
    cursor: pointer;
}

.linking-study-pop-up {
    background: var(--color-background-alternate);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    position: absolute;
    width: 20rem;
    z-index: 100;
}

.linking-study-pop-up > .flex-box {
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.linking-study-pop-up > .flex-box > div {
    flex: 1;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-semibold);
    letter-spacing: calc(2 * var(--tracking-basis));
    padding: 0.5rem;
    text-transform: uppercase;
}

.linking-study-pop-up > .flex-box > button {
    background-color: transparent;
    border: 0;
    color: var(--color-link-normal);
    font-size: var(--font-size-heading-3);
    font-weight: var(--font-weight-bold);
    padding: 0.5rem;
}

.linking-study-pop-up .state-info {
    padding: 1rem 0.5rem;
    text-align: center;
}

.linking-study-pop-up .state-info svg, 
.linking-study-pop-up .state-info span {
    display: inline-block;
    vertical-align: middle;
}

.linking-study-pop-up .state-info svg {
    fill: var(--color-foreground);
    height: 3rem;
}

.linking-study-pop-up .state-info span {
    font-family: var(--font-header);
    font-size: var(--font-size-heading-4);
    padding-left: 0.5rem;
}

.linking-study-pop-up .linking-study-products {
    padding: 0 0 1rem 0;
    text-align: center;
}

.linking-study-pop-up .linking-study-products button {
    background-color: var(--color-link-normal);
    border: 0;
    border-radius: 100vw;
    color: var(--color-background-standard);
    display: block;
    font-size: var(--font-size-normal);
    font-weight: var(--font-weight-bold);
    margin: 0.75rem auto 0.5rem auto;
    padding: 0.5rem 1rem;
    width: max-content;
}

.linking-study-pop-up .linking-study-products button:hover {
    background-color: var(--color-link-hover);
}

@media (min-width: 48rem) { /* 768 px */
    .section-map .map-key-left {
        flex-direction: row-reverse;
    }

    .section-map .map-key-left .map-key {
        align-self: center;
        margin-top: 0;
        max-width: 12rem;
        width: 25%;
    }

    .section-map .map-key-left .map-area {
        flex: 1;
        margin-left: 5%;
        width: auto;
    }

    .section-map .map-area svg {
        max-width: 48rem;
    }

    .section-map .state-table-items .state-table-items-header {
        background-color: var(--color-foreground);
        color: var(--color-background-standard);
        display: flex;
    }

    .section-map .state-table-items .state-table-items-header > div {
        font-weight: var(--font-weight-semibold);
        padding: 0.5rem 1rem;
    }

    .section-map .state-table-items .state-table-items-header > div:first-child {
        width: 25%;
    }

    .section-map .state-table-items .state-table-items-header > div:last-child {
        flex: 1;
    }

    .section-map .state-table-items .state-table-items-row, 
    .section-map .state-table-items .state-table-items-row:not(:last-child) {
        align-items: stretch;
        border: 1px solid var(--color-border);
        border-top-width: 0;
        display: flex;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .section-map .state-table-items .state-table-items-row:nth-child(odd) {
        background-color: var(--color-background-alternate);
    }
    
    .section-map .state-table-items .state-table-items-row > div {
        padding: 0.5rem 1rem;
    }

    .section-map .state-table-items .state-table-items-row > div:first-child {
        width: 25%;
    }

    .section-map .state-table-items .state-table-items-row > div:last-child {
        border-left: 1px solid var(--color-border);
        flex: 1;
    }

    .section-map .map-area .grid-key {
        display: table-row;
        width: auto;
    }

    .section-map .map-area .grid-key > .flex-box {
        display: table-cell;
        padding-right: 1.25rem;
        width: auto;
    }

    .section-map .map-area .grid-key > .flex-box > div {
        display: inline-block;
        vertical-align: middle;
    }

    .section-map .map-area .grid-key > .flex-box > div:first-of-type {
        margin-right: 0.125rem;
    }
}

@media (prefers-color-scheme: dark) {
    .section-map .state-table-items .state-table-items-header > div, 
    .section-map .state-table-items .state-table-items-row > div {
        box-sizing: border-box;
    }
   
    .section-map .state-table-items .state-table-items-header > div {
        background-color: var(--color-dark-gray-0);
        border: 1px solid var(--color-border);
        color: var(--color-foreground);
    }

    .section-map .state-table-items .state-table-items-header > div:last-child {
        border-left-width: 0;
    }
}

