// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC

@import "refactor/common-refactor.scss";
.workspace-header-right {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: $s-256;
  padding: $s-8;
  gap: $s-8;
  background-color: var(--panel-background-color);
}

.users-section {
  position: relative;
  min-width: $s-32;
  max-width: $s-72;
  padding: $s-4 $s-6;
}

.separator {
  flex: 1;
}

.zoom-widget {
  @include buttonStyle;
  display: flex;
  align-items: center;
  justify-content: center;
  height: $s-28;
  max-width: $s-48;
  width: $s-48;
  border-radius: $br-8;
  .label {
    @include bodySmallTypography;
    height: 100%;
    padding: $s-8 0;
    color: var(--button-tertiary-foreground-color-rest);
  }

  &:hover {
    .label {
      color: var(--button-tertiary-foreground-color-focus);
    }
  }
  &.selected {
    .label {
      color: var(--button-tertiary-foreground-color-focus);
    }
  }
}

.dropdown {
  @extend .menu-dropdown;
  right: $s-2;
  top: calc($s-2 + $s-48);
  width: $s-272;
}

.basic-zoom-bar {
  display: flex;
  justify-content: space-between;
  padding: $s-6;
  cursor: auto;
}

.zoom-btns {
  display: flex;
}

.zoom-btn {
  @extend .button-tertiary;
  height: $s-28;
  width: $s-28;
  border-radius: $br-8;
  .zoom-icon {
    @include flexCenter;
    svg {
      @extend .button-icon;
      stroke: var(--icon-foreground);
    }
  }
  &:hover {
    .zoom-icon svg {
      stroke: var(--button-tertiary-foreground-color-hover);
    }
  }
}

.zoom-text {
  @include flexCenter;
  height: 100%;
  min-width: $s-48;
  padding: 0;
  margin: 0 $s-2;
  color: var(--modal-title-foreground-color);
}

.reset-btn {
  @extend .button-tertiary;
  color: var(--button-tertiary-foreground-color-hover);
  height: $s-28;
  border-radius: $br-8;
}
.zoom-option {
  @extend .menu-item-base;
  .shortcuts {
    @extend .shortcut-base;
    .shortcut-key {
      @extend .shortcut-key-base;
    }
  }
  &:hover {
    color: var(--menu-foreground-color-hover);
    .shortcuts {
      .shortcut-key {
        color: var(--menu-foreground-color-hover);
      }
    }
  }
}

.comments-btn {
  @extend .button-tertiary;
  border-radius: $br-8;
  margin: 0;
  height: $s-28;
  width: $s-28;
  border: none;
  svg {
    @extend .button-icon;
    stroke: var(--icon-foreground);
    height: $s-16;
    width: $s-16;
  }
  &:hover {
    background-color: transparent;
    border: none;
  }
  &.selected {
    background-color: var(--button-tertiary-background-color-selected);
    svg {
      stroke: var(--button-tertiary-foreground-color-active);
    }
  }
}

.history-button {
  @extend .button-tertiary;
  border-radius: $br-8;
  margin: 0;
  height: $s-28;
  width: $s-28;
  border: none;
  svg {
    @extend .button-icon;
    stroke: var(--icon-foreground);
    height: $s-16;
    width: $s-16;
  }
  &:hover {
    background-color: transparent;
    border: none;
  }
  &.selected {
    background-color: var(--button-tertiary-background-color-selected);
    svg {
      stroke: var(--button-tertiary-foreground-color-active);
    }
  }
}

.persistence-status-widget {
  @include flexCenter;
  width: $s-28;
  height: $s-28;
}

.status-icon {
  @include flexCenter;
  width: $s-24;
  height: $s-24;
  margin: 0;
  border-radius: $br-circle;
  svg {
    @extend .button-icon;
    stroke: var(--status-widget-icon-foreground-color);
  }
}

.pending-status {
  background-color: var(--status-widget-background-color-warning);
}

.saving-status {
  background-color: var(--status-widget-background-color-pending);
  svg {
    animation: spin-animation 1s infinite;
    animation-timing-function: linear;
  }
}

.saved-status {
  background-color: var(--status-widget-background-color-success);
}

.error-status {
  background-color: var(--status-widget-background-color-error);
}

.viewer-btn {
  @extend .button-tertiary;
  border-radius: $br-8;
  margin: 0;
  width: $s-28;
  height: $s-28;
  border: none;
  svg {
    @extend .button-icon;
    height: $s-16;
    width: $s-16;
    stroke: var(--icon-foreground);
  }
  &:hover {
    background-color: transparent;
    border: none;
  }
}
