/**
 * Native WordPress admin bar on the public site (Focus off or custom frontend bar disabled).
 * Resets theme button/link chrome that bleeds into #wpadminbar — dashboard header is unaffected.
 *
 * @package YOOAdmin
 */

/* Theme globals (e.g. Hestia button { border: 1px solid }) must not style toolbar controls. */
#wpadminbar :is(button, input[type='button'], input[type='submit'], .button) {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 0 !important;
  padding: 0 !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-transform: none !important;
}

#wpadminbar #wp-admin-bar-yooadmin-notifications .yp-notification-toggle {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Default WP admin bar items — flat like core; no pill frames from theme/YOOAdmin bleed. */
#wpadminbar .ab-top-menu > li > :is(.ab-item, .ab-empty-item),
#wpadminbar .ab-top-secondary > li > :is(.ab-item, .ab-empty-item) {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

#wpadminbar .ab-top-menu > li > :is(.ab-item, .ab-empty-item):focus:not(:focus-visible),
#wpadminbar .ab-top-secondary > li > :is(.ab-item, .ab-empty-item):focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

#wpadminbar #wp-admin-bar-my-account.with-avatar > :is(.ab-empty-item, a) img,
#wpadminbar #wp-admin-bar-my-account.with-avatar img.avatar {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Dark preference on frontend — token-based (WP Dark Mode style), preserve brand accent nodes. */
html[data-yooadmin-frontend-bar-mode-effective='dark'] #wpadminbar,
html[data-yooadmin-studio-color-mode-effective='dark'] body:not(.wp-admin) #wpadminbar {
  background: #1a1d23 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-yooadmin-frontend-bar-mode-effective='dark'] #wpadminbar :is(.ab-item, .ab-empty-item, .ab-label),
html[data-yooadmin-studio-color-mode-effective='dark'] body:not(.wp-admin) #wpadminbar :is(.ab-item, .ab-empty-item, .ab-label) {
  color: #e8edf4 !important;
}

html[data-yooadmin-frontend-bar-mode-effective='dark'] #wpadminbar:not(.mobile) .ab-top-menu > li:hover > .ab-item,
html[data-yooadmin-studio-color-mode-effective='dark'] body:not(.wp-admin) #wpadminbar:not(.mobile) .ab-top-menu > li:hover > .ab-item,
html[data-yooadmin-frontend-bar-mode-effective='dark'] #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item,
html[data-yooadmin-studio-color-mode-effective='dark'] body:not(.wp-admin) #wpadminbar .ab-top-menu > li.menupop.hover > .ab-item {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

html[data-yooadmin-frontend-bar-mode-effective='dark'] #wpadminbar .ab-icon::before,
html[data-yooadmin-frontend-bar-mode-effective='dark'] #wpadminbar .ab-item::before,
html[data-yooadmin-studio-color-mode-effective='dark'] body:not(.wp-admin) #wpadminbar .ab-icon::before,
html[data-yooadmin-studio-color-mode-effective='dark'] body:not(.wp-admin) #wpadminbar .ab-item::before {
  color: #c5cdd8 !important;
}
