

/* Boot: hide classic layout + Woo embed until tabbed editor is ready. */
body.ysh-product-editor-ready:not(.ysh-product-editor-active) #poststuff,
body.ysh-product-editor-ready:not(.ysh-product-editor-active) .wrap > h1,
body.ysh-product-editor-ready:not(.ysh-product-editor-active) .wrap > a.page-title-action,
body.ysh-product-editor-ready:not(.ysh-product-editor-active) .wrap > hr,
body.ysh-product-editor-ready #woocommerce-embedded-root,
body.post-type-product:is(.post-php, .post-new-php) :is(#woocommerce-embedded-root, .woocommerce-layout, .woocommerce-layout__header) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

body.ysh-product-editor-active.post-type-product :is(#woocommerce-embedded-root, .woocommerce-layout, .woocommerce-layout__header) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Loading placeholder — a compact card inside the content section. */
body.ysh-product-editor-ready:not(.ysh-product-editor-active) :is(#yoo-shell-content, #wpbody-content) {
  position: relative !important;
}

/* While loading, show only the spinner card (collapse the hidden content wrap so
   no empty placeholder box appears beneath it). */
body.ysh-product-editor-ready:not(.ysh-product-editor-active) #wpbody-content .wrap {
  display: none !important;
}

.ysh-pe-loader {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  margin: 20px auto;
  max-width: var(--ysh-layout-max, 1400px);
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #fff;
  pointer-events: auto;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-pe-loader,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-pe-loader {
  background: #1a1d23;
  border-color: rgba(255, 255, 255, 0.1);
}

body.ysh-product-editor-active .ysh-pe-loader {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ysh-pe-loader__spinner {
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--ysh-brand, #eda934);
  border-radius: 50%;
  animation: ysh-pe-spin 0.65s linear infinite;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-pe-loader__spinner,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-pe-loader__spinner {
  border-color: rgba(255, 255, 255, 0.14);
  border-top-color: var(--ysh-brand, #eda934);
}

@keyframes ysh-pe-spin {
  to {
    transform: rotate(360deg);
  }
}

#ysh-product-editor {
  display: none !important;
}

body.ysh-product-editor-active #ysh-product-editor {
  display: block !important;
}

body.ysh-product-editor-active #poststuff {
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

body.ysh-product-editor-active.post-type-product #wpbody-content {
  padding-top: 0 !important;
}

body.ysh-product-editor-active #poststuff,
body.ysh-product-editor-active #post-body,
body.ysh-product-editor-active #post-body-content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

body.ysh-product-editor-active #poststuff #post-body.columns-2 {
  display: block !important;
}

body.ysh-product-editor-active #postbox-container-1 {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

body.ysh-product-editor-active #postbox-container-1 > .meta-box-sortables:empty {
  display: none !important;
}

/* Outer page section — same card shell as Woo Orders / YOOAdmin wrap */
body.ysh-product-editor-active.yoo-focus .yoo-shell-content,
body.ysh-product-editor-active .yoo-shell-content {
  padding-top: 20px !important;
  box-sizing: border-box;
}

body.ysh-product-editor-active #wpbody-content > .wrap {
  max-width: var(--ysh-layout-max, 1400px);
  width: 100% !important;
  margin-inline: auto !important;
  margin-bottom: 40px !important;
  padding: 0 16px !important;
  box-sizing: border-box;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ysh-product-editor-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 24px 20px 32px;
  box-sizing: border-box;
  border-radius: var(--ysh-radius, 14px);
  border: 1px solid var(--ysh-border, rgba(0, 0, 0, 0.08));
  background: var(--ysh-card, #fff);
}

/* WordPress autosave backup notice — keep out of page head / avoid ghost line */
.ysh-product-editor-notices {
  margin: 0 0 12px;
}

.ysh-product-editor-notices:empty {
  display: none !important;
  margin: 0 !important;
}

