.ssc-logo-picker {
    width: 100%;
    margin-top: 14px;
    flex: 0 0 100%;
}

.ssc-logo-picker__measure {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
}

.ssc-logo-picker__section {
    min-height: 96px;
}

.ssc-logo-picker__section + .ssc-logo-picker__section {
    margin-top: 12px;
}

.ssc-logo-picker__section-heading {
    display: flex;
    min-height: 22px;
    padding: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ssc-logo-picker__section-title {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

/*
 * Picker headings intentionally do not reuse native label classes. Staging
 * inspection showed those classes depend on scoped ancestor selectors, while
 * bare h4 elements pick up unrelated theme heading rules. These complete,
 * plugin-owned treatments are the two measured visual contracts.
 */
.ssc-logo-picker--designer .ssc-logo-picker__section-heading {
    /* Native Designer label text begins 10px after the aligned grid edge. */
    padding-left: 10px;
}

.ssc-logo-picker--designer .ssc-logo-picker__section-title {
    margin: 0 0 6px;
    font-family: inherit;
    font-size: 14px;
    font-style: normal;
    font-variant: normal;
    font-stretch: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    color: #444;
}

.ssc-logo-picker--configurator .ssc-logo-picker__section-heading {
    /* Native Configurator section-title text is flush with the grid edge. */
    padding-left: 0;
}

.ssc-logo-picker--configurator .ssc-logo-picker__section-title {
    margin: 0;
    font-family: inherit;
    font-size: 13.5px;
    font-style: normal;
    font-variant: normal;
    font-stretch: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: normal;
    text-align: left;
    text-transform: uppercase;
    color: #272727;
}

/*
 * Logo tiles deliberately reuse the shared swatch DOM/classes:
 * .ssc-swatch-grid > .ssc-swatch-item >
 * (.ssc-swatch-image | .ssc-swatch-text), with .ssc-swatch-active selected.
 * The native button reset keeps that visual contract while retaining native
 * keyboard activation and semantics.
 */
.ssc-logo-picker__item {
    min-height: 54px;
    padding: 0;
    border: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
}

/*
 * Shared swatches render their filename tooltip with pseudo-elements. Picker
 * tiles own a richer WCAG 1.4.13 preview instead, so both shared pseudo-elements
 * are explicitly disabled to prevent duplicate hover content.
 */
.ssc-logo-picker__item::before,
.ssc-logo-picker__item::after {
    content: none;
}

.ssc-logo-picker__swatch-image img {
    object-fit: contain;
}

.ssc-logo-picker__file-badge {
    border-radius: 0;
    font-size: 10px;
    letter-spacing: 0.05em;
}

.ssc-logo-picker__selected-cue {
    position: absolute;
    right: 1px;
    bottom: 1px;
    display: none;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.ssc-logo-picker__item.ssc-swatch-active .ssc-logo-picker__selected-cue {
    display: flex;
}

.ssc-logo-picker__item[aria-disabled="true"] {
    cursor: wait;
    opacity: 0.55;
    pointer-events: none;
}

.ssc-logo-picker__load-more {
    min-width: 64px;
    min-height: 54px;
    margin: 0;
    padding: 6px 10px;
    align-self: flex-start;
    border: 1px dashed #888;
    border-radius: 4px;
    background: #fff;
    color: #444;
    cursor: pointer;
    font-size: 11px;
    line-height: 1.2;
}

.ssc-logo-picker__load-more:hover,
.ssc-logo-picker__load-more:focus {
    border-color: #23232c;
    color: #23232c;
}

.ssc-logo-picker__clear {
    min-width: 24px;
    min-height: 24px;
    margin: 0;
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
}

.ssc-logo-picker__item:focus-visible,
.ssc-logo-picker__load-more:focus-visible,
.ssc-logo-picker__clear:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 3px;
}

/*
 * The aria-live status region is for assistive technology only. The standard
 * visually-hidden clip pattern keeps it announced by screen readers while
 * rendering nothing visible and occupying no layout space for sighted users.
 * (display:none / visibility:hidden would silence AT — do not use those here.)
 */
.ssc-logo-picker__status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

/*
 * One body-level popover is fixed rather than absolutely participating in an
 * upload container. Opening and repositioning it therefore never changes page
 * geometry, and container overflow cannot clip the preview.
 */
.ssc-logo-picker__preview {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100000;
    max-width: min(180px, calc(100vw - 16px));
    padding: 8px;
    border: 1px solid #555;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 100ms ease, visibility 100ms ease;
}

.ssc-logo-picker__preview--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ssc-logo-picker__preview-media {
    display: flex;
    min-width: 108px;
    min-height: 108px;
    align-items: center;
    justify-content: center;
}

.ssc-logo-picker__preview-media img {
    display: block;
    width: auto;
    height: auto;
    max-width: 108px;
    max-height: 108px;
    object-fit: contain;
}

.ssc-logo-picker__preview-badge {
    display: flex;
    width: 108px;
    height: 108px;
    align-items: center;
    justify-content: center;
    border: 2px solid #555;
    background: #f0f0f0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ssc-logo-picker__preview-caption {
    max-width: 164px;
    margin-top: 6px;
    color: #222;
    font-size: 11px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-align: center;
}

.ssc-logo-picker__skeleton-heading,
.ssc-logo-picker__skeleton-tile {
    display: block;
    border-radius: 4px;
    background: linear-gradient(90deg, #eeeeee 25%, #f7f7f7 50%, #eeeeee 75%);
    background-size: 200% 100%;
    animation: ssc-logo-picker-pulse 1.3s ease-in-out infinite;
}

.ssc-logo-picker__skeleton-heading {
    width: 110px;
    height: 14px;
    margin-bottom: 8px;
}

.ssc-logo-picker__skeleton-tile {
    width: 54px;
    height: 54px;
    box-shadow: none;
}

@keyframes ssc-logo-picker-pulse {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ssc-logo-picker__item,
    .ssc-logo-picker__preview {
        transition: none;
    }

    .ssc-logo-picker__item:hover {
        transform: none;
    }

    .ssc-logo-picker__skeleton-heading,
    .ssc-logo-picker__skeleton-tile {
        animation: none;
    }
}

/*
 * The JS matchMedia gate is authoritative; this matching CSS guard also keeps
 * an already-created preview inert if pointer capability changes at runtime.
 */
@media (hover: none) {
    .ssc-logo-picker__preview {
        display: none;
    }
}

@media (max-width: 768px) {
    .ssc-logo-picker {
        margin-top: 12px;
    }
}
