/**
 * Studio Hub — adaptive block editor dark (studio-hub-block-editor-adaptive.js).
 * Typography + surfaces via data-ysh-adapt-* (same engine as plugin admin).
 */

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active {
  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(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  :is(.ysh-adapt-light-bg, .ysh-adapt-light-nested) {
  background: var(--ysh-card, #1a1d23) !important;
  background-color: var(--ysh-card, #1a1d23) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  .ysh-adapt-light-nested {
  background: rgba(255, 255, 255, 0.04) !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  [data-ysh-adapt-text='heading'] {
  color: var(--ysh-heading, #eef1f5) !important;
  -webkit-text-fill-color: var(--ysh-heading, #eef1f5) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  [data-ysh-adapt-text='body'] {
  color: var(--ysh-text, #cfd6e0) !important;
  -webkit-text-fill-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)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  [data-ysh-adapt-text='muted'] {
  color: var(--ysh-muted, #9aa5b1) !important;
  -webkit-text-fill-color: var(--ysh-muted, #9aa5b1) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  [data-ysh-adapt-text='link'] {
  color: var(--yooadmin-primary, var(--ysh-brand, #eda934)) !important;
  -webkit-text-fill-color: var(--yooadmin-primary, var(--ysh-brand, #eda934)) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  [data-ysh-adapt-text='on-dark'] {
  color: var(--ysh-text, #cfd6e0) !important;
  -webkit-text-fill-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)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  [data-ysh-adapt-text='on-light'] {
  color: #1d2327 !important;
  -webkit-text-fill-color: #1d2327 !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  [data-ysh-adapt-input='field'],
html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  .ysh-adapt-light-bg
  :is(input, textarea, .components-text-control__input, .components-search-control__input) {
  background: var(--ysh-surface, #121418) !important;
  background-color: var(--ysh-surface, #121418) !important;
  color: var(--ysh-text, #cfd6e0) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  .ysh-adapt-light-bg
  :is(button, a, [class*='filter-category'], [class*='menu-item'], [class*='list-item']) {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  :is(.ysh-adapt-light-bg, .ysh-adapt-light-nested)
  [data-ysh-adapt-text='heading'] {
  color: var(--ysh-heading, #eef1f5) !important;
  -webkit-text-fill-color: var(--ysh-heading, #eef1f5) !important;
}

html:is([data-yooadmin-studio-color-mode-effective='dark'], .is-dark-theme)
  body:is(.block-editor-page, .site-editor-php)
  :is(#editor, .edit-site, .components-modal__screen, .react-responsive-modal-root).ysh-be-adaptive-active
  :is(.ysh-adapt-light-bg, .ysh-adapt-light-nested)
  :is([data-ysh-adapt-text='body'], [data-ysh-adapt-text='muted'], [data-ysh-adapt-text='on-dark']) {
  color: var(--ysh-text, #cfd6e0) !important;
  -webkit-text-fill-color: var(--ysh-text, #cfd6e0) !important;
}
