:root {
    --marketplace-logo-wildberries: url("../images/marketplaces/wildberries.png?v=20261024.1");
    --marketplace-logo-ozon: url("../images/marketplaces/ozon.png?v=20261024.1");
    --marketplace-logo-yandex: url("../images/marketplaces/yandex.png?v=20261024.1");
}

/* Public landing and its administrator-managed marketplace list. */
.landing-marketplace-mark:is(
    .logo-wildberries, .logo-wb, .logo-ozon, .logo-yandex,
    .logo-yandex-market, .logo-yandex_market
) {
    overflow: hidden;
    color: transparent !important;
    background-color: transparent !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    box-shadow: none;
    font-size: 0 !important;
    text-shadow: none !important;
}
.landing-marketplace-mark:is(.logo-wildberries, .logo-wb) {
    background-image: var(--marketplace-logo-wildberries);
}
.landing-marketplace-mark.logo-ozon { background-image: var(--marketplace-logo-ozon); }
.landing-marketplace-mark:is(.logo-yandex, .logo-yandex-market, .logo-yandex_market) {
    background-image: var(--marketplace-logo-yandex);
}

/* Keep the supplied artwork intact in direct-image usages. */
.marketplace-brand-image,
.preparation-marketplace img,
.mp-select-icon {
    object-fit: contain;
    background: transparent;
}

/* Text remains visible and accessible; the real sign replaces the old colour-only mark. */
:is(.script-marketplace-badge, .marketplace-badge, .marketplace-pill):is(
    .marketplace-badge-wildberries, .marketplace-badge-wb,
    .marketplace-pill-wildberries, .marketplace-pill-wb,
    .marketplace-wildberries, .marketplace-wb,
    .marketplace-badge-ozon, .marketplace-pill-ozon, .marketplace-ozon,
    .marketplace-badge-yandex, .marketplace-badge-yandex-market, .marketplace-badge-yandex_market,
    .marketplace-pill-yandex, .marketplace-pill-yandex-market, .marketplace-pill-yandex_market,
    .marketplace-yandex, .marketplace-yandex-market, .marketplace-yandex_market
) {
    min-height: 24px;
    padding: 3px 8px 3px 4px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    color: var(--ink) !important;
    background: color-mix(in srgb, var(--surface) 94%, var(--soft)) !important;
    border-color: color-mix(in srgb, var(--line) 78%, transparent) !important;
    box-shadow: 0 3px 10px rgb(18 27 50 / 8%);
}
:is(.script-marketplace-badge, .marketplace-badge, .marketplace-pill):is(
    .marketplace-badge-wildberries, .marketplace-badge-wb,
    .marketplace-pill-wildberries, .marketplace-pill-wb,
    .marketplace-wildberries, .marketplace-wb,
    .marketplace-badge-ozon, .marketplace-pill-ozon, .marketplace-ozon,
    .marketplace-badge-yandex, .marketplace-badge-yandex-market, .marketplace-badge-yandex_market,
    .marketplace-pill-yandex, .marketplace-pill-yandex-market, .marketplace-pill-yandex_market,
    .marketplace-yandex, .marketplace-yandex-market, .marketplace-yandex_market
)::before {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 16px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
}
:is(.script-marketplace-badge, .marketplace-badge, .marketplace-pill):is(
    .marketplace-badge-wildberries, .marketplace-badge-wb,
    .marketplace-pill-wildberries, .marketplace-pill-wb,
    .marketplace-wildberries, .marketplace-wb
)::before { background-image: var(--marketplace-logo-wildberries); }
:is(.script-marketplace-badge, .marketplace-badge, .marketplace-pill):is(
    .marketplace-badge-ozon, .marketplace-pill-ozon, .marketplace-ozon
)::before { background-image: var(--marketplace-logo-ozon); }
:is(.script-marketplace-badge, .marketplace-badge, .marketplace-pill):is(
    .marketplace-badge-yandex, .marketplace-badge-yandex-market, .marketplace-badge-yandex_market,
    .marketplace-pill-yandex, .marketplace-pill-yandex-market, .marketplace-pill-yandex_market,
    .marketplace-yandex, .marketplace-yandex-market, .marketplace-yandex_market
)::before { background-image: var(--marketplace-logo-yandex); }

