/* ---------- mobile ---------- */

.graph-module-wrap {
    padding: 0 16px;
    margin-bottom: 64px
}

.graph-module-wrap .graph-module-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    grid-column-gap: 16px;
    max-width: 80rem;
    margin: 0 auto;
}

.graph-module-wrap .graph-module-grid h2 {
    grid-column: span 4;
    text-align: center;
    margin-bottom: 48px;
}

.graph-module-wrap .graph-module-grid > p {
    grid-column: span 4;
    text-align: center;
    margin-bottom: var(--space-lg);
}

.graph-module-wrap .graph-module-grid .zone-backdrop {
    grid-column: span 4;
    text-align: center;
    padding: var(--space-md);
    box-shadow: var(--box-shadow);
    border-radius: var(--radius-md);
    background-color: var(--white);
}

.graph-module-wrap .graph-module-grid .zone-backdrop p {
    font-size: var(--fs-xs);
    margin-bottom: var(--space-md);

    &:last-of-type {
        margin-bottom: 0;
    }
}

.graph-module-wrap .graph-module-grid .zone-backdrop .graph-selection {
    position: relative;
}

.graph-module-wrap .graph-module-grid .zone-backdrop .graph-selection button {
    grid-column: span 4;
    border: var(--border) solid black;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: black;
    border-radius: var(--radius-md);
    justify-self: center;
    width: 100%;
    background-color: var(--white);
}

.graph-module-wrap .graph-module-grid .zone-backdrop .graph-selection button:hover {
    cursor: pointer;
}

.graph-module-wrap .graph-module-grid .zone-backdrop .graph-selection ul {
    list-style: none;
    position: absolute;
    background: var(--white);
    width: 100%;
    margin-top: 1rem;
    border: var(--border) solid var(--black);
    border-radius: var(--radius-md);
    display: none;

    &.visible {
        display: block;
    }
}

.graph-module-wrap .graph-module-grid .zone-backdrop .graph-selection ul li {
    padding: 16px;
    border-bottom: var(--border) solid var(--black);

    &:last-of-type {
        border-bottom: none;
    }
}

.graph-module-wrap .graph-module-grid .zone-backdrop .graph-selection ul li:hover {
    cursor: pointer;
}

/* ---------- tablet ---------- */

@media screen and (min-width: 48rem) {
    .graph-module-wrap .graph-module-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .graph-module-wrap .graph-module-grid h2 {
        grid-column: span 6;
    }

    .graph-module-wrap .graph-module-grid > p {
        grid-column: span 6;
    }

    .graph-module-wrap .graph-module-grid .zone-backdrop {
        grid-column: span 6;
        padding: var(--space-xl);
    }

    .graph-module-wrap .graph-module-grid .zone-backdrop .graph-selection button {
        grid-column: span 6;
        max-width: 66.66666%;
    }

    .graph-module-wrap .graph-module-grid .zone-backdrop ul {
        max-width: 66.66666%;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ---------- laptop ---------- */

@media screen and (min-width: 80rem) {
    .graph-module-wrap {
        margin-bottom: 96px;
    }

    .graph-module-wrap .graph-module-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .graph-module-wrap .graph-module-grid h2 {
        grid-column: 2 / span 10;
    }

    .graph-module-wrap .graph-module-grid > p {
        grid-column: 2 / span 10;
    }

    .graph-module-wrap .graph-module-grid .zone-backdrop {
        grid-column: span 12;
        padding: var(--space-xl);
    }

    .graph-module-wrap .graph-module-grid .zone-backdrop .graph-selection button {
        grid-column: span 12;
        max-width: 33.33333%;
    }

    .graph-module-wrap .graph-module-grid .zone-backdrop p {
        max-width: 66.66666%;
        margin: 0 auto 1rem;
    }

    .graph-module-wrap .graph-module-grid .zone-backdrop ul {
        max-width: 33.33333%;
    }
}