/**
 * Studio Hub — native themes.php / theme-install.php (layout + dark cascade tail).
 * Restores WP theme overlay (header nav + info panel) above YOOAdmin chrome.
 */

/* =============================================================================
 * Layout — keep core grid + footer clearance (beats yp-admin-core tail rules)
 * ============================================================================= */

body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  #wpbody-content
  > .wrap {
  overflow: visible !important;
}

body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  #wpbody-content
  > .wrap:last-child {
  margin-bottom: 56px !important;
}

body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  #wpbody-content {
  padding-bottom: 72px !important;
}

body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php) .broken-themes {
  margin-bottom: 32px !important;
  padding-bottom: 16px !important;
}

/* Search row — native WP uses full-width flex; keep label readable */
body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php) .search-form.search-themes {
  display: inline-flex !important;
  width: 100% !important;
  margin: 0 0 16px !important;
  min-height: 36px;
}

body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php) .search-form .search-box label {
  color: var(--ysh-text, #50575e);
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .search-form
  .search-box
  label,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .search-form
  .search-box
  label {
  color: var(--ysh-text, #cfd6e0) !important;
}

/* =============================================================================
 * Theme details overlay — above YOOAdmin header (z-index 100000) + below header offset
 * ============================================================================= */

body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open .theme-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 110000 !important;
}

body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open .theme-overlay .theme-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 110000 !important;
}

body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open .theme-overlay .theme-wrap,
body.yoo-focus.yooadmin-network-admin-shell.yooadmin-theme-yooadmin-studio-hub.themes-php.modal-open
  .theme-overlay
  .theme-wrap {
  z-index: 110001 !important;
  top: calc(var(--yp-header-h, 64px) + var(--yp-bc-h, 48px) + 12px) !important;
  bottom: max(72px, calc(40px + env(safe-area-inset-bottom, 0px))) !important;
  left: 50% !important;
  right: auto !important;
  width: min(calc(100vw - 32px), var(--ysh-layout-max, 1400px)) !important;
  max-width: var(--ysh-layout-max, 1400px) !important;
  max-height: none !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
  box-sizing: border-box !important;
}

/*
 * Focus + network shell hide the WP admin menu — core themes.css still offsets the overlay
 * from left:190px / right:30px (or width:1450px @1680px), which reads as a zoomed full-bleed panel.
 */
@media only screen and (min-width: 783px) {
  body.yoo-focus.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open .theme-overlay .theme-wrap,
  body.yooadmin-network-admin-shell.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
    .theme-overlay
    .theme-wrap {
    left: 50% !important;
    right: auto !important;
    width: min(calc(100vw - 32px), var(--ysh-layout-max, 1400px)) !important;
    max-width: var(--ysh-layout-max, 1400px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: translateX(-50%) !important;
  }
}

@media only screen and (max-width: 960px) {
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open .theme-overlay .theme-wrap,
  body.yooadmin-network-admin-shell.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
    .theme-overlay
    .theme-wrap {
    left: 50% !important;
    right: auto !important;
    width: min(calc(100vw - 24px), var(--ysh-layout-max, 1400px)) !important;
    transform: translateX(-50%) !important;
  }
}

@media only screen and (max-width: 782px) {
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open .theme-overlay .theme-wrap,
  body.yooadmin-network-admin-shell.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
    .theme-overlay
    .theme-wrap {
    top: calc(var(--yp-header-h, 64px) + var(--yp-bc-h, 48px) + 8px) !important;
    bottom: max(56px, calc(32px + env(safe-area-inset-bottom, 0px))) !important;
    left: 50% !important;
    right: auto !important;
    width: min(calc(100vw - 24px), var(--ysh-layout-max, 1400px)) !important;
    max-width: var(--ysh-layout-max, 1400px) !important;
    padding-top: 0 !important;
    transform: translateX(-50%) !important;
  }
}

/* =============================================================================
 * Dark mode — theme cards (grid) + overlay panel (header / info / actions)
 * ============================================================================= */

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme {
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .theme-name,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .theme-name {
  background: var(--ysh-tile-bg, #343b44) !important;
  color: var(--ysh-heading, #e8ecf1) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme.active
  .theme-name,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme.active
  .theme-name {
  background: color-mix(in srgb, var(--ysh-brand, #eda934) 18%, var(--ysh-card, #1a1d23)) !important;
  color: var(--ysh-heading, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .theme-actions,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .theme-actions {
  background: rgba(26, 29, 35, 0.92) !important;
  border-left-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .theme-actions
  .button,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .theme-actions
  .button {
  background: var(--ysh-tile-bg, #343b44) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .theme-actions
  .button-primary,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .theme-actions
  .button-primary {
  background: var(--ysh-brand, #eda934) !important;
  border-color: color-mix(in srgb, var(--ysh-brand, #eda934) 85%, #000) !important;
  color: #1a1206 !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .more-details,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme
  .more-details {
  background: rgba(26, 29, 35, 0.92) !important;
  color: var(--ysh-heading, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.wp-filter-search, input[type="search"]),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.wp-filter-search, input[type="search"]) {
  background: var(--ysh-tile-bg, #343b44) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

/* Overlay panel */
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-backdrop,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-backdrop {
  background: rgba(12, 14, 18, 0.82) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-wrap,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-wrap {
  background: var(--ysh-card, #1a1d23) !important;
  color: var(--ysh-text, #cfd6e0) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-header,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-header {
  background: var(--ysh-tile-bg, #343b44) !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-header
  :is(.left, .right, .close),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-header
  :is(.left, .right, .close) {
  color: var(--ysh-muted, #9aa5b1) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: transparent !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-header
  :is(.left, .right, .close):hover,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-header
  :is(.left, .right, .close):focus,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-header
  :is(.left, .right, .close):hover,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-header
  :is(.left, .right, .close):focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--ysh-heading, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  :is(.theme-name, .theme-version, .theme-author, .theme-description, .theme-tags, .parent-theme, .current-label),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  :is(.theme-name, .theme-version, .theme-author, .theme-description, .theme-tags, .parent-theme, .current-label) {
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-actions,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-actions {
  background: var(--ysh-tile-bg, #343b44) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-actions
  .button,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-actions
  .button {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-actions
  .button-primary,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  .theme-actions
  .button-primary {
  background: var(--ysh-brand, #eda934) !important;
  border-color: color-mix(in srgb, var(--ysh-brand, #eda934) 85%, #000) !important;
  color: #1a1206 !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php).modal-open
  .theme-overlay
  a {
  color: var(--ysh-brand, #eda934) !important;
}

/* Broken themes */
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .broken-themes
  :is(h2, h3, p),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .broken-themes
  :is(h2, h3, p) {
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .broken-themes
  table
  :is(th, td),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .broken-themes
  table
  :is(th, td) {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

/* =============================================================================
 * theme-install.php — browse chrome (wp-filter, headings, drawer)
 * ============================================================================= */

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  #wpbody-content
  > .wrap
  :is(h1, .wp-heading-inline),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  #wpbody-content
  > .wrap
  :is(h1, .wp-heading-inline) {
  color: var(--ysh-heading, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .page-title-action,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .page-title-action {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .page-title-action:hover,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .page-title-action:focus,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .page-title-action:hover,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .page-title-action:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: var(--ysh-heading, #fff) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .wp-filter,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .wp-filter {
  background: var(--ysh-card, #1a1d23) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

/*
 * Native WordPress theme-install surfaces.
 * Core prints several light panels inside/around .wp-filter after the main filter bar
 * (Favorites, upload help, no-results, count bubbles). Keep this generic to the WP
 * theme screens rather than adding per-tab fixes.
 */
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(
    .wp-filter,
    .filter-drawer,
    .favorites-form,
    .favorites-username,
    .favorite-themes,
    .upload-theme,
    .upload-theme .wp-upload-form,
    .theme-browser,
    .theme-browser .themes,
    .theme-browser .theme,
    .theme-browser .theme .theme-screenshot.blank
  ),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(
    .wp-filter,
    .filter-drawer,
    .favorites-form,
    .favorites-username,
    .favorite-themes,
    .upload-theme,
    .upload-theme .wp-upload-form,
    .theme-browser,
    .theme-browser .themes,
    .theme-browser .theme,
    .theme-browser .theme .theme-screenshot.blank
  ) {
  background: var(--ysh-card, #1a1d23) !important;
  background-color: var(--ysh-card, #1a1d23) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--ysh-text, #cfd6e0) !important;
  box-shadow: none !important;
  color-scheme: dark;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.favorites-form, .upload-theme .wp-upload-form, .filter-drawer),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.favorites-form, .upload-theme .wp-upload-form, .filter-drawer) {
  background: var(--ysh-card-raised, #22262e) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.favorites-form, .upload-theme, .filter-drawer, .theme-browser, .broken-themes)
  :where(h1, h2, h3, h4, p, label, legend, span:not(.dashicons), small, strong, em, code),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.favorites-form, .upload-theme, .filter-drawer, .theme-browser, .broken-themes)
  :where(h1, h2, h3, h4, p, label, legend, span:not(.dashicons), small, strong, em, code) {
  color: var(--ysh-text, #cfd6e0) !important;
  -webkit-text-fill-color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.install-help, p.no-themes, p.no-themes-local, .no-themes, .no-themes-local),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.install-help, p.no-themes, p.no-themes-local, .no-themes, .no-themes-local) {
  background: transparent !important;
  color: var(--ysh-muted, #9aa5b1) !important;
  -webkit-text-fill-color: var(--ysh-muted, #9aa5b1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(input[type="text"], input[type="search"], input[type="url"], input[type="email"], select, textarea),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(input[type="text"], input[type="search"], input[type="url"], input[type="email"], select, textarea) {
  background: var(--ysh-input-bg, #11141a) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #e8ecf1) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(input[type="text"], input[type="search"], input[type="url"], input[type="email"], select, textarea):focus,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(input[type="text"], input[type="search"], input[type="url"], input[type="email"], select, textarea):focus {
  border-color: var(--ysh-brand, #eda934) !important;
  box-shadow: 0 0 0 1px var(--ysh-brand, #eda934) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.button, .button-secondary, .favorites-form .button),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.button, .button-secondary, .favorites-form .button) {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.button-primary, input.button-primary, button.button-primary),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  :is(.button-primary, input.button-primary, button.button-primary) {
  background: var(--ysh-brand, #eda934) !important;
  border-color: color-mix(in srgb, var(--ysh-brand, #eda934) 85%, #000) !important;
  color: #1a1206 !important;
  -webkit-text-fill-color: #1a1206 !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .wp-filter
  :is(.filter-count, .filter-count .count),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .wp-filter
  :is(.filter-count, .filter-count .count) {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--ysh-heading, #e8ecf1) !important;
  -webkit-text-fill-color: var(--ysh-heading, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme:hover
  .theme-screenshot,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme.focus
  .theme-screenshot,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme:hover
  .theme-screenshot,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub:is(.themes-php, .theme-install-php)
  .theme-browser
  .theme.focus
  .theme-screenshot {
  background: var(--ysh-card, #1a1d23) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .wp-filter
  .filter-links
  li
  > a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .wp-filter
  .filter-links
  li
  > a {
  color: var(--ysh-muted, #9aa5b1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .wp-filter
  .filter-links
  li
  > a.current,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .wp-filter
  .filter-links
  li
  > a.current {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--ysh-heading, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .wp-filter
  .drawer-toggle,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .wp-filter
  .drawer-toggle {
  background: var(--ysh-tile-bg, #343b44) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer {
  background: var(--ysh-card-raised, #22262e) !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer
  :is(label, legend, h2, h3, p),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer
  :is(label, legend, h2, h3, p) {
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer
  input[type="checkbox"],
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer
  input[type="checkbox"] {
  accent-color: var(--ysh-brand, #eda934);
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer
  .buttons
  .button,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer
  .buttons
  .button {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer
  .buttons
  .button-primary,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .filter-drawer
  .buttons
  .button-primary {
  background: var(--ysh-brand, #eda934) !important;
  border-color: color-mix(in srgb, var(--ysh-brand, #eda934) 85%, #000) !important;
  color: #1a1206 !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  :is(.wp-filter-search, input[type="search"]),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  :is(.wp-filter-search, input[type="search"]) {
  background: var(--ysh-tile-bg, #343b44) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-browser
  .theme
  .more-details,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-browser
  .theme
  .more-details {
  background: rgba(26, 29, 35, 0.92) !important;
  color: var(--ysh-heading, #e8ecf1) !important;
}

/* =============================================================================
 * theme-install.php — Live Preview full overlay (wp-full-overlay / theme-install-overlay)
 * Uses theme-installer-active + full-overlay-active, NOT body.modal-open.
 * ============================================================================= */

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  :is(.wp-full-overlay-sidebar, .wp-full-overlay-main, .wp-full-overlay-header, .wp-full-overlay-footer),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  :is(.wp-full-overlay-sidebar, .wp-full-overlay-main, .wp-full-overlay-header, .wp-full-overlay-footer) {
  background: var(--ysh-card, #1a1d23) !important;
  background-color: var(--ysh-card, #1a1d23) !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.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-sidebar,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-sidebar {
  background: var(--ysh-tile-bg, #343b44) !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  :is(.close-full-overlay, .previous-theme, .next-theme),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  :is(.close-full-overlay, .previous-theme, .next-theme) {
  background: var(--ysh-tile-bg, #343b44) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--ysh-muted, #9aa5b1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  :is(.close-full-overlay, .previous-theme, .next-theme):is(:hover, :focus),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  :is(.close-full-overlay, .previous-theme, .next-theme):is(:hover, :focus) {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--ysh-heading, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices {
  background: var(--ysh-card, #1a1d23) !important;
  box-shadow: -20px 0 10px -5px var(--ysh-card, #1a1d23) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices
  button,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices
  button {
  background: transparent !important;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  color: var(--ysh-muted, #9aa5b1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices
  button:before,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices
  button:before {
  color: var(--ysh-muted, #9aa5b1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices
  button:is(:hover, :focus, .active),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices
  button:is(:hover, :focus, .active) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-bottom-color: var(--ysh-brand, #eda934) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices
  button.active:before,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-footer
  .devices
  button.active:before {
  color: var(--ysh-heading, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-core-ui
  .collapse-sidebar,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-core-ui
  .collapse-sidebar {
  color: var(--ysh-muted, #9aa5b1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .install-theme-info
  :is(.theme-name, .theme-version, h3, p),
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .install-theme-info
  :is(.theme-name, .theme-version, h3, p) {
  color: var(--ysh-text, #cfd6e0) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .theme-details
  .theme-description,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .theme-details
  .theme-description {
  color: var(--ysh-muted, #9aa5b1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .install-theme-info
  .theme-screenshot,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .install-theme-info
  .theme-screenshot {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-header
  .button,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-header
  .button {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--ysh-text, #e8ecf1) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-header
  .button-primary,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-header
  .button-primary,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .install-theme-info
  .theme-install,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .install-theme-info
  .theme-install {
  background: var(--ysh-brand, #eda934) !important;
  border-color: color-mix(in srgb, var(--ysh-brand, #eda934) 85%, #000) !important;
  color: #1a1206 !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay,
html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  a,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  a {
  color: var(--ysh-brand, #eda934) !important;
}

html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-main:before,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"]
  body.yooadmin-theme-yooadmin-studio-hub.theme-install-php
  .theme-install-overlay
  .wp-full-overlay-main:before {
  background: var(--ysh-card, #1a1d23) !important;
  color: var(--ysh-muted, #9aa5b1) !important;
}
