.o-spreadsheet .o-figure {
  &:not(:hover):not(:focus-within) .o-chart-menu {
    visibility: hidden;
  }

  .o-chart-menu {
    cursor: default;
    > div {
      height: 28px;
    }

    .o-chart-menu-item {
      color: var(--os-gray-900) !important;
      height: 20px;
      width: 20px;
      border-color: transparent;
      &.active,
      &:hover,
      &:target {
        cursor: pointer;
        background-color: var(--os-background-gray-color-hover);
      }

      .o-icon {
        --os-icon-edge-length: 14px;
      }

      .o-chart-preview {
        stroke-width: 2px;
        transform: scale(1.1);
        width: 16px;
        height: 16px;
      }
    }
  }
}

.o-spreadsheet {
  &.o-spreadsheet-mobile .o-figure {
    .o-chart-menu {
      display: block !important;
    }
  }
}
