/* Official marketplace marks: compact, transparent and layout-safe. */
.marketplace-brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.marketplace-logo-host {
  overflow: hidden;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Orders: small real mark next to the order number, not a colored text pill. */
.marketplace-order-badge.marketplace-logo-host {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0 0 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -4px;
  border-radius: 5px;
}

.marketplace-order-badge.marketplace-logo-host .marketplace-brand-logo {
  width: 18px;
  height: 18px;
}

.marketplace-order-badge > b,
.marketplace-order-badge > span {
  display: none !important;
}

/* Scope selector: the logo itself is enough, so the repeated text label is hidden. */
.marketplace-scope-mark.marketplace-logo-host {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
}

.marketplace-scope button:has(.marketplace-logo-host) .marketplace-scope-label {
  display: none;
}

.marketplace-scope button:has(.marketplace-logo-host) {
  min-width: 42px;
  justify-content: center;
  padding-inline: 9px;
}

/* Dashboard heading. */
.store-logo.marketplace-logo-host {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
}

.store-logo.marketplace-logo-host .marketplace-brand-logo {
  width: 34px;
  height: 34px;
}

/* Sidebar workspace: preserve the original 34px grid column. */
.workspace-logo.marketplace-logo-host {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
}

.workspace-logo.marketplace-logo-host .marketplace-brand-logo {
  width: 32px;
  height: 32px;
}

/* Two connected marketplaces stay inside the same 42px slot. */
.workspace-logo.multi-marketplace {
  width: 42px;
  min-width: 42px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  background: transparent !important;
}

.workspace-logo.multi-marketplace > span.marketplace-logo-host {
  width: 19px;
  min-width: 19px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.workspace-logo.multi-marketplace > span.marketplace-logo-host .marketplace-brand-logo {
  width: 18px;
  height: 18px;
}

.workspace-card:has(.workspace-logo.multi-marketplace) {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

@media (max-width: 520px) {
  .marketplace-order-badge.marketplace-logo-host,
  .marketplace-order-badge.marketplace-logo-host .marketplace-brand-logo {
    width: 17px;
    height: 17px;
  }

  .marketplace-scope-mark.marketplace-logo-host {
    width: 24px;
    height: 24px;
  }
}
