@use '../../../scss/tools' as *;

.w-minimap__collapse-all {
  display: none;
  // Keep the icon at a stable position and reduce the amount of shifting of the button.
  min-width: 110px;
  text-align: end;
  align-items: center;
  justify-content: space-between;
  border-color: theme('colors.border-button-small-outline-default');
  z-index: calc(theme('zIndex.minimap') + 1);

  @include more-contrast-interactive();

  &.button-secondary {
    // Important for overlap with "Comment notifications" switch.
    background-color: theme('colors.surface-page');
  }

  @include media-breakpoint-up(sm) {
    display: inline-flex;
  }

  &--inside {
    display: inline-flex;
  }

  .icon {
    width: theme('spacing[2.5]');
    height: theme('spacing[2.5]');
    margin-inline-end: theme('spacing[2.5]');
  }

  &--floating {
    position: absolute;
    top: var(--offset-top);
    inset-inline-end: 0;
    margin-top: theme('spacing.5');
    margin-inline-end: theme('spacing.10');

    .side-panel-open & {
      inset-inline-end: var(--side-panel-width, 0);
    }
  }
}
