/* CyberCompany Signature desktop toolbar, sourced from CFO demo.
   The host links this stylesheet at its desktop breakpoint. */
html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] {
  --cc-desktop-control-size: 38px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid var(--cc-desktop-toolbar-rim);
  border-radius: 32px;
  background: var(--cc-desktop-toolbar-face);
  box-shadow: var(--cc-desktop-toolbar-shadow);
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(
  #cc-editor-launch, #cc-help-launch, #globalSearchBtn, #globalSearchButton,
  #languageToggle, #voiceModeTop, #voiceModeToggle, #themeToggle,
  #notificationsBtn, #notificationButton, #cc-rail-toggle, .studio-icon
) {
  place-items: center;
  flex: 0 0 var(--cc-desktop-control-size);
  width: var(--cc-desktop-control-size) !important;
  min-width: var(--cc-desktop-control-size) !important;
  max-width: var(--cc-desktop-control-size) !important;
  height: var(--cc-desktop-control-size) !important;
  min-height: var(--cc-desktop-control-size) !important;
  padding: 0 !important;
  margin: 0;
  border: 1px solid transparent !important;
  border-radius: 50% !important;
  color: var(--cc-desktop-toolbar-ink) !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background-color 160ms ease, color 160ms ease;
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(
  #cc-editor-launch, #cc-help-launch, #globalSearchBtn, #globalSearchButton,
  #languageToggle, #voiceModeTop, #voiceModeToggle, #themeToggle,
  #notificationsBtn, #notificationButton, #cc-rail-toggle, .studio-icon
):not(:disabled, [aria-disabled="true"])[aria-expanded="true"]:not(#cc-rail-toggle) {
  background: var(--cc-desktop-toolbar-hover) !important;
}

@media (hover: hover) and (pointer: fine) {
  html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(
    #cc-editor-launch, #cc-help-launch, #globalSearchBtn, #globalSearchButton,
    #languageToggle, #voiceModeTop, #voiceModeToggle, #themeToggle,
    #notificationsBtn, #notificationButton, #cc-rail-toggle, .studio-icon
  ):not(:disabled, [aria-disabled="true"]):hover {
    border-color: transparent !important;
    color: var(--cc-desktop-toolbar-accent, var(--cc-desktop-toolbar-ink)) !important;
    background: color-mix(in srgb, var(--cc-desktop-toolbar-accent, var(--cc-desktop-toolbar-ink)) 10%, transparent) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(
    #cc-editor-launch, #cc-help-launch, #globalSearchBtn, #globalSearchButton,
    #voiceModeTop, #voiceModeToggle, #themeToggle, #notificationsBtn,
    #notificationButton, #cc-rail-toggle
  ):not(:disabled, [aria-disabled="true"]):hover svg {
    stroke: var(--cc-desktop-toolbar-accent, var(--cc-desktop-toolbar-ink)) !important;
  }
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(
  #cc-editor-launch, #cc-help-launch, #globalSearchBtn, #globalSearchButton,
  #languageToggle, #voiceModeTop, #voiceModeToggle, #themeToggle,
  #notificationsBtn, #notificationButton, #cc-rail-toggle, .studio-icon
):focus-visible {
  outline: 2px solid var(--cc-desktop-toolbar-ink) !important;
  outline-offset: 1px;
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(#voiceModeTop, #voiceModeToggle) .voice-mode-icon {
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(
  #voiceModeTop, #voiceModeToggle, .studio-icon
):is(:disabled, [aria-disabled="true"]) {
  color: var(--cc-desktop-toolbar-muted) !important;
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(
  #cc-editor-launch, #cc-help-launch, #globalSearchBtn, #globalSearchButton,
  #voiceModeTop, #voiceModeToggle, #themeToggle, #notificationsBtn,
  #notificationButton, #cc-rail-toggle, .studio-icon
) svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke-width: 1.65;
  filter: none;
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] .language-picker {
  flex: 0 0 var(--cc-desktop-control-size);
  width: var(--cc-desktop-control-size) !important;
  min-width: 0 !important;
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] #languageToggle strong {
  min-width: 0;
  color: inherit !important;
  font: 650 11px/1 "Inter Variable", Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] #languageToggle > svg { display: none; }

html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(#profileButton, .cfo-profile-button) {
  transition: background-color 160ms ease;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html:root body :is(.topbar, .studio-header) [data-cc-desktop-toolbar] :is(button, a) { transition: none !important; }
}
