/**
 * Studio Hub — Customizer dark controls
 *
 * Scope is intentionally limited to customize.php controls. The preview iframe
 * keeps the active theme output unchanged.
 *
 * @package YOOAdmin_Studio_Hub
 */

/* Light mode — YOOAdmin chrome (standalone customize.php) */
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-controls,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer .wp-full-overlay-sidebar-content {
  background: #f6f7f8 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-header-actions,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-footer-actions {
  background: #f0f0f1 !important;
  border-color: #dcdcde !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-theme-controls,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-theme-controls > ul {
  background: #f6f7f8 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer .button-primary,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #save {
  background: var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
  border-color: var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
}

html.yooadmin-studio-hub-html body.wp-customizer {
  --wp-admin-theme-color: var(--ysh-brand, var(--yoo-brand-accent, #eda934)) !important;
  --wp-admin-theme-color-darker-10: color-mix(in srgb, var(--ysh-brand, var(--yoo-brand-accent, #eda934)) 86%, #000 14%) !important;
  --wp-admin-theme-color-darker-20: color-mix(in srgb, var(--ysh-brand, var(--yoo-brand-accent, #eda934)) 72%, #000 28%) !important;
  --yoo-brand-accent: var(--ysh-brand, var(--yoo-brand-accent, #eda934));
  --ysh-customizer-brand: var(--ysh-brand, var(--yoo-brand-accent, #eda934));
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-info,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-info .customize-info {
  background: #fff !important;
  border-color: #e5e5e5 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-theme-controls .accordion-section-title,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-info .accordion-section-title {
  background: #fff !important;
  border-color: #e5e5e5 !important;
  color: #3c434a !important;
  border-bottom: 1px solid #e5e5e5 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-theme-controls .accordion-section-title:hover,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-theme-controls .accordion-section-title:focus {
  color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  background: #fff !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-theme-controls .accordion-section-title:after {
  color: #9aa4b2 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-controls :where(
  a:not(.button):not(.button-primary),
  .button-link,
  .button.button-link
) {
  color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-controls :where(
  .button-secondary,
  .change-theme,
  button.switch-to-editor
) {
  color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  border-color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-controls :where(
  .button-secondary:hover,
  .button-secondary:focus,
  .change-theme:hover,
  .change-theme:focus,
  button.switch-to-editor:hover,
  button.switch-to-editor:focus
) {
  color: #fff !important;
  background: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  border-color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-notifications-area .notice {
  background: #fff !important;
  border-inline-start: 4px solid var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  border-top-color: #e5e5e5 !important;
  border-bottom-color: #e5e5e5 !important;
  border-right-color: #e5e5e5 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer #customize-notifications-area .notice a {
  color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
}

/* Light mode — drill-down section header (هوية الموقع, etc.) */
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer .customize-section-title,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer .customize-section-title h3,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer h3.customize-section-title {
  background: #fff !important;
  border-bottom: 1px solid #e5e5e5 !important;
  color: #3c434a !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer .customize-section-title span.customize-action {
  color: #646970 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer .customize-panel-back,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer .customize-section-back {
  background: #fff !important;
  border-top: none !important;
  border-bottom: none !important;
  border-inline-end: 1px solid #e5e5e5 !important;
  border-inline-start: 4px solid #fff !important;
  color: #50575e !important;
}

/* Beat wp-admin colors.css blue accent (accordion + back buttons) */
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui #customize-controls .control-section:hover > .accordion-section-title,
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui #customize-controls .control-section .accordion-section-title:hover,
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui #customize-controls .control-section.open .accordion-section-title,
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui #customize-controls .control-section .accordion-section-title:focus,
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui .customize-panel-back:hover,
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui .customize-panel-back:focus,
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui .customize-section-back:hover,
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui .customize-section-back:focus {
  color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  border-inline-start-color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
}

html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui .customize-panel-back:before,
html.yooadmin-studio-hub-html body.wp-customizer.wp-core-ui .customize-section-back:before {
  color: inherit !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer.wp-core-ui .customize-panel-back:hover,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer.wp-core-ui .customize-panel-back:focus,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer.wp-core-ui .customize-section-back:hover,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer.wp-core-ui .customize-section-back:focus {
  background: #f6f7f8 !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #wpwrap,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #wpcontent,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #wpbody,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #wpbody-content,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-sidebar,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls,
body.wp-customizer.ysh-customizer-dark,
body.wp-customizer.ysh-customizer-dark #wpwrap,
body.wp-customizer.ysh-customizer-dark #wpcontent,
body.wp-customizer.ysh-customizer-dark #wpbody,
body.wp-customizer.ysh-customizer-dark #wpbody-content,
body.wp-customizer.ysh-customizer-dark .wp-full-overlay-sidebar,
body.wp-customizer.ysh-customizer-dark #customize-controls {
  background: var(--ysh-surface, #121418) !important;
  color: #d7dde7 !important;
  color-scheme: dark;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer,
body.wp-customizer.ysh-customizer-dark {
  --ysh-customizer-bg: var(--ysh-surface, #121418);
  --ysh-customizer-card: var(--ysh-card, #1a1d23);
  --ysh-customizer-card-2: #20242d;
  --ysh-customizer-border: rgba(255, 255, 255, 0.075);
  --ysh-customizer-text: #d7dde7;
  --ysh-customizer-muted: #9aa4b2;
  --ysh-customizer-heading: #f3f6fb;
  --ysh-customizer-brand: var(--yoo-brand-accent, var(--ysh-brand, #eda934));
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-header-actions,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-header-actions.wp-full-overlay-header,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-sidebar .wp-full-overlay-header,
body.wp-customizer.ysh-customizer-dark #customize-header-actions,
body.wp-customizer.ysh-customizer-dark #customize-header-actions.wp-full-overlay-header,
body.wp-customizer.ysh-customizer-dark .wp-full-overlay-sidebar .wp-full-overlay-header,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-info,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-theme-controls,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-footer-actions,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer,
body.wp-customizer.ysh-customizer-dark #customize-info,
body.wp-customizer.ysh-customizer-dark #customize-theme-controls,
body.wp-customizer.ysh-customizer-dark #customize-footer-actions,
body.wp-customizer.ysh-customizer-dark .wp-full-overlay-footer {
  background: var(--ysh-customizer-card) !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-text) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-controls-close,
body.wp-customizer.ysh-customizer-dark .customize-controls-close {
  background: var(--ysh-customizer-card) !important;
  border-top-color: var(--ysh-customizer-card) !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-text) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-controls-close:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-controls-close:focus,
body.wp-customizer.ysh-customizer-dark .customize-controls-close:hover,
body.wp-customizer.ysh-customizer-dark .customize-controls-close:focus {
  background: var(--ysh-customizer-card-2) !important;
  color: var(--ysh-customizer-heading) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-controls-close:before,
body.wp-customizer.ysh-customizer-dark .customize-controls-close:before {
  color: inherit !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-info .accordion-section-title,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-theme-controls .accordion-section-title,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-theme-controls .control-section .accordion-section-title,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-section-title,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-panel-back,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-section-back {
  background: var(--ysh-customizer-card) !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-heading) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-theme-controls .accordion-section-title:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-theme-controls .accordion-section-title:focus,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-panel-back:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-section-back:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-panel-back:focus,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-section-back:focus {
  background: var(--ysh-customizer-card-2) !important;
  border-color: color-mix(in srgb, var(--ysh-customizer-brand) 32%, var(--ysh-customizer-border)) !important;
  color: var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control-title,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control label,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control p,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control li,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control span:not(.dashicons),
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-section-description,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .description {
  color: var(--ysh-customizer-text) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control-description,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control .description,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-section-description,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .theme-location-set {
  color: var(--ysh-customizer-muted) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer a:not(.button):not(.components-button),
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .dashicons {
  color: var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer input[type='text'],
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer input[type='search'],
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer input[type='url'],
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer input[type='email'],
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer input[type='number'],
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer input[type='password'],
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer textarea,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer select,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .select2-container .select2-selection {
  background: #11141a !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-text) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer input:focus,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer textarea:focus,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer select:focus {
  border-color: var(--ysh-customizer-brand) !important;
  box-shadow: 0 0 0 1px var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .button:not(.button-primary):not(.ysh-customizer-mode-toggle):not(.collapse-sidebar):not(.preview-desktop):not(.preview-tablet):not(.preview-mobile),
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .button-secondary,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button {
  background: var(--ysh-customizer-card-2) !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-text) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .button:not(.button-primary):not(.ysh-customizer-mode-toggle):not(.collapse-sidebar):not(.preview-desktop):not(.preview-tablet):not(.preview-mobile):hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .button-secondary:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button.active {
  border-color: var(--ysh-customizer-brand) !important;
  color: var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .button-primary,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #save {
  background: var(--ysh-customizer-brand) !important;
  border-color: var(--ysh-customizer-brand) !important;
  color: #fff !important;
  text-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .notice,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .notification-message,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .customize-control-notifications-container {
  background: var(--ysh-customizer-card-2) !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-text) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-main {
  background: #0b0d11 !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-main iframe {
  background: #fff;
}

/*
 * Customizer internals paint many direct children white after the wrapper.
 * Keep this sweep inside #customize-controls so the live site iframe is never touched.
 */
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  #customize-sidebar-outer-content,
  #customize-outer-theme-controls,
  #widgets-right,
  .wp-full-overlay-sidebar-content,
  .customize-pane-parent,
  .customize-pane-child,
  .accordion-container,
  .accordion-section,
  .control-section,
  .control-panel,
  .customize-info,
  .customize-panel-description,
  .customize-section-description,
  .customize-control,
  .customize-control-content,
  .customize-inside-control-row,
  .customize-themes-section,
  .customize-themes-full-container,
  .customize-themes-section-title,
  .theme,
  .theme-overlay,
  .theme-header,
  .theme-about,
  .menu-item-bar,
  .menu-item-handle,
  .menu-settings,
  .widget,
  .widget-top,
  .widget-inside,
  .available-widget
):not(.button):not(.button-primary):not(.button-secondary):not(input):not(textarea):not(select):not(iframe) {
  background-color: var(--ysh-customizer-card) !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-text) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .customize-pane-parent,
  .customize-pane-child,
  .wp-full-overlay-sidebar-content,
  #customize-theme-controls,
  #sub-accordion-panel-themes,
  #sub-accordion-section-themes
) {
  background: var(--ysh-customizer-bg) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .accordion-section-title,
  .control-section .accordion-section-title,
  .customize-section-title,
  .customize-panel-back,
  .customize-section-back,
  .customize-control-title,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .preview-notice,
  .panel-title,
  .theme-name,
  .theme-title,
  .widget-title,
  .menu-item-title
) {
  color: var(--ysh-customizer-heading) !important;
  -webkit-text-fill-color: var(--ysh-customizer-heading) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  p,
  li,
  label,
  span:not(.dashicons),
  small,
  code,
  .description,
  .customize-control-description,
  .theme-description,
  .accordion-section-content
):not(.screen-reader-text):not(.button):not(.button-primary):not(.button-secondary) {
  color: var(--ysh-customizer-text) !important;
  -webkit-text-fill-color: var(--ysh-customizer-text) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .accordion-section-title:after,
  .customize-panel-back:before,
  .customize-section-back:before,
  .customize-help-toggle:before,
  .toggle-indicator:before
) {
  color: var(--ysh-customizer-muted) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .accordion-section-title:hover,
  .accordion-section-title:focus,
  .accordion-section.open .accordion-section-title,
  .control-section.open .accordion-section-title,
  .customize-panel-back:hover,
  .customize-section-back:hover
) {
  background: var(--ysh-customizer-card-2) !important;
  color: var(--ysh-customizer-brand) !important;
  -webkit-text-fill-color: var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-theme-controls,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-theme-controls > ul,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-outer-theme-controls,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-outer-theme-controls > ul {
  background: var(--ysh-customizer-card) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .accordion-section,
  .control-section,
  .accordion-section-title,
  .control-section .accordion-section-title
) {
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-main {
  background: #0b0d11 !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-sidebar {
  border-right-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-footer-actions,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices-wrapper {
  background: var(--ysh-customizer-card) !important;
  border-color: var(--ysh-customizer-border) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-footer-actions {
  border-top: 1px solid var(--ysh-customizer-border) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button {
  background: transparent !important;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  color: var(--ysh-customizer-muted) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button.active {
  border-bottom-color: var(--ysh-customizer-brand) !important;
  color: var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button:focus {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button:before,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button.active:before {
  color: currentColor !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar,
body.wp-customizer.ysh-customizer-dark .collapse-sidebar {
  background: var(--ysh-customizer-flat, var(--ysh-customizer-card, #1a1d23)) !important;
  background-color: var(--ysh-customizer-flat, var(--ysh-customizer-card, #1a1d23)) !important;
  border: 0 !important;
  color: var(--ysh-customizer-muted) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar-label {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar:focus {
  color: var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar-arrow {
  background: #2a303a !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar-arrow:before {
  color: var(--ysh-customizer-text) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer :where(
  #customize-header-actions,
  #customize-info,
  #customize-theme-controls,
  .accordion-section-title,
  .customize-section-title,
  .customize-panel-back,
  .customize-section-back
) {
  border-color: var(--ysh-customizer-border) !important;
  box-shadow: none !important;
}

body.wp-customizer #customize-save-button-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  vertical-align: middle !important;
}

body.wp-customizer .ysh-customizer-mode-toggle {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12) !important;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) 88%, #fff 12%),
    var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934))
  ) !important;
  border: 1px solid color-mix(in srgb, var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) 72%, #fff 28%) !important;
  color: #fff !important;
}

body.wp-customizer #customize-header-actions .button.ysh-customizer-mode-toggle,
body.wp-customizer #customize-save-button-wrapper .button.ysh-customizer-mode-toggle {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) 88%, #fff 12%),
    var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934))
  ) !important;
  border: 1px solid color-mix(in srgb, var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) 72%, #fff 28%) !important;
  color: #fff !important;
}

body.wp-customizer .ysh-customizer-mode-toggle:hover,
body.wp-customizer .ysh-customizer-mode-toggle:focus {
  background: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  border: none !important;
  color: #fff !important;
  filter: brightness(1.04);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12) !important;
}

body.wp-customizer .ysh-customizer-mode-toggle__svg {
  display: block;
}

body.wp-customizer .ysh-customizer-mode-toggle.is-dark {
  background: #20242d !important;
  border: 1px solid color-mix(in srgb, var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) 42%, rgba(255, 255, 255, 0.14)) !important;
  color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  box-shadow: none !important;
  filter: none !important;
}

body.wp-customizer #customize-header-actions .button.ysh-customizer-mode-toggle.is-dark,
body.wp-customizer #customize-save-button-wrapper .button.ysh-customizer-mode-toggle.is-dark {
  background: #20242d !important;
  border: 1px solid color-mix(in srgb, var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) 42%, rgba(255, 255, 255, 0.14)) !important;
  color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
}

body.wp-customizer .ysh-customizer-mode-toggle.is-dark:hover,
body.wp-customizer .ysh-customizer-mode-toggle.is-dark:focus {
  background: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  border-color: var(--ysh-customizer-brand, var(--yoo-brand-accent, #eda934)) !important;
  color: #fff !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .accordion-section-title,
  .customize-panel-back,
  .customize-section-back,
  .customize-controls-preview-toggle,
  .collapse-sidebar,
  .wp-full-overlay-footer .devices button
) {
  outline: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .accordion-section-title:focus,
  .accordion-section-title:hover,
  .control-section.open > .accordion-section-title
) {
  border-left-color: transparent !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .customize-info,
  .customize-info .accordion-section-title,
  .panel-meta.customize-info .accordion-section-title,
  .customize-section-title,
  .control-section:last-of-type > .accordion-section-title,
  #accordion-section-themes + .control-section,
  #customize-theme-controls .control-panel-content:not(.control-panel-nav_menus) .control-section:nth-child(2),
  #customize-theme-controls .control-panel-nav_menus .control-section-nav_menu,
  #customize-theme-controls .control-section-nav_menu_locations .accordion-section-title
) {
  border-color: var(--ysh-customizer-border) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer :where(
  .control-panel-themes .customize-themes-full-container,
  .control-panel-themes .customize-themes-section,
  .control-panel-themes .theme-section,
  .control-panel-themes .themes,
  .customize-preview-header.themes-filter-bar,
  .themes-filter-bar,
  .themes-filter-bar .search-form,
  .filter-drawer
) {
  background: var(--ysh-customizer-bg) !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-text) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer :where(
  .control-panel-themes .customize-themes-section-title,
  .control-panel-themes .customize-themes-section-title:hover,
  .control-panel-themes .customize-themes-section-title:focus,
  .control-panel-themes .theme-section .customize-themes-section-title
) {
  background: var(--ysh-customizer-card) !important;
  border-color: var(--ysh-customizer-border) !important;
  color: var(--ysh-customizer-heading) !important;
  -webkit-text-fill-color: var(--ysh-customizer-heading) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .control-panel-themes .customize-themes-section-title:not(.selected):after {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .control-panel-themes .theme-section .customize-themes-section-title.selected {
  color: var(--ysh-customizer-brand) !important;
  -webkit-text-fill-color: var(--ysh-customizer-brand) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .control-panel-themes .theme-section .customize-themes-section-title.selected:after {
  background: var(--ysh-customizer-brand) !important;
  border-color: var(--ysh-customizer-brand) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}

/*
 * Final visual unification pass. The native Customizer uses several nested
 * backgrounds that differ by a few pixels; keep the controls pane visually flat.
 */
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer {
  --ysh-customizer-flat: #1a1d23;
  --ysh-customizer-flat-soft: #1d222a;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  #customize-theme-controls,
  #customize-theme-controls > ul,
  #customize-theme-controls .customize-pane-parent,
  #customize-theme-controls .customize-pane-child,
  #customize-theme-controls .accordion-section-content,
  #customize-outer-theme-controls,
  #customize-outer-theme-controls > ul,
  .customize-pane-parent,
  .customize-pane-child,
  .wp-full-overlay-sidebar-content,
  .accordion-container,
  .accordion-section,
  .control-section,
  .control-panel,
  .accordion-section-title,
  .control-section .accordion-section-title,
  .control-panel-content,
  .customize-section-title
) {
  background: var(--ysh-customizer-flat) !important;
  background-color: var(--ysh-customizer-flat) !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .accordion-section-title:hover,
  .accordion-section-title:focus,
  .accordion-section.open .accordion-section-title,
  .control-section.open .accordion-section-title,
  .control-section:hover > .accordion-section-title,
  .customize-panel-back:hover,
  .customize-section-back:hover
) {
  background: var(--ysh-customizer-flat-soft) !important;
  background-color: var(--ysh-customizer-flat-soft) !important;
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-controls :where(
  .accordion-section-title,
  .control-section .accordion-section-title
) {
  border-bottom: 1px solid var(--ysh-customizer-border) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-footer-actions,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-footer-actions *:not(.devices),
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer *:not(.devices) {
  box-shadow: none !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer #customize-footer-actions,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices-wrapper,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar-label,
body.wp-customizer.ysh-customizer-dark #customize-footer-actions,
body.wp-customizer.ysh-customizer-dark .wp-full-overlay-footer,
body.wp-customizer.ysh-customizer-dark .wp-full-overlay-footer .devices-wrapper,
body.wp-customizer.ysh-customizer-dark .wp-full-overlay-footer .devices,
body.wp-customizer.ysh-customizer-dark .collapse-sidebar,
body.wp-customizer.ysh-customizer-dark .collapse-sidebar-label {
  background: var(--ysh-customizer-flat) !important;
  background-color: var(--ysh-customizer-flat) !important;
}

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

html[dir='ltr'][data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices,
body.wp-customizer:not(.rtl).ysh-customizer-dark .wp-full-overlay-footer .devices {
  box-shadow: -20px 0 10px -5px var(--ysh-customizer-flat, #1a1d23) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .collapse-sidebar-label,
body.wp-customizer.ysh-customizer-dark .collapse-sidebar-label {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Collapse + device chrome — YOOAdmin brand (beats wp-admin colors-rtl blue) */
body.wp-customizer.wp-core-ui .wp-full-overlay .collapse-sidebar:hover,
body.wp-customizer.wp-core-ui .wp-full-overlay .collapse-sidebar:focus {
  color: var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
}

body.wp-customizer .wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-arrow,
body.wp-customizer .wp-full-overlay .collapse-sidebar:focus .collapse-sidebar-arrow {
  box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
  outline: 2px solid transparent !important;
}

body.wp-customizer .collapse-sidebar-arrow:before {
  background: transparent !important;
  background-color: transparent !important;
}

body.wp-customizer .collapse-sidebar-label {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

body.wp-customizer .wp-full-overlay-footer .devices button.active,
body.wp-customizer .wp-full-overlay-footer .devices button.active:before {
  border-bottom-color: var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
  color: var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
}

body.wp-customizer .wp-full-overlay-footer .devices button:hover,
body.wp-customizer .wp-full-overlay-footer .devices button:focus,
body.wp-customizer .wp-full-overlay-footer .devices button.active:hover {
  background-color: transparent !important;
  border-bottom-color: var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
  color: var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
}

body.wp-customizer .wp-full-overlay-footer .devices button:hover:before,
body.wp-customizer .wp-full-overlay-footer .devices button:focus:before,
body.wp-customizer .wp-full-overlay-footer .devices button.active:hover:before {
  color: var(--yoo-brand-accent, var(--ysh-brand, #eda934)) !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button.active,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button:hover,
html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button:focus {
  background: transparent !important;
  background-color: transparent !important;
}

html[data-yooadmin-studio-color-mode-effective='dark'] body.wp-customizer .wp-full-overlay-footer .devices button.active {
  border-bottom-color: var(--ysh-customizer-brand) !important;
}

/*
 * Full customizer shell — sidebar + preview chrome (not the front-end iframe document).
 * body.ysh-customizer-dark mirrors the toggle script for instant paint.
 */
body.wp-customizer.ysh-customizer-dark #wpwrap,
body.wp-customizer.ysh-customizer-dark #wpcontent,
body.wp-customizer.ysh-customizer-dark #wpbody,
body.wp-customizer.ysh-customizer-dark #wpbody-content,
body.wp-customizer.ysh-customizer-dark .wp-full-overlay {
  background: var(--ysh-surface, #121418) !important;
  color-scheme: dark;
}

body.wp-customizer.ysh-customizer-dark .wp-full-overlay-sidebar,
body.wp-customizer.ysh-customizer-dark .wp-full-overlay-main {
  background: var(--ysh-surface, #121418) !important;
}

body.wp-customizer.ysh-customizer-dark .wp-full-overlay-main {
  background: #0b0d11 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer:not(.ysh-customizer-dark) #wpwrap,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer:not(.ysh-customizer-dark) #wpcontent,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer:not(.ysh-customizer-dark) #wpbody,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer:not(.ysh-customizer-dark) #wpbody-content,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer:not(.ysh-customizer-dark) .wp-full-overlay,
html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer:not(.ysh-customizer-dark) .wp-full-overlay-main {
  background: #f0f0f1 !important;
}

html[data-yooadmin-studio-color-mode-effective='light'] body.wp-customizer:not(.ysh-customizer-dark) .wp-full-overlay-sidebar {
  background: #f6f7f8 !important;
}

/* Theme Manager embed — ensure preview pane stays visible beside controls */
body.yooadmin-tm-customizer-embed .wp-full-overlay.expanded .wp-full-overlay-main {
  display: block !important;
  visibility: visible !important;
}
