/* Focused visual cleanup for commerce workspaces. The public landing page is intentionally untouched. */

/* Product detail: one quiet surface, clear seller information, and less decorative chrome. */
body:has(.pp-page),
body:has(.pp-checkout) {
  background: #111214 !important;
  background-image: none !important;
}

body:has(.pp-page) .pp-description,
body:has(.pp-page) .pp-reviews,
body:has(.pp-page) .pp-buy-card,
body:has(.pp-checkout) .pp-checkout-card {
  background: #151618 !important;
  background-image: none !important;
  border-color: #2d3035 !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

body:has(.pp-page) .pp-buy-card {
  padding: 19px !important;
}

body:has(.pp-page) .pp-buy-card-top .pp-eyebrow,
body:has(.pp-page) .pp-product-intro > .pp-eyebrow {
  color: #d9a253 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: .045em !important;
  text-transform: none !important;
}

body:has(.pp-page) .pp-product-intro h1 {
  line-height: 1.18 !important;
  letter-spacing: -.025em !important;
}

body:has(.pp-page) .pp-seller-line > span:last-child,
body:has(.pp-page) .pp-seller-line .pp-dot,
body:has(.pp-page) .pp-seller-rating .pp-seller-sales {
  display: none !important;
}

body:has(.pp-page) .pp-buy-seller-copy small {
  color: #aeb1b7 !important;
}

body:has(.pp-page) .pp-buy-seller-copy small b {
  color: #e9bd78 !important;
}

body:has(.pp-page) .pp-trust {
  gap: 0 !important;
  padding: 8px 0 12px !important;
}

body:has(.pp-page) .pp-trust > div {
  padding: 9px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #292b30 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body:has(.pp-page) .pp-trust > div:last-child {
  border-bottom: 0 !important;
}

body:has(.pp-page) .pp-trust-icon {
  width: 24px !important;
  height: 24px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #262117 !important;
  color: #e7b76c !important;
}

body:has(.pp-page) .pp-buy-button {
  min-height: 50px !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: 15px !important;
}

body:has(.pp-page) .pp-buy-button:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: brightness(1.06);
}

body:has(.pp-page) .pp-add-cart {
  min-height: 43px !important;
  border-radius: 10px !important;
}

body:has(.pp-page) .pp-favorite svg {
  width: 21px !important;
  height: 21px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
}

body:has(.pp-page) .pp-favorite.is-saved svg {
  fill: #e9a449 !important;
  stroke: #e9a449 !important;
}

body:has(.pp-page) .pp-stars {
  display: inline-flex !important;
  align-items: center;
  gap: 2px !important;
  letter-spacing: 0 !important;
}

body:has(.pp-page) .pp-star {
  width: 13px;
  height: 13px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.4;
}

body:has(.pp-page) .pp-star.is-filled {
  fill: currentColor;
}

body:has(.pp-page) .pp-inline-star {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
  fill: currentColor;
}

body:has(.pp-page) .pp-product-highlights b svg,
body:has(.pp-page) .pp-trust-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Orders: neutral page surface; lifecycle colors remain semantic and consistent. */
body.ui-unified:has(.purchases-page) {
  background: #111214 !important;
  background-image: none !important;
}

.ui-unified .purchases-box,
.ui-unified .purchase-order-card {
  background: #151618 !important;
  border-color: #2d3035 !important;
  box-shadow: none !important;
}

.ui-unified .purchases-toolbar,
.ui-unified .purchase-actions {
  background: #17181a !important;
}

.ui-unified .purchase-empty {
  background: #151618 !important;
  border-color: #2d3035 !important;
  box-shadow: none !important;
}