/* Scheduler/run icons and store selectors no longer fall back to letters. */
:is(.batch-script-icon, .script-run-icon, .batch-schedule-scripts b):is(
    .marketplace-icon-wildberries, .marketplace-icon-wb,
    .marketplace-icon-ozon,
    .marketplace-icon-yandex, .marketplace-icon-yandex-market, .marketplace-icon-yandex_market
),
.market-logo[data-marketplace-logo] {
    overflow: hidden;
    color: transparent !important;
    background-color: transparent !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    border-color: transparent !important;
    box-shadow: none !important;
    font-size: 0 !important;
}
:is(.batch-script-icon, .script-run-icon, .batch-schedule-scripts b):is(
    .marketplace-icon-wildberries, .marketplace-icon-wb
),
.market-logo:is([data-marketplace-logo="wildberries"], [data-marketplace-logo="wb"]) {
    background-image: var(--marketplace-logo-wildberries) !important;
}
:is(.batch-script-icon, .script-run-icon, .batch-schedule-scripts b).marketplace-icon-ozon,
.market-logo[data-marketplace-logo="ozon"] {
    background-image: var(--marketplace-logo-ozon) !important;
}
:is(.batch-script-icon, .script-run-icon, .batch-schedule-scripts b):is(
    .marketplace-icon-yandex, .marketplace-icon-yandex-market, .marketplace-icon-yandex_market
),
.market-logo:is(
    [data-marketplace-logo="yandex"], [data-marketplace-logo="yandex-market"],
    [data-marketplace-logo="yandex_market"]
) {
    background-image: var(--marketplace-logo-yandex) !important;
}

/* Marketplace-specific helper panels and API walkthroughs. */
.marketplace-access-note-ozon > span,
.ozon-key-guide-brand:not(.wb-key-guide-brand) {
    overflow: hidden;
    color: transparent !important;
    background-color: transparent !important;
    background-image: var(--marketplace-logo-ozon) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    box-shadow: none !important;
    font-size: 0 !important;
}
.ozon-key-guide-brand.wb-key-guide-brand {
    overflow: hidden;
    color: transparent !important;
    background-color: transparent !important;
    background-image: var(--marketplace-logo-wildberries) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    box-shadow: none !important;
    font-size: 0 !important;
}

/* Generated report labels in the administrator portal. */
.admin-company-settings-page .export-card .export-title-line h2::after {
    padding-left: 25px;
    color: var(--ink);
    background-color: var(--surface);
    background-image: var(--marketplace-logo-wildberries);
    background-position: 5px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    border-color: color-mix(in srgb, #cb11ab 38%, var(--line));
    box-shadow: 0 3px 10px rgb(18 27 50 / 8%);
}
.admin-company-settings-page .export-card:has(a[href*="/reports/ozon_"]) .export-title-line h2::after {
    color: var(--ink);
    background-color: var(--surface);
    background-image: var(--marketplace-logo-ozon);
    border-color: color-mix(in srgb, #005bff 38%, var(--line));
}
.admin-company-settings-page .export-card:has(a[href*="/reports/yandex_"]) .export-title-line h2::after {
    color: var(--ink);
    background-color: var(--surface);
    background-image: var(--marketplace-logo-yandex);
    border-color: color-mix(in srgb, #ffb800 45%, var(--line));
}

/* Company export settings use the marketplace sign instead of script letters. */
.admin-company-settings-page .export-card .export-icon {
    overflow: hidden;
    color: transparent !important;
    background-color: transparent !important;
    background-image: var(--marketplace-logo-wildberries) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    box-shadow: none !important;
    font-size: 0 !important;
}
.admin-company-settings-page .export-card:has(a[href*="/reports/ozon_"]) .export-icon {
    background-image: var(--marketplace-logo-ozon) !important;
}
.admin-company-settings-page .export-card:has(a[href*="/reports/yandex_"]) .export-icon {
    background-image: var(--marketplace-logo-yandex) !important;
}

@media (max-width: 620px) {
    :is(.script-marketplace-badge, .marketplace-badge, .marketplace-pill):is(
        .marketplace-badge-wildberries, .marketplace-badge-wb,
        .marketplace-pill-wildberries, .marketplace-pill-wb,
        .marketplace-wildberries, .marketplace-wb,
        .marketplace-badge-ozon, .marketplace-pill-ozon, .marketplace-ozon,
        .marketplace-badge-yandex, .marketplace-pill-yandex, .marketplace-yandex
    ) {
        max-width: 100%;
    }
}
