/* Shared company logo selection grid (Find Services panel + community xAI modals). */
.company-selection-logos-context.companies-quote-geocode-status.is-ok {
    color: #166534;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: 0.5rem;
    padding: 0.55rem 0.65rem;
}

.company-selection-logos-context .companies-quote-companies-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0;
}

/* Cap admin selection grids at 5 logo rows; overflow scrolls. */
.company-selection-logos-context .companies-quote-companies-logos:has(> .companies-quote-company-item) {
    --company-selection-logos-row-height: 52px;
    --company-selection-logos-gap: 0.55rem;
    max-height: calc(
        (var(--company-selection-logos-row-height) * 5)
        + (var(--company-selection-logos-gap) * 4)
        + 0.35rem
    );
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    align-content: flex-start;
    padding: 0.15rem 0.1rem 0.35rem;
}

.company-selection-logos-context .companies-quote-companies-logos:has(> .companies-quote-company-item)::-webkit-scrollbar {
    width: 0.45rem;
}

.company-selection-logos-context .companies-quote-companies-logos:has(> .companies-quote-company-item)::-webkit-scrollbar-track {
    background: transparent;
}

.company-selection-logos-context .companies-quote-companies-logos:has(> .companies-quote-company-item)::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.28);
    border-radius: 999px;
}

.company-selection-logos-context .companies-quote-companies-logos:has(> .companies-quote-company-item)::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.42);
}

.company-selection-logos-context .companies-quote-company-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    max-width: 76px;
}

.company-selection-logos-context .companies-quote-company-logo {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 0.55rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.company-selection-logos-context .companies-quote-company-logo img,
.company-selection-logos-context .companies-quote-company-logo .company-map-marker-shell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

.company-selection-logos-context .companies-quote-company-logo .company-map-marker-shell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-selection-logos-context .companies-quote-company-logo-remove {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.58rem;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
    z-index: 2;
}

.company-selection-logos-context .companies-quote-company-logo-remove:hover {
    background: #bb2d3b;
}

.company-selection-logos-context .company-map-marker-shell {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.company-selection-logos-context .company-map-marker-confidence {
    position: absolute;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.2rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--confidence-color, #94a3b8);
    color: #fff;
    font-size: 0.62rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

.company-selection-logos-context .company-map-marker-confidence--bottom-right {
    right: -4px;
    bottom: -4px;
    left: auto;
    top: auto;
}

.company-selection-logos-context .company-map-marker-confidence--bottom-left {
    left: -4px;
    bottom: -4px;
    right: auto;
    top: auto;
}

.company-selection-logos-context .company-map-marker-confidence strong {
    font-weight: 800;
}

.company-selection-logos-context .company-analysis-selection-empty {
    margin: 0;
    color: #64748b;
}