body.ysh-product-editor-active #local-storage-notice.hidden,
body.ysh-product-editor-active #ysh-product-editor-page-head #local-storage-notice,
body.ysh-product-editor-active .ysh-product-editor-notices #local-storage-notice.hidden {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.ysh-product-editor-active .ysh-product-editor-notices #local-storage-notice:not(.hidden) {
  margin: 0 0 12px !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-product-editor-page,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor-page {
  background: var(--ysh-card, #1a1d23);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Shell layout */
.ysh-product-editor {
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.ysh-product-editor__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .ysh-product-editor__workspace {
    grid-template-columns: 1fr;
  }
}

.ysh-product-editor__main {
  min-width: 0;
  background: var(--ysh-card, #fff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__main,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__main {
  background: var(--ysh-card, #1a1d23);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

/* Tab bar */
.ysh-product-editor__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--ysh-surface, #f6f7f8);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__tabs,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__tabs {
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ysh-product-editor__tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ysh-text-muted, #6b7280);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ysh-product-editor__tab:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ysh-heading, #1f2937);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__tab:hover,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ysh-heading, #d8d3ce);
}

.ysh-product-editor__tab.is-active {
  background: var(--ysh-card, #fff);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--ysh-heading, #111827);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__tab.is-active,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__tab.is-active {
  background: var(--ysh-card-hover, #22262e);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ysh-heading, #d8d3ce);
}

/* Tab panels */
.ysh-product-editor__panels {
  position: relative;
  min-height: 200px;
}

.ysh-pe-panel {
  display: none;
  padding: 16px 18px 20px;
  box-sizing: border-box;
}

.ysh-pe-panel.is-active {
  display: block;
}

/* Hide duplicate postbox chrome inside tab panels (keep product-data header). */
.ysh-pe-panel .postbox {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
}

/* The collapse toggle is hidden inside tabs, so never let a panel metabox stay
   collapsed — always show its content (fixes empty Yoast SEO / Short description). */
.ysh-pe-panel .postbox > .inside {
  display: block !important;
}

.ysh-pe-panel .postbox > .postbox-header,
.ysh-pe-panel .postbox > .hndle,
.ysh-pe-panel .postbox > button.handlediv {
  display: none !important;
}

.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .hndle,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header .hndle {
  display: block !important;
}

/* Hide the WP postbox header controls (collapse toggle + reorder arrows) inside
   the product-data tab. They render without icons here and the collapse button
   hid the whole panel when clicked. */
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header .handle-actions,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header .handle-order-higher,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header .handle-order-lower,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header button.handlediv,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > button.handlediv {
  display: none !important;
}

/* Keep the product-data box open even if WordPress marked it collapsed. */
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .inside {
  display: block !important;
}

.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header {
  padding: 0 !important;
  margin: 0 0 12px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header .hndle,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .hndle {
  padding: 10px 12px !important;
  margin: 0 !important;
  border-bottom: none !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  .ysh-pe-panel[data-panel="product-data"]
  #woocommerce-product-data
  > .postbox-header,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  .ysh-pe-panel[data-panel="product-data"]
  #woocommerce-product-data
  > .postbox-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  .ysh-pe-panel[data-panel="product-data"]
  #woocommerce-product-data
  :is(> .hndle, > .postbox-header .hndle),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  .ysh-pe-panel[data-panel="product-data"]
  #woocommerce-product-data
  :is(> .hndle, > .postbox-header .hndle) {
  color: var(--ysh-heading, #d8d3ce) !important;
}

/* Use the YOOAdmin admin font everywhere inside the product-data box. WooCommerce
   ships its own typography here, which looked inconsistent (different family and
   sizes) next to the rest of Studio Hub. */
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data .hndle,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data h2,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data h3,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data label,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data span,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data p,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data a,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data th,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data td,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data li,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data input,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data select,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data option,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data textarea,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data button {
  font-family: var(--yooadmin-latin-font-family, 'Montserrat'), 'Tajawal', sans-serif !important;
}

/* "Product data" heading scale. */
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .postbox-header .hndle,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data > .hndle {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

/* Product type select + Virtual/Downloadable labels next to the heading. */
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data .hndle .type_box,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data .hndle label,
.ysh-pe-panel[data-panel="product-data"] #woocommerce-product-data #product-type {
  font-size: 13px !important;
  font-weight: 500 !important;
}

.ysh-pe-panel .inside {
  margin: 0 !important;
  padding: 0 !important;
}

/* Title + description tab */
.ysh-pe-panel[data-panel="content"] #titlediv {
  margin: 0 0 16px;
}

.ysh-pe-panel[data-panel="content"] #title {
  width: 100%;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  box-shadow: none;
  box-sizing: border-box;
  background: var(--ysh-card, #fff);
  color: var(--ysh-heading, #111827);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ysh-pe-panel[data-panel="content"] #title:focus {
  border-color: rgba(237, 162, 52, 0.45);
  box-shadow: 0 0 0 3px rgba(237, 162, 52, 0.12);
  outline: none;
}

.ysh-pe-panel[data-panel="content"] #title-prompt-text {
  font-size: 1.125rem;
  padding: 8px 12px;
}

.ysh-pe-panel[data-panel="content"] #edit-slug-box {
  margin: 0 0 14px;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ysh-text-muted, #6b7280);
}

.ysh-pe-panel[data-panel="content"] #edit-slug-box strong {
  font-weight: 600;
  color: var(--ysh-text-muted, #6b7280);
}

.ysh-pe-panel[data-panel="content"] #sample-permalink a {
  color: var(--ysh-brand, #eda934);
  word-break: break-all;
}

.ysh-pe-panel[data-panel="content"] #edit-slug-buttons,
.ysh-pe-panel[data-panel="content"] #change-permalinks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.ysh-permalink-icon-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 0 0 4px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  background: var(--ysh-card, #fff) !important;
  color: var(--ysh-brand, #eda934) !important;
  box-shadow: none !important;
  line-height: 1 !important;
  vertical-align: middle;
}

.ysh-permalink-icon-btn .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.ysh-permalink-icon-btn:hover,
.ysh-permalink-icon-btn:focus {
  border-color: var(--ysh-brand, #eda934) !important;
  background: rgba(237, 162, 52, 0.08) !important;
  color: var(--ysh-brand, #eda934) !important;
}

.ysh-pe-panel[data-panel="content"] #postdivrich {
  margin: 0;
}

.ysh-pe-panel.is-active[data-panel="content"] #postdivrich,
.ysh-pe-panel.is-active[data-panel="short-description"] #postexcerpt {
  min-height: 280px;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-pe-panel[data-panel="content"] #title,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-pe-panel[data-panel="content"] #title {
  background: var(--ysh-card-hover, #22262e);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ysh-heading, #d8d3ce);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-permalink-icon-btn,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-permalink-icon-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Yoast fills tab panel only (not full page bleed). */
.ysh-pe-panel[data-panel="yoast"] #wpseo_meta,
.ysh-pe-panel[data-panel="yoast"] #wpseo_meta .inside,
.ysh-pe-panel[data-panel="yoast"] #wpseo_meta .wpseo-metabox-content,
.ysh-pe-panel[data-panel="yoast"] #wpseo_meta .wpseo-meta-section,
.ysh-pe-panel[data-panel="yoast"] #wpseo_meta .wpseo-meta-section-react,
.ysh-pe-panel[data-panel="yoast"] #wpseo_meta #wpseo-metabox-root,
.ysh-pe-panel[data-panel="yoast"] #wpseo_meta .wpseo-metabox-root {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Sidebar — tabbed shell (Publish / Organize / Media / More) */
.ysh-product-editor__sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ysh-sidebar-shell {
  background: var(--ysh-card, #fff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-shell,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-shell {
  background: var(--ysh-card, #1a1d23);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.ysh-sidebar-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--ysh-surface, #f6f7f8);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-tabs,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-tabs {
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ysh-sidebar-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ysh-text-muted, #6b7280);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ysh-sidebar-tab:hover {
  color: var(--ysh-heading, #111827);
  background: rgba(0, 0, 0, 0.04);
}

.ysh-sidebar-tab.is-active {
  background: var(--ysh-card, #fff);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--ysh-heading, #111827);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-tab,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-tab {
  color: var(--ysh-text-muted, #9aa3b2);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-tab:hover,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-tab:hover {
  color: var(--ysh-heading, #d8d3ce);
  background: rgba(255, 255, 255, 0.06);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-tab.is-active,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-tab.is-active {
  background: var(--ysh-card-hover, #22262e);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ysh-heading, #d8d3ce);
  box-shadow: none;
}

.ysh-sidebar-panels {
  min-height: 100px;
}

.ysh-sidebar-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  box-sizing: border-box;
}

.ysh-sidebar-panel.is-active {
  display: flex;
}

.ysh-product-editor__sidebar #postbox-container-1,
.ysh-product-editor__sidebar #postbox-container-2,
.ysh-product-editor__sidebar > .meta-box-sortables:empty {
  display: none !important;
}

.ysh-sidebar-panel .postbox {
  margin: 0 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  background: var(--ysh-card, #fff) !important;
  box-shadow: none !important;
  overflow: hidden;
}

.ysh-sidebar-panel .postbox.ysh-sidebar-metabox--publish,
#submitdiv.ysh-sidebar-metabox--publish {
  overflow: visible !important;
  position: relative;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-panel .postbox,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-panel .postbox {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Publish tab: single metabox — hide duplicate box title */
.ysh-sidebar-panel[data-sidebar-panel="publish"] .postbox:only-child > .postbox-header,
.ysh-sidebar-panel[data-sidebar-panel="publish"] .postbox:only-child > .hndle {
  display: none !important;
}

/* One divider under metabox titles (not postbox-header + hndle double line). */
.ysh-product-editor__sidebar .postbox > .postbox-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  padding: 0 !important;
  margin: 0 !important;
}

.ysh-product-editor__sidebar .postbox > .postbox-header .hndle,
.ysh-product-editor__sidebar .postbox > .hndle {
  padding: 12px 14px !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-bottom: none !important;
}

.ysh-product-editor__sidebar .postbox > .hndle:not(.postbox-header .hndle) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__sidebar .postbox > .postbox-header,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__sidebar .postbox > .hndle:not(.postbox-header .hndle),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__sidebar .postbox > .postbox-header,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  .ysh-product-editor__sidebar
  .postbox
  > .hndle:not(.postbox-header .hndle) {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__sidebar .postbox :is(.postbox-header .hndle, > .hndle),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  .ysh-product-editor__sidebar
  .postbox
  :is(.postbox-header .hndle, > .hndle) {
  color: var(--ysh-heading, #d8d3ce) !important;
}

.ysh-product-editor__sidebar .inside {
  padding: 12px 14px 14px !important;
}

.ysh-product-editor__sidebar #postbox-container-2 {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

.ysh-product-editor__sidebar .meta-box-sortables {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* WooCommerce product data — dark */
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data {
  background: transparent !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data .panel-wrap,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data ul.wc-tabs,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data .panel-wrap,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data ul.wc-tabs {
  background: var(--ysh-card-hover, #22262e) !important;
  background-color: var(--ysh-card-hover, #22262e) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data ul.wc-tabs li a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data ul.wc-tabs li a {
  background: transparent !important;
  color: var(--ysh-text-muted, #9aa3b2) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data ul.wc-tabs li.active a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data ul.wc-tabs li.active a {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--ysh-heading, #d8d3ce) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data .woocommerce_options_panel,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data .wc-metaboxes-wrapper,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data .woocommerce_options_panel,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data .wc-metaboxes-wrapper {
  background: var(--ysh-card, #1a1d23) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data label,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data .form-field,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data label,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data .form-field {
  color: var(--ysh-text-muted, #9aa3b2) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active #woocommerce-product-data :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

/* TinyMCE — toolbar + format dropdown */
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active :is(.wp-editor-wrap, .wp-editor-container, .quicktags-toolbar, #wp-content-editor-tools, #wp-excerpt-editor-tools),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active :is(.wp-editor-wrap, .wp-editor-container, .quicktags-toolbar, #wp-content-editor-tools, #wp-excerpt-editor-tools) {
  background: var(--ysh-card-hover, #22262e) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-panel,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-toolbar-grp,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-floatpanel,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-listbox button,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-panel,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-toolbar-grp,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-floatpanel,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-listbox button {
  background: var(--ysh-card-hover, #22262e) !important;
  background-color: var(--ysh-card-hover, #22262e) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu-item,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu-item .mce-text,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu-item,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu-item .mce-text {
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu-item:hover,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu-item.mce-selected,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu-item:hover,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-menu-item.mce-selected {
  background: rgba(255, 255, 255, 0.08) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-edit-area,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .mce-edit-area {
  background: #1a1d23 !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active textarea.wp-editor-area,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active textarea.wp-editor-area {
  background: #1a1d23 !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

/* Yoast dark inside tab */
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta .inside,
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta .wpseo-meta-section-react.active,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta .inside,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta .wpseo-meta-section-react.active {
  background: var(--ysh-card-hover, #22262e) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="bg-white"],
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="bg-slate"],
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="bg-gray"],
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="bg-white"],
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="bg-slate"],
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="bg-gray"] {
  background-color: var(--ysh-card-hover, #22262e) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="text-slate"],
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="text-gray"],
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="text-slate"],
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-pe-panel[data-panel="yoast"] #wpseo_meta [class*="text-gray"] {
  color: var(--ysh-text, #cfd6e0) !important;
}

/* Woo tour — single card surface (no ghost box behind modal) */
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  :is(.tour-kit-frame__container, .tour-kit-frame, .components-elevation),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  :is(.tour-kit-frame__container, .tour-kit-frame, .components-elevation) {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .woocommerce-tour-kit-step,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step {
  background: var(--ysh-card, #1a1d23) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4) !important;
  color: var(--ysh-text, #cfd6e0) !important;
  overflow: hidden;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .woocommerce-tour-kit :is(.components-card, .components-card__body),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit
  :is(.components-card, .components-card__body) {
  background: var(--ysh-card, #1a1d23) !important;
  color: var(--ysh-text, #cfd6e0) !important;
  border: none !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .woocommerce-tour-kit-step__heading,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .woocommerce-tour-kit-step__heading {
  color: var(--ysh-heading, #d8d3ce) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .woocommerce-tour-kit-step__description,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .woocommerce-tour-kit-step__description {
  color: var(--ysh-text-muted, #9aa3b2) !important;
}

/* =============================================================================
 * Dark — Publish box, taxonomy metaboxes, tour footer, Woo embed header
 * ============================================================================= */

body.ysh-product-editor-active .ysh-product-editor__main {
  box-shadow: none;
}

/* —— Dark: no extra black slab behind editor columns —— */
html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active :is(#post, #poststuff, #post-body, #post-body-content),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  :is(#post, #poststuff, #post-body, #post-body-content) {
  background: transparent !important;
  background-color: transparent !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] body.ysh-product-editor-active .ysh-product-editor__workspace,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__workspace {
  background: transparent !important;
}

/* Page title row (WP h1 + Add new product) — single divider below */
.ysh-product-editor__page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 0 20px;
  padding: 0 2px 16px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__page-head,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__page-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ysh-product-editor__page-head h1,
.ysh-product-editor__page-head .wp-heading-inline {
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  float: none !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__page-head h1,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-product-editor__page-head h1 {
  color: var(--ysh-heading, #d8d3ce) !important;
}

.ysh-product-editor__page-head .page-title-action {
  flex: 0 0 auto;
  margin: 0 !important;
  margin-left: auto !important;
  float: none !important;
  position: static !important;
  top: auto !important;
  right: auto !important;
  white-space: nowrap;
}

body.ysh-product-editor-active .wrap > a.page-title-action {
  display: none !important;
}

body.ysh-product-editor-active .wrap > hr,
body.ysh-product-editor-active :is(hr.wp-header-end, .wp-header-end) {
  display: none !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

body.ysh-product-editor-active .yp-breadcrumbs-bar {
  border-bottom: none !important;
  box-shadow: none !important;
}

/* —— Publish metabox —— */
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  #submitdiv,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  #submitdiv,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  #submitdiv,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  #submitdiv {
  background: transparent !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  :is(#minor-publishing-actions, #misc-publishing-actions, .misc-pub-section),
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  :is(#minor-publishing-actions, #misc-publishing-actions, .misc-pub-section),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  :is(#minor-publishing-actions, #misc-publishing-actions, .misc-pub-section) {
  background: transparent !important;
  color: var(--ysh-text-muted, #9aa3b2) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #major-publishing-actions,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #major-publishing-actions,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #major-publishing-actions {
  background: rgba(255, 255, 255, 0.04) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  :is(#misc-publishing-actions a, #minor-publishing-actions a, .edit-post-status, .edit-visibility, .edit-timestamp, #delete-action a),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  :is(#misc-publishing-actions a, #minor-publishing-actions a, .edit-post-status, .edit-visibility, .edit-timestamp, #delete-action a) {
  color: var(--ysh-brand, #eda934) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #delete-action
  a.submitdelete,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #delete-action
  a.submitdelete,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #delete-action
  a.submitdelete {
  color: #f87171 !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #publishing-action
  .spinner,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #publishing-action
  .spinner {
  background: transparent !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  :is(#save-post, #post-preview, .preview.button):not(.ysh-publish-toolbar-btn__input),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  :is(#save-post, #post-preview, .preview.button):not(.ysh-publish-toolbar-btn__input) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: var(--ysh-heading, #d8d3ce) !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu {
  background: var(--ysh-card, #1a1d23);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu #save-action,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu #preview-action,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu #duplicate-action,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu #save-action,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu #preview-action,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu #duplicate-action {
  border-top-color: rgba(255, 255, 255, 0.1);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu .ysh-publish-toolbar-btn,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu #preview-action a.preview,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu .ysh-publish-toolbar-btn,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-more-menu #preview-action a.preview {
  color: var(--ysh-heading, #d8d3ce) !important;
  background: transparent !important;
  border: none !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #publish,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  #submitdiv
  #publish {
  background: var(--ysh-brand, #eda934) !important;
  border-color: transparent !important;
  color: #1a1a1a !important;
}

/* —— Taxonomy metaboxes (categories, tags, brands) —— */
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .tabs-panel,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .wp-tab-panel,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .tabs-panel,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .wp-tab-panel {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  ul.categorychecklist
  li,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  label,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  ul.categorychecklist
  li,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  label {
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .category-tabs
  li,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .category-tabs
  li {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .category-tabs
  li.tabs,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .category-tabs
  li.tabs {
  background: rgba(255, 255, 255, 0.08) !important;
  border-bottom-color: rgba(255, 255, 255, 0.04) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .category-tabs
  a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .category-tabs
  a {
  color: var(--ysh-text-muted, #9aa3b2) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .category-tabs
  li.tabs
  a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  .category-tabs
  li.tabs
  a {
  color: var(--ysh-heading, #d8d3ce) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(#new-tag-product_tag, .tagsdiv input[type="text"], .taxonomydiv input[type="text"]),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(#new-tag-product_tag, .tagsdiv input[type="text"], .taxonomydiv input[type="text"]) {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  a,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  .inside
  a:not(.button),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  :is(.categorydiv, .tagsdiv, .taxonomydiv)
  a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  .inside
  a:not(.button) {
  color: var(--ysh-brand, #eda934) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  .tagchecklist
  span,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .ysh-product-editor__sidebar
  .tagchecklist
  span {
  color: var(--ysh-text, #cfd6e0) !important;
}

/* —— Tour modal footer / navigation —— */
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit
  :is(.components-card__footer, .woocommerce-tour-kit-step-navigation, .woocommerce-tour-kit-step-controls),
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step
  .components-card__footer,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit
  :is(.components-card__footer, .woocommerce-tour-kit-step-navigation, .woocommerce-tour-kit-step-controls),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step
  .components-card__footer {
  background: var(--ysh-card, #1a1d23) !important;
  background-color: var(--ysh-card, #1a1d23) !important;
  border: none !important;
  border-top: none !important;
  color: var(--ysh-text-muted, #9aa3b2) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit
  :is(.components-card__divider, .components-hr, hr),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit
  :is(.components-card__divider, .components-hr, hr) {
  display: none !important;
  border: none !important;
  background: transparent !important;
  height: 0 !important;
  margin: 0 !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step-navigation__step,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step-navigation__step-count,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step-navigation__step,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step-navigation__step-count {
  color: var(--ysh-text-muted, #9aa3b2) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit
  .components-button.is-primary,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit
  .components-button.is-primary {
  background: var(--ysh-brand, #eda934) !important;
  color: #1a1a1a !important;
  border-color: transparent !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step-controls__close-btn,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.ysh-product-editor-active
  .woocommerce-tour-kit-step-controls__close-btn {
  color: var(--ysh-text, #cfd6e0) !important;
}

/* Sidebar SaaS — organize / publish / media metaboxes */
.ysh-sidebar-saas .ysh-sidebar-metabox .inside {
  margin: 0;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  border: none;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs li {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--ysh-card, #fff);
  color: var(--ysh-text-muted, #6b7280);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs a:hover {
  color: var(--ysh-heading, #111827);
  border-color: rgba(0, 0, 0, 0.14);
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs .tabs {
  display: none;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs-panel,
.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .wp-tab-panel {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: var(--ysh-surface, #f9fafb);
  max-height: 200px;
  overflow: auto;
  padding: 10px 12px;
  margin: 0;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .wp-tab-panel li {
  margin: 0 0 6px;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .wp-tab-panel label {
  font-size: 13px;
  line-height: 1.4;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .add-new-h2,
.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) a[href*="taxonomy"] {
  display: inline-flex;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ysh-brand, #eda934) !important;
  text-decoration: none;
}

.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .add-new-h2:hover,
.ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) a[href*="taxonomy"]:hover {
  text-decoration: underline;
}

.ysh-sidebar-saas .tagsdiv .newtag {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 8px 10px;
  font-size: 13px;
  margin: 0 0 8px;
  box-sizing: border-box;
}

.ysh-sidebar-saas .tagsdiv .tagadd {
  border-radius: 8px;
  border: 1px solid var(--ysh-brand, #eda934);
  background: transparent;
  color: var(--ysh-brand, #eda934);
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
}

.ysh-sidebar-saas .tagsdiv .howto {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ysh-text-muted, #6b7280);
}

/* Publish metabox — SaaS icon toolbar */
.ysh-sidebar-metabox--publish .submitbox .clear {
  display: none;
}

.ysh-sidebar-metabox--publish #minor-publishing {
  margin: 0;
}

.ysh-sidebar-metabox--publish .ysh-publish-meta-row {
  padding: 0 0 12px;
  margin: 0 0 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ysh-sidebar-metabox--publish #misc-publishing-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.ysh-sidebar-metabox--publish .misc-pub-section {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ysh-text-muted, #6b7280);
}

.ysh-sidebar-metabox--publish .misc-pub-section strong {
  font-weight: 600;
  color: var(--ysh-heading, #374151);
}

.ysh-sidebar-metabox--publish #post-status-display,
.ysh-sidebar-metabox--publish #post-visibility-display,
.ysh-sidebar-metabox--publish #timestamp {
  font-weight: 600;
  color: var(--ysh-heading, #111827);
}

.ysh-sidebar-metabox--publish #minor-publishing-actions {
  display: none !important;
}

.ysh-sidebar-metabox--publish #delete-action,
.ysh-sidebar-metabox--publish #publishing-action {
  display: inline-flex !important;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  width: auto !important;
  max-width: none !important;
}

.ysh-sidebar-metabox--publish #major-publishing-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px;
  border-top: none;
  background: var(--ysh-surface, #f6f7f8);
  margin: 0 -14px -14px;
  padding: 10px 12px;
  overflow: visible;
}

.ysh-sidebar-metabox--publish #major-publishing-actions .ysh-publish-footer-toolbar {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  margin-left: auto;
}

.ysh-sidebar-metabox--publish #publishing-action {
  position: relative;
  margin-left: 0;
}

.ysh-publish-split {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
}

.ysh-publish-split__main {
  display: inline-flex;
  align-items: stretch;
}

.ysh-publish-split__main .ysh-publish-toolbar-btn--publish {
  border-radius: 6px 0 0 6px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.28) !important;
}

.ysh-publish-split__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0 7px;
  margin: 0;
  border: 1px solid var(--ysh-brand, #eda934);
  border-left: none;
  border-radius: 0 6px 6px 0;
  background: var(--ysh-brand, #eda934);
  color: #fff;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
}

.ysh-publish-split__toggle .dashicons {
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 14px;
  color: #fff;
}

.ysh-publish-split__toggle:hover,
.ysh-publish-split__toggle:focus {
  filter: brightness(1.04);
  color: #fff;
  outline: none;
}

.ysh-publish-split__toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.ysh-publish-more-menu {
  position: fixed;
  min-width: 200px;
  max-width: calc(100vw - 24px);
  padding: 4px 0;
  background: var(--ysh-card, #fff);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  z-index: 100050;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
  overflow: visible;
}

.ysh-publish-more-menu[hidden] {
  display: none !important;
}

.ysh-publish-more-menu #save-action,
.ysh-publish-more-menu #preview-action,
.ysh-publish-more-menu #duplicate-action {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  text-align: left !important;
  border: none !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.ysh-publish-more-menu > :first-child {
  border-top: none !important;
}

.ysh-publish-more-menu .ysh-publish-toolbar-btn,
.ysh-publish-more-menu #preview-action a.preview,
.ysh-publish-more-menu #preview-action #post-preview {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0;
  min-height: 28px;
  padding: 6px 10px !important;
  margin: 0 !important;
  float: none !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  color: var(--ysh-heading, #374151) !important;
  text-decoration: none !important;
  text-align: left !important;
  box-sizing: border-box;
}

.ysh-publish-more-menu .ysh-publish-toolbar-btn .dashicons,
.ysh-publish-more-menu #preview-action a.preview .dashicons {
  color: var(--ysh-brand, #eda934) !important;
}

.ysh-publish-more-menu .ysh-publish-toolbar-btn__text {
  color: inherit !important;
}

.ysh-publish-more-menu .ysh-publish-toolbar-btn:hover,
.ysh-publish-more-menu .ysh-publish-toolbar-btn:focus,
.ysh-publish-more-menu #preview-action a.preview:hover,
.ysh-publish-more-menu #preview-action a.preview:focus {
  background: rgba(237, 162, 52, 0.07) !important;
  border: none !important;
  color: var(--ysh-brand, #eda934) !important;
  outline: none;
  box-shadow: none !important;
}

.ysh-publish-more-menu .ysh-publish-toolbar-btn--draft,
.ysh-publish-more-menu .ysh-publish-toolbar-btn--preview,
.ysh-publish-more-menu .ysh-publish-toolbar-btn--duplicate {
  border: none !important;
  background: transparent !important;
}

.ysh-publish-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none !important;
  box-sizing: border-box;
  position: relative;
  white-space: nowrap;
  box-shadow: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    filter 0.15s ease;
}

.ysh-publish-toolbar-btn .dashicons {
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 14px;
  flex-shrink: 0;
}

.ysh-publish-toolbar-btn__text {
  display: inline-block;
}

.ysh-publish-toolbar-btn__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  opacity: 0;
}

.ysh-publish-toolbar-btn--draft,
.ysh-publish-toolbar-btn--preview,
.ysh-publish-toolbar-btn--duplicate {
  background: var(--ysh-card, #fff);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--ysh-heading, #374151);
}

.ysh-publish-toolbar-btn--draft:hover,
.ysh-publish-toolbar-btn--preview:hover,
.ysh-publish-toolbar-btn--duplicate:hover,
.ysh-publish-toolbar-btn--draft:focus,
.ysh-publish-toolbar-btn--preview:focus,
.ysh-publish-toolbar-btn--duplicate:focus {
  border-color: var(--ysh-brand, #eda934);
  color: var(--ysh-brand, #eda934);
  background: rgba(237, 162, 52, 0.06);
}

.ysh-publish-toolbar-btn--draft .dashicons,
.ysh-publish-toolbar-btn--preview .dashicons,
.ysh-publish-toolbar-btn--duplicate .dashicons {
  color: var(--ysh-brand, #eda934);
}

.ysh-publish-toolbar-btn--publish {
  background: var(--ysh-brand, #eda934) !important;
  border-color: var(--ysh-brand, #eda934) !important;
  color: #fff !important;
}

.ysh-publish-toolbar-btn--publish:hover,
.ysh-publish-toolbar-btn--publish:focus {
  filter: brightness(1.04);
  color: #fff !important;
}

.ysh-publish-toolbar-btn--publish .dashicons,
.ysh-publish-toolbar-btn--publish .ysh-publish-toolbar-btn__text {
  color: #fff !important;
}

.ysh-publish-toolbar-btn--trash {
  background: var(--ysh-card, #fff);
  border-color: rgba(180, 35, 24, 0.28);
  color: #b42318 !important;
}

.ysh-publish-toolbar-btn--trash:hover,
.ysh-publish-toolbar-btn--trash:focus {
  background: rgba(180, 35, 24, 0.06);
  border-color: #b42318;
  color: #b42318 !important;
}

.ysh-publish-toolbar-btn--trash .dashicons {
  color: #b42318;
}

.ysh-publish-edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 0 0 4px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ysh-text-muted, #6b7280) !important;
  text-decoration: none !important;
  vertical-align: middle;
}

.ysh-publish-edit-link .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
  color: var(--ysh-text-muted, #6b7280);
}

.ysh-publish-edit-link:hover,
.ysh-publish-edit-link:focus {
  color: var(--ysh-brand, #eda934) !important;
  background: transparent !important;
  border: none !important;
}

.ysh-publish-edit-link:hover .dashicons,
.ysh-publish-edit-link:focus .dashicons {
  color: var(--ysh-brand, #eda934);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish .ysh-publish-meta-row,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish .ysh-publish-meta-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-toolbar-btn--draft,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-toolbar-btn--preview,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-toolbar-btn--duplicate,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-toolbar-btn--trash,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-toolbar-btn--draft,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-toolbar-btn--preview,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-toolbar-btn--duplicate,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-publish-toolbar-btn--trash {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ysh-heading, #d8d3ce);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish .misc-pub-section strong,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish #post-status-display,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish #post-visibility-display,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish .misc-pub-section strong,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish #post-status-display,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish #post-visibility-display {
  color: var(--ysh-heading, #d8d3ce);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish #major-publishing-actions,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish #major-publishing-actions {
  background: rgba(255, 255, 255, 0.03);
}

.ysh-yoo-featured-wrap {
  width: 100%;
}

.ysh-yoo-featured-box .yoo-post-image-placeholder {
  width: 100%;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  border-radius: 10px;
  background: var(--ysh-surface, #f6f7f8);
  color: var(--ysh-text-muted, #6b7280);
  cursor: pointer;
  padding: 16px;
  box-sizing: border-box;
  appearance: none;
  font: inherit;
  text-align: center;
}

.ysh-yoo-featured-box .yoo-post-image-placeholder:hover {
  border-color: var(--ysh-brand, #eda934);
  color: var(--ysh-heading, #111827);
  background: rgba(237, 162, 52, 0.06);
}

.ysh-yoo-featured-box .yoo-post-image-placeholder .dashicons {
  font-size: 36px;
  width: 36px;
  height: 36px;
  color: var(--ysh-brand, #eda934);
}

.ysh-yoo-featured-box .yoo-post-image-placeholder .yoo-placeholder-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.yoo-product-featured-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yoo-product-featured-preview__img {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ysh-surface, #f6f7f8);
  cursor: pointer;
  appearance: none;
}

.yoo-product-featured-preview__img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
}

.yoo-product-featured-preview__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.yoo-btn-ghost {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--ysh-card, #fff);
  color: var(--ysh-heading, #111827);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}

.yoo-btn-ghost:hover {
  border-color: var(--ysh-brand, #eda934);
  color: var(--ysh-brand, #eda934);
}

.yoo-btn-ghost--danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.25);
}

.yoo-btn-ghost--danger:hover {
  border-color: #b42318;
  color: #b42318;
  background: rgba(180, 35, 24, 0.06);
}

.ysh-yoo-gallery-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ysh-yoo-gallery-ui:empty {
  display: none;
}

.ysh-yoo-gallery-box .yoo-post-image-placeholder,
.ysh-yoo-gallery-box .ysh-yoo-gallery-add-more.yoo-post-image-placeholder {
  width: 100%;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  border-radius: 10px;
  background: var(--ysh-surface, #f6f7f8);
  color: var(--ysh-text-muted, #6b7280);
  cursor: pointer;
  padding: 16px;
  box-sizing: border-box;
  appearance: none;
  font: inherit;
  text-align: center;
}

.ysh-yoo-gallery-box .ysh-yoo-gallery-add-more.yoo-post-image-placeholder {
  min-height: 72px;
}

.ysh-yoo-gallery-box .yoo-post-image-placeholder:hover,
.ysh-yoo-gallery-box .ysh-yoo-gallery-add-more.yoo-post-image-placeholder:hover {
  border-color: var(--ysh-brand, #eda934);
  color: var(--ysh-heading, #111827);
  background: rgba(237, 162, 52, 0.06);
}

.ysh-yoo-gallery-box .yoo-post-image-placeholder .dashicons,
.ysh-yoo-gallery-box .ysh-yoo-gallery-add-more .dashicons {
  font-size: 36px;
  width: 36px;
  height: 36px;
  color: var(--ysh-brand, #eda934);
}

.ysh-yoo-gallery-box .ysh-yoo-gallery-add-more .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.ysh-yoo-gallery-box .yoo-post-image-placeholder .yoo-placeholder-text,
.ysh-yoo-gallery-box .ysh-yoo-gallery-add-more .yoo-placeholder-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ysh-yoo-gallery-box .ysh-gallery-hint {
  margin: -4px 0 0 !important;
  font-size: 11px;
  color: var(--ysh-text-muted, #6b7280);
  text-align: center;
}

#woocommerce-product-images.ysh-yoo-gallery-box #product_images_container ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

#woocommerce-product-images.ysh-yoo-gallery-box #product_images_container ul li.image {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
}

#woocommerce-product-images.ysh-yoo-gallery-box #product_images_container ul li.add,
#woocommerce-product-images.ysh-yoo-gallery-box #product_images_container ul li.wc-metabox-sortable-placeholder {
  display: none !important;
}

#woocommerce-product-images.ysh-yoo-gallery-box #product_images_container ul li.image:not(:has(img[src])) {
  display: none !important;
}

#woocommerce-product-images.ysh-yoo-gallery-box #product_images_container ul li.image img {
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.ysh-yoo-featured-box :is(.elementor-ai-slot, [data-elementor-ai], a[href*="elementor-ai"]),
.ysh-yoo-gallery-box :is(.elementor-ai-slot, [data-elementor-ai], a[href*="elementor-ai"]) {
  display: none !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs a {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ysh-text-muted, #9aa3b2);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs-panel,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .wp-tab-panel,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .tabs-panel,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-saas :is(.categorydiv, .tagsdiv, .taxonomydiv) .wp-tab-panel {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-yoo-featured-box .yoo-post-image-placeholder,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-yoo-featured-box .yoo-post-image-placeholder,
html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-yoo-gallery-box .yoo-post-image-placeholder,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-yoo-gallery-box .yoo-post-image-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ysh-text-muted, #9aa3b2);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .yoo-btn-ghost,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .yoo-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ysh-heading, #d8d3ce);
}

html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish #major-publishing-actions,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] .ysh-sidebar-metabox--publish #major-publishing-actions {
  background: rgba(255, 255, 255, 0.03);
  border-top-color: rgba(255, 255, 255, 0.08);
}
