/* Focused public discovery refinements. Kept separate from the legacy shared bundle
   so public UI can continue moving toward route-level CSS without a risky rewrite. */

.public-location-trigger {
    gap: .45rem;
}

@media (min-width: 1200px) {
    .public-location-trigger {
        border-radius: 8px;
        max-width: 10.5rem;
        padding: 0 .72rem;
        width: auto;
    }

    .public-location-trigger span {
        clip: auto;
        clip-path: none;
        display: block;
        font-size: .84rem;
        font-weight: 700;
        height: auto;
        overflow: hidden;
        position: static;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: auto;
    }
}

.directory-hero {
    scroll-margin-top: 5.5rem;
}

.directory-filter-disclosure {
    scroll-margin-top: 5.5rem;
}

.directory-profile {
    grid-template-columns: auto minmax(0, 1fr) minmax(12.5rem, .42fr);
}

.directory-profile-facts {
    align-self: stretch;
    border-left: 1px solid #dce7f4;
    display: grid;
    gap: .6rem;
    grid-template-rows: auto repeat(3, min-content);
    margin-left: .35rem;
    padding-left: 1.35rem;
}

.directory-profile-facts .section-kicker {
    align-self: end;
    font-size: .7rem;
}

.directory-profile-facts p {
    align-items: center;
    color: #3d587c;
    display: flex;
    font-size: .86rem;
    font-weight: 700;
    gap: .48rem;
    line-height: 1.35;
    margin: 0;
    min-width: 0;
}

.directory-profile-facts svg {
    color: #14885f;
    flex: 0 0 auto;
    height: 1rem;
    stroke-width: 2.2;
    width: 1rem;
}

.directory-profile-facts p span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.directory-profile-contact-prompt {
    background: #1767df;
    border: 1px solid #1767df;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(23, 103, 223, .15);
    color: #ffffff;
    padding: 0 .85rem;
}

.directory-profile-contact-prompt:hover,
.directory-profile-contact-prompt:focus-visible {
    background: #0957c7;
    border-color: #0957c7;
    color: #ffffff;
    outline: 2px solid #95c1ff;
    outline-offset: 2px;
    text-decoration: none;
}

.directory-benefit-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    max-width: none;
}

.directory-benefit-grid > :only-child {
    max-width: 32rem;
}

.directory-profile-page .directory-benefit-grid > :only-child {
    max-width: none;
}

.webstore-merchant-card-top .webstore-card-media-fallback {
    inset: 0;
    position: absolute;
    z-index: 0;
}

.webstore-merchant-card-top img {
    position: relative;
    z-index: 1;
}

@media (max-width: 991.98px) {
    .directory-profile {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .directory-profile-facts {
        border-left: 0;
        border-top: 1px solid #dce7f4;
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: auto 1fr;
        margin: .25rem 0 0;
        padding: 1rem 0 0;
    }

    .directory-profile-facts .section-kicker {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .directory-hero {
        padding-bottom: 1.35rem;
        padding-top: 1.35rem;
    }

    .directory-hero h1 {
        font-size: clamp(1.85rem, 8.5vw, 2.3rem);
        margin-bottom: .6rem;
        margin-top: .45rem;
    }

    .directory-hero p {
        font-size: .94rem;
        line-height: 1.45;
    }

    .directory-hero-actions {
        gap: .6rem;
        margin-top: 1.1rem;
    }

    .directory-hero-actions .btn {
        flex: 1 1 0;
        font-size: .86rem;
        min-height: 42px;
        padding-left: .7rem;
        padding-right: .7rem;
    }

    .directory-content {
        padding-top: 1.1rem;
    }

    .directory-filter-disclosure {
        box-shadow: 0 8px 18px rgba(15, 36, 66, .07);
        margin-bottom: 1.65rem;
        position: sticky;
        top: 4.8rem;
        z-index: 12;
    }

    .directory-profile {
        grid-template-columns: 1fr;
    }

    .directory-profile-facts {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .directory-profile-facts .section-kicker {
        grid-column: auto;
    }

    .directory-profile-contact-prompt {
        justify-content: center;
        width: 100%;
    }

    .directory-benefit-grid > :only-child {
        max-width: none;
    }
}

/* Keep business browsing on the same visual rail and surface system as deals. */
#directory-results {
    background: var(--public-canvas, #f7faff);
}

@media (min-width: 1440px) {
    #directory-results > .directory-shell {
        max-width: 1360px;
    }
}

#directory-results .directory-card.directory-merchant-card.unified-directory-card {
    background: #ffffff;
    border-color: var(--public-line, #dce7f4) !important;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 36, 66, .043);
}

