/**
 * Gutenberg block editor — shell tokens only (is-dark-theme + Studio color mode).
 * Third-party panels (GutenKit, modals): studio-hub-block-editor-adaptive.js + adaptive.css
 */

html[data-yooadmin-studio-color-mode-effective='light']:not(.is-dark-theme)
  body:is(.block-editor-page, .site-editor-php) {
  color-scheme: light !important;
  --wp-editor-canvas-background: #ddd;
  --wp-components-color-foreground: #1e1e1e;
  --wp-components-color-background: #fff;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php) {
  --wp-editor-canvas-background: #1a1d23;
  --wpds-color-bg-surface-neutral-strong: #1a1d23;
  --wpds-color-fg-content-neutral: #cfd6e0;
  --wpds-color-stroke-surface-neutral-weak: rgba(255, 255, 255, 0.08);
  --wp-components-color-foreground: #cfd6e0;
  --wp-components-color-background: #1a1d23;
  background: var(--ysh-surface, #121418);
  color: var(--ysh-text, #cfd6e0);
  color-scheme: dark;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#wpwrap, #wpcontent, #wpbody, #wpbody-content) {
  background: var(--ysh-surface, #121418) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(
    .interface-interface-skeleton,
    .interface-interface-skeleton__header,
    .interface-interface-skeleton__body,
    .interface-interface-skeleton__content,
    .interface-interface-skeleton__editor,
    .interface-interface-skeleton__footer,
    .interface-interface-skeleton__sidebar,
    .interface-interface-skeleton__secondary-sidebar,
    .editor-header,
    .edit-post-header
  ) {
  background: var(--ysh-card, #1a1d23) !important;
  background-color: var(--ysh-card, #1a1d23) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  iframe[name='editor-canvas'] {
  background: #1a1d23 !important;
  background-color: #1a1d23 !important;
}
