// =============================================================================
// Bubble Menu Styles
// =============================================================================

.dm-bubble-menu {
  // Button tokens (compact sizing for bubble menu)
  --dm-toolbar-padding: 0.25rem;
  --dm-toolbar-gap: 0.125rem;
  --dm-button-size: 1.75rem;
  --dm-button-border-radius: 0.25rem;
  --dm-button-color: var(--dm-text, #1a1a1a);
  --dm-button-hover-bg: var(--dm-hover, rgba(0, 0, 0, 0.06));
  --dm-button-active-bg: var(--dm-accent-surface, rgba(37, 99, 235, 0.1));
  --dm-button-active-color: var(--dm-accent, #2563eb);
  --dm-button-disabled-opacity: 0.4;

  // Smaller icons to match compact buttons. `:not(.dm-dropdown-caret)`
  // preserves the dropdown caret's own 0.625rem sizing from `_toolbar.scss`
  // - without this exclusion the bubble menu's selector wins on specificity
  // and the caret renders the same size as a normal toolbar icon.
  .dm-toolbar-button svg:not(.dm-dropdown-caret) {
    width: 1rem;
    height: 1rem;
  }

  .dm-toolbar-separator {
    width: 1px;
    height: 1.125rem;
    background: var(--dm-separator-color, var(--dm-border-color, #e0e0e0));
    margin: 0 0.125rem;
    flex-shrink: 0;
  }

  position: absolute;
  // Pin static position to parent top-left so the hidden box doesn't
  // inflate parent scrollHeight. JS overrides on show.
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: var(--dm-toolbar-gap);
  padding: var(--dm-toolbar-padding);
  background: var(--dm-bg, #fff);
  border: 1px solid var(--dm-border-color, #e5e7eb);
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  visibility: hidden;
  opacity: 0;
  z-index: 50;

  &[data-show] {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.15s ease;
  }
}
