.nsmg-location-directory {
    --nsmg-blue: rgb(36, 97, 148);
    --nsmg-black: rgb(35, 64, 77);
    --nsmg-border: #dbe3ea;
    --nsmg-card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    color: var(--nsmg-black);
    width: 100%;
}

.nsmg-location-directory *,
.nsmg-location-directory *::before,
.nsmg-location-directory *::after {
    box-sizing: border-box;
}

.nsmg-location-directory__header {
    margin-bottom: 18px;
}

.nsmg-location-directory__title,
.nsmg-location-directory__state {
    font-family: "Cooper BT", serif;
    font-weight: 600;
    color: var(--nsmg-blue);
    letter-spacing: 0;
}

.nsmg-location-directory__title {
    margin: 0 0 8px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
}

.nsmg-location-directory__subtitle,
.nsmg-location-directory__count,
.nsmg-location-directory__search,
.nsmg-location-card__name,
.nsmg-location-card__meta,
.nsmg-location-card__link,
.nsmg-location-directory__no-results,
.nsmg-location-directory-error {
    font-family: "Lato", sans-serif;
    font-weight: 400;
}

.nsmg-location-directory__subtitle {
    margin: 0;
    max-width: 760px;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(35, 64, 77, 0.88);
}

.nsmg-location-directory__toolbar {
    margin-bottom: 28px;
}

.nsmg-location-directory__search-wrap {
    position: relative;
    max-width: 420px;
}

.nsmg-location-directory__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #93a3b1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.nsmg-location-directory__search-icon svg,
.nsmg-location-card__pin svg,
.nsmg-location-card__external svg {
    width: 100%;
    height: 100%;
}

.nsmg-location-directory__search {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--nsmg-border);
    border-radius: 10px;
    background: #fff;
    padding: 12px 16px 12px 42px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--nsmg-black);
    outline: none;
}

.nsmg-location-directory__search::placeholder {
    color: #98a6b3;
}

.nsmg-location-directory__search:focus {
    border-color: rgba(36, 97, 148, 0.45);
    box-shadow: 0 0 0 3px rgba(36, 97, 148, 0.08);
}

.nsmg-location-directory__group + .nsmg-location-directory__group {
    margin-top: 28px;
}

.nsmg-location-directory__group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.nsmg-location-directory__state {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    color: var(--nsmg-black);
}

.nsmg-location-directory__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #6e7781;
    color: #fff;
    font-size: 12px;
    line-height: 1;
}

.nsmg-location-directory__grid {
    display: grid;
    grid-template-columns: repeat(var(--nsmg-columns), minmax(0, 1fr));
    gap: 14px;
}

.nsmg-location-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 126px;
    padding: 16px;
    border: 1px solid var(--nsmg-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--nsmg-card-shadow);
}

.nsmg-location-card__top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.nsmg-location-card__logo-wrap {
    width: 62px;
    min-width: 62px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.nsmg-location-card__logo {
    display: block;
    max-width: 100%;
    max-height: 44px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.nsmg-location-card__logo-wrap.is-empty {
    border-radius: 8px;
    background: #f2f5f8;
}

.nsmg-location-card__logo-placeholder {
    color: var(--nsmg-blue);
    font-family: "Cooper BT", serif;
    font-size: 18px;
    line-height: 1;
}

.nsmg-location-card__content {
    min-width: 0;
    flex: 1;
}

.nsmg-location-card__name {
    margin: 0 0 7px;
    color: var(--nsmg-black);
    font-size: 14px;
    line-height: 1.35;
}

.nsmg-location-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #667786;
    font-size: 12px;
    line-height: 1.4;
}

.nsmg-location-card__pin {
    width: 13px;
    height: 13px;
    color: #8fa0ae;
    flex: 0 0 auto;
}

.nsmg-location-card__footer {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.nsmg-location-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--nsmg-blue);
    font-size: 12px;
    line-height: 1.3;
    transition: opacity 0.2s ease;
}

.nsmg-location-card__link:hover {
    opacity: 0.8;
}

.nsmg-location-card__external {
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nsmg-location-card__link.is-disabled {
    color: #98a6b3;
    cursor: default;
}

.nsmg-location-directory__group.is-hidden,
.nsmg-location-card.is-hidden {
    display: none !important;
}

.nsmg-location-directory__no-results {
    margin: 22px 0 0;
    font-size: 14px;
    color: var(--nsmg-black);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1024px) {
    .nsmg-location-directory__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .nsmg-location-directory__title {
        font-size: 32px;
    }

    .nsmg-location-directory__subtitle {
        font-size: 13px;
    }

    .nsmg-location-directory__grid {
        grid-template-columns: 1fr;
    }

    .nsmg-location-card {
        min-height: 0;
        padding: 14px;
    }

    .nsmg-location-card__logo-wrap {
        width: 56px;
        min-width: 56px;
        height: 40px;
    }
}