.ui-unified .purchase-status.hold { color: #e8bd75 !important; }
.ui-unified .purchase-status.released,
.ui-unified .purchase-status.hold.confirmed { color: #80c99a !important; }
.ui-unified .purchase-status.dispute { color: #f17679 !important; }
.ui-unified .purchase-status.refunded { color: #efc45e !important; }

/* Buyer chat: keep the existing full-page two-pane interaction, with a calmer monochrome frame. */
body:has(.buyer-chat-page) {
  background: #111214 !important;
  background-image: none !important;
}

.buyer-chat-page .buyer-chat-eyebrow {
  margin-bottom: 6px !important;
  color: #d7a256 !important;
  font-size: 11px !important;
  letter-spacing: .06em !important;
}

.buyer-chat-page .buyer-chat-heading h1 {
  letter-spacing: -.035em !important;
}

.buyer-chat-page .buyer-chat-workspace,
.buyer-chat-page .buyer-chat-sidebar,
.buyer-chat-page .buyer-chat-thread {
  border-color: #2c2e33 !important;
  box-shadow: none !important;
}

.buyer-chat-page .buyer-chat-sidebar,
.buyer-chat-page .buyer-chat-sidebar-head {
  background: #151618 !important;
}

.buyer-chat-page .buyer-chat-thread,
.buyer-chat-page .buyer-chat-messages {
  background: #111214 !important;
}

.buyer-chat-page .buyer-chat-item {
  min-height: 76px !important;
  background: transparent !important;
}

.buyer-chat-page .buyer-chat-item:hover,
.buyer-chat-page .buyer-chat-item.active {
  background: #1a1b1e !important;
}

.buyer-chat-page :is(.buyer-chat-item-copy small,.buyer-chat-message time,.buyer-chat-empty small) {
  font-size: 12px !important;
}

.buyer-chat-page .buyer-chat-thread-head,
.buyer-chat-page .buyer-chat-compose {
  background: #151618 !important;
  border-color: #2c2e33 !important;
}

.buyer-chat-page .buyer-chat-compose input[name="message"] {
  min-height: 42px !important;
  font-size: 14px !important;
}

.buyer-chat-page .buyer-chat-empty-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

/* Seller workspace: unify the standalone and in-app dashboard backgrounds without changing navigation. */
html:has(.seller-dashboard-reference),
html:has(.seller-dashboard-reference) body,
body:has(.seller-dashboard),
body:has(.sell-page),
body:has(.seller-gate) {
  background: #111214 !important;
  background-image: none !important;
  color: #eceef1 !important;
}

html:has(.seller-gate) {
  background: #111214 !important;
}

html:has(.seller-gate) body {
  background: #111214 !important;
  background-image: none !important;
}

html:has(.seller-dashboard-reference) {
  background: #111214 !important;
}

html:has(.seller-dashboard-reference) .seller-dashboard-reference,
html:has(.seller-dashboard-reference) .seller-workspace,
html:has(.seller-dashboard-reference) .seller-dashboard-content,
.seller-dashboard,
.sell-page,
.seller-gate {
  background: #111214 !important;
  color: #eceef1 !important;
}

html:has(.seller-dashboard-reference) .seller-rail,
html:has(.seller-dashboard-reference) .seller-topbar,
html:has(.seller-dashboard-reference) .seller-dashboard-content :is(.seller-kpis article,.seller-chart-card,.seller-finance-card,.seller-ledger-card,.seller-orders-card,.seller-api-card),
html:has(.seller-dashboard-reference) :is(.seller-chat-list,.seller-chat-order-info),
body:has(.seller-dashboard) :is(.seller-sidebar,.seller-panel),
body:has(.sell-page) .panel,
body:has(.seller-gate) .seller-gate-card {
  background: #17181a !important;
  background-image: none !important;
  border-color: #2d3035 !important;
  box-shadow: none !important;
}

html:has(.seller-dashboard-reference) .seller-dashboard-content :is(input,select,textarea),
body:has(.seller-dashboard) :is(input,select,textarea),
body:has(.sell-page) :is(input,select,textarea) {
  background-color: #111214 !important;
  border-color: #34363b !important;
  color: #eceef1 !important;
}

html:has(.seller-dashboard-reference) .seller-dashboard-content :is(input,select,textarea):focus,
body:has(.seller-dashboard) :is(input,select,textarea):focus,
body:has(.sell-page) :is(input,select,textarea):focus {
  border-color: #b17b39 !important;
  outline: 2px solid #b17b3930 !important;
}

html:has(.seller-dashboard-reference) .seller-nav-item.active {
  background: #292219 !important;
  border-color: #58432a !important;
  color: #f0c27e !important;
}

html:has(.seller-dashboard-reference) .seller-dashboard-content :is(th,td),
body:has(.seller-dashboard) :is(th,td) {
  border-color: #292b30 !important;
}

body:has(.purchases-page) .footer,
body:has(.buyer-chat-page) .footer,
body:has(.seller-gate) .footer {
  background: #111214 !important;
  border-color: #2d3035 !important;
}

body:has(.seller-gate) .seller-gate-card {
  border-radius: 14px !important;
}

body:has(.seller-dashboard) .seller-page-heading h1,
body:has(.seller-dashboard-reference) .seller-page-title :is(h1,h2) {
  letter-spacing: -.035em !important;
}

@media (max-width: 650px) {
  body:has(.pp-page) .pp-product-intro h1 {
    font-size: clamp(20px, 5.6vw, 22px) !important;
    line-height: 1.17 !important;
  }

  body:has(.pp-page) .pp-buy-card {
    padding: 15px !important;
  }

  .buyer-chat-page .buyer-chat-workspace {
    border-radius: 12px !important;
  }

  .ui-unified .purchase-status.dispute { color: #f17679 !important; }

  .ui-unified .purchases-page {
    padding-inline: 16px !important;
  }

  .buyer-chat-page {
    padding-inline: 16px !important;
  }
}
