:root {
    --primary-color: #0067ae;
    --white: #fff;
}

.csn-location-cards {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

@media (min-width: 640px) {
    .csn-location-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .csn-location-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.csn-location-card {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csn-location-card__title {
    margin: 0;
    line-height: 1.25;
    font-size: 24px !important;
}

.csn-result-links {
    margin-top: auto; /* pins links to bottom */
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

#csn-location-results {
    .csn-location-cards {
        article.csn-location-card {
            justify-content: space-between;
            border: 1px solid #aaaaaa20;
            box-shadow: 0px 4px 4px 0px #00000040;
            padding: 1rem;
            margin-bottom: 0.75rem;

            .csn-result-title {
                display: flex;

                small {
                    margin-left: auto;
                }

                a {
                    font-weight: bold;
                }
            }

            .csn-loc-street,
            .csn-loc-cityline {
                font-size: 0.75rem;
                color: #666;
            }

            .csn-loc-cityline {
                line-height: 1;
            }

            .csn-result-links {
                margin-top: 1.5rem;
                display: flex;
                font-size: 0.8rem;
                justify-content: space-between;

                a:link,
                a:visited,
                a:hover,
                a:active {
                    color: #000;
                    text-decoration: underline solid #000 1px;
                }
            }
        }
    }
}

.csn-location-card.is-active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Title link color on active */
.csn-location-card.is-active .csn-location-card__title a:link,
.csn-location-card.is-active .csn-location-card__title a:visited,
.csn-location-card.is-active .csn-location-card__title a:hover,
.csn-location-card.is-active .csn-location-card__title a:active {
    color: var(--white) !important;
}

/* Address lines on active */
.csn-location-card.is-active .csn-loc-street,
.csn-location-card.is-active .csn-loc-cityline {
    color: var(--white) !important;
}

/* Stars fill on active */
.csn-location-card.is-active .csn-gstars__fg use {
    fill: var(--white);
}

/* Links on active */
.csn-location-card.is-active .csn-result-links a:link,
.csn-location-card.is-active .csn-result-links a:visited,
.csn-location-card.is-active .csn-result-links a:hover,
.csn-location-card.is-active .csn-result-links a:active {
    color: var(--white) !important;
    text-decoration-color: var(--white) !important;
}

.csn-location-map {
    margin-top: 18px;
    min-height: 600px;
    width: 100%;
}

#csn-location-map *:focus,
#csn-location-map *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.show-all-locations {
    text-align: center;
    text-decoration: underline solid var(--primary-color);
    margin: 0.5rem;
}
