/* Cosmo Chart 0.11.18 — readable tab/button states, no global canvas overrides. */
html[data-theme="dark"] { --cosmo-control-active-bg:#30363d; --cosmo-control-active-fg:#ffffff; --cosmo-control-active-border:#64748b; }
html[data-theme="light"] { --cosmo-control-active-bg:#dfeafa; --cosmo-control-active-fg:#12304a; --cosmo-control-active-border:#5e8dbc; }
/* The previous global `.modal button` color !important overrode the foreground
   of the white primary action, making its caption invisible on dark theme. */
html[data-theme] #workspace-modal .workspace-main-button {
  background:var(--cosmo-control-active-bg)!important;
  color:var(--cosmo-control-active-fg)!important;
  border-color:var(--cosmo-control-active-border)!important;
  box-shadow:none!important;
  -webkit-text-fill-color:var(--cosmo-control-active-fg);
}
html[data-theme] #workspace-modal .workspace-main-button:hover:not(:disabled) {filter:brightness(1.13);opacity:1!important;}
html[data-theme] #workspace-modal .workspace-secondary-button,
html[data-theme] #workspace-modal .workspace-item-actions button {
  background:var(--mono-panel)!important;color:var(--mono-text)!important;
}
/* Native OpenAlgo styles active tabs as --oac-on-bg (white) with --oac-acc-2
   (nearly white), reproducing the unreadable indicator Settings screenshot. */
html[data-theme] .oac-widget .oac-tabs .oac-tab[aria-selected="true"] {
  background:var(--cosmo-control-active-bg)!important;
  color:var(--cosmo-control-active-fg)!important;
  border-color:var(--cosmo-control-active-border)!important;
  -webkit-text-fill-color:var(--cosmo-control-active-fg);
}
html[data-theme] .oac-widget .oac-tabs .oac-tab[aria-selected="false"] {
  color:var(--mono-text)!important;
  background:transparent!important;
}
html[data-theme] .oac-widget .oac-tabs .oac-tab:hover:not([aria-selected="true"]),
html[data-theme] .editor-tabs button:hover:not(.active),
html[data-theme] .cosmo-ux2-tabs button:hover:not([aria-selected="true"]) {
  background:var(--mono-raise)!important;color:var(--mono-text)!important;
}
html[data-theme] .editor-tabs button.active,
html[data-theme] .cosmo-ux2-tabs button[aria-selected="true"],
html[data-theme] .objects-filter.active {
  background:var(--cosmo-control-active-bg)!important;
  color:var(--cosmo-control-active-fg)!important;
  border-color:var(--cosmo-control-active-border)!important;
}
html[data-theme] .editor-tabs button:focus-visible,
html[data-theme] .cosmo-ux2-tabs button:focus-visible,
html[data-theme] .oac-widget .oac-tab:focus-visible,
html[data-theme] #workspace-modal button:focus-visible {
  outline:2px solid var(--mono-focus)!important;outline-offset:2px;
}
html[data-theme] .editor-tabs button:disabled,
html[data-theme] #workspace-modal button:disabled,
html[data-theme] .oac-widget .oac-tab:disabled {opacity:.55;cursor:not-allowed;}
/* Hit areas stay generous, while the visible selected handles remain subtle. */
#cosmo-object-toolbar {transition:none;max-width:min(510px,calc(100% - 18px));}
#cosmo-object-toolbar button {border-radius:6px;}
#cosmo-object-toolbar .cosmo-object-swatch {border-radius:6px;}
@media(max-width:760px) {
  #cosmo-object-toolbar {max-width:calc(100% - 18px);gap:2px!important;padding-inline:4px!important;}
  #cosmo-object-toolbar button {min-width:24px!important;}
}
