<commit_before>@import "partials/variables";
@import "partials/mixins";
@import "partials/buttons";
@import "partials/theme";
@import "partials/animations";

// This is how far outside the selection the mover target extends:
$mover-outer: 30px;

// And this is how far inside the selection it extends:
$mover-inner: 30px;

// This is the size of the little blue handles:
$handle-size: 16px;

// And the size when the selection is "small":
$handle-size-small: 10px;

// And some calculated values based on these that will be used below:
$handle-mover-offset: -1px;
$mover-size: $mover-outer + $mover-inner;
$overlay-z-index: 9999999999;

$modal-color: rgba(0, 0, 0, 0.7);
$very-light-grey: #ededed;


.mover-target {
  @include flex-container(row, center, center);
  pointer-events: auto;
  position: absolute;
  z-index: 5;
}

.highlight,
.mover-target {
  background-color: transparent;
  background-image: none;
}

.mover-target,
.bghighlight {
  border: 0;
}

.hover-highlight {
  animation: fade-in 125ms forwards $bezier;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1px;
  pointer-events: none;
  position: absolute;
  z-index: $overlay-z-index + 1;

  &:before {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    bottom: 0;
    content: '';
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
  }
}

.mover-target.direction-topLeft {
  cursor: nwse-resize;
  height: $mover-size;
  left: -$mover-outer;
  top: -$mover-outer;
  width: $mover-size;
}

.mover-target.direction-top {
  cursor: ns-resize;
  height: $mover-size;
  left: 0;
  top: -$mover-outer;
  width: 100%;
  // It will be too wide, but this will place it below topLeft/etc:
  z-index: 4;
}

.mover-target.direction-topRight {
  cursor: nesw-resize;
  height: $mover-size;
  right: -$mover-outer;
  top: -$mover-outer;
  width: $mover-size;
}

.mover-target.direction-left {
  cursor: ew-resize;
  height: 100%;
  left: -$mover-outer;
  top: 0;
  width: $mover-size;
  z-index: 4;
}

.mover-target.direction-right {
  cursor: ew-resize;
  height: 100%;
  right: -$mover-outer;
  top: 0;
  width: $mover-size;
  z-index: 4;
}

.mover-target.direction-bottomLeft {
  bottom: -$mover-outer;
  cursor: nesw-resize;
  height: $mover-size;
  left: -$mover-outer;
  width: $mover-size;
}

.mover-target.direction-bottom {
  bottom: -$mover-outer;
  cursor: ns-resize;
  height: $mover-size;
  left: 0;
  width: 100%;
  z-index: 4;
}

.mover-target.direction-bottomRight {
  bottom: -$mover-outer;
  cursor: nwse-resize;
  height: $mover-size;
  right: -$mover-outer;
  width: $mover-size;
}

.mover-target:hover .mover {
  transform: scale(1.05);
}

.mover {
  background-color: $white;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  height: $handle-size;
  opacity: 1;
  position: relative;
  transition: transform 125ms $bezier;
  width: $handle-size;

  .small-selection & {
    height: $handle-size-small;
    width: $handle-size-small;
  }
}

.direction-topLeft .mover,
.direction-left .mover,
.direction-bottomLeft .mover {
  left: $handle-mover-offset;
}

.direction-topLeft .mover,
.direction-top .mover,
.direction-topRight .mover {
  top: $handle-mover-offset;
}

.direction-topRight .mover,
.direction-right .mover,
.direction-bottomRight .mover {
  right: $handle-mover-offset;
}

.direction-bottomRight .mover,
.direction-bottom .mover,
.direction-bottomLeft .mover {
  bottom: $handle-mover-offset;
}

.bghighlight {
  background-color: $modal-color;
  position: absolute;
  z-index: $overlay-z-index;
}

.preview-overlay {
  align-items: center;
  background-color: $modal-color;
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: $overlay-z-index;
}

.highlight {
  border-radius: 2px;
  border: 2px dashed rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
  cursor: move;
  position: absolute;
  z-index: $overlay-z-index;
}

.highlight-buttons {
  @include flex-container(row, center, center);
  bottom: -55px;
  position: absolute;
  right: 5px;
  z-index: 6;

  .bottom-selection & {
    bottom: 5px;
  }

  .left-selection & {
    right: auto;
    left: 5px;
  }
}

.highlight-button-cancel {
  @extend .button;
  @extend .secondary;
  background-image: url("MOZ_EXTENSION/icons/cancel.svg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  border: 1px solid $light-active;
  margin: 5px;
  width: 40px;
}

.highlight-button-save {
  @extend .button;
  @extend .primary;
  background-image: url("MOZ_EXTENSION/icons/cloud.svg");
  background-position: 8px center;
  background-repeat: no-repeat;
  background-size: 20px 18px;
  font-size: 18px;
  margin: 5px;
  min-width: 80px;
  padding-left: 34px;
}

.highlight-button-download {
  @extend .button;
  @extend .secondary;
  background-image: url("MOZ_EXTENSION/icons/download.svg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  border: 1px solid $light-active;
  // Overrides display: flex from .button, which causes hover problems
  display: block;
  margin: 5px;
  width: 40px;
}

.pixel-dimensions {
  position: absolute;
  pointer-events: none;
  font-weight: bold;
  font-family: sans-serif;
  font-size: 70%;
  color: #000;
  text-shadow:
  -1px -1px 0 #fff,
  1px -1px 0 #fff,
  -1px 1px 0 #fff,
  1px 1px 0 #fff;
}

.preview-buttons {
  @include flex-container(row, center, center);
  position: absolute;
  right: 0;
}

.preview-image  {
  position:relative;
  height: 80%;
  max-width: 100%;
  margin: auto 2em;
  text-align: center;
  animation-delay: 50ms;
  animation: bounce-in 300ms forwards ease-in-out;
}

.preview-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90%;
  margin: 50px auto;
  border: 1px solid #fff;
}

.preview-button-save {
  @extend .button;
  @extend .primary;
  background-image: url("MOZ_EXTENSION/icons/menu-myshot-white.svg");
  background-repeat: no-repeat;
  background-position: left center;
  padding-left: 40px;
  font-size: 18px;
  margin: 5px;
  min-width: 100px;
}

// FIXME: some of the styles in .fixed-container were copied from
// .preview-overlay and are probably unnecessary
.fixed-container {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  left: 0;<commit_msg>update shot preview save icon<commit_after>@import "partials/variables";
@import "partials/mixins";
@import "partials/buttons";
@import "partials/theme";
@import "partials/animations";

// This is how far outside the selection the mover target extends:
$mover-outer: 30px;

// And this is how far inside the selection it extends:
$mover-inner: 30px;

// This is the size of the little blue handles:
$handle-size: 16px;

// And the size when the selection is "small":
$handle-size-small: 10px;

// And some calculated values based on these that will be used below:
$handle-mover-offset: -1px;
$mover-size: $mover-outer + $mover-inner;
$overlay-z-index: 9999999999;

$modal-color: rgba(0, 0, 0, 0.7);
$very-light-grey: #ededed;


.mover-target {
  @include flex-container(row, center, center);
  pointer-events: auto;
  position: absolute;
  z-index: 5;
}

.highlight,
.mover-target {
  background-color: transparent;
  background-image: none;
}

.mover-target,
.bghighlight {
  border: 0;
}

.hover-highlight {
  animation: fade-in 125ms forwards $bezier;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1px;
  pointer-events: none;
  position: absolute;
  z-index: $overlay-z-index + 1;

  &:before {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    bottom: 0;
    content: '';
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
  }
}

.mover-target.direction-topLeft {
  cursor: nwse-resize;
  height: $mover-size;
  left: -$mover-outer;
  top: -$mover-outer;
  width: $mover-size;
}

.mover-target.direction-top {
  cursor: ns-resize;
  height: $mover-size;
  left: 0;
  top: -$mover-outer;
  width: 100%;
  // It will be too wide, but this will place it below topLeft/etc:
  z-index: 4;
}

.mover-target.direction-topRight {
  cursor: nesw-resize;
  height: $mover-size;
  right: -$mover-outer;
  top: -$mover-outer;
  width: $mover-size;
}

.mover-target.direction-left {
  cursor: ew-resize;
  height: 100%;
  left: -$mover-outer;
  top: 0;
  width: $mover-size;
  z-index: 4;
}

.mover-target.direction-right {
  cursor: ew-resize;
  height: 100%;
  right: -$mover-outer;
  top: 0;
  width: $mover-size;
  z-index: 4;
}

.mover-target.direction-bottomLeft {
  bottom: -$mover-outer;
  cursor: nesw-resize;
  height: $mover-size;
  left: -$mover-outer;
  width: $mover-size;
}

.mover-target.direction-bottom {
  bottom: -$mover-outer;
  cursor: ns-resize;
  height: $mover-size;
  left: 0;
  width: 100%;
  z-index: 4;
}

.mover-target.direction-bottomRight {
  bottom: -$mover-outer;
  cursor: nwse-resize;
  height: $mover-size;
  right: -$mover-outer;
  width: $mover-size;
}

.mover-target:hover .mover {
  transform: scale(1.05);
}

.mover {
  background-color: $white;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  height: $handle-size;
  opacity: 1;
  position: relative;
  transition: transform 125ms $bezier;
  width: $handle-size;

  .small-selection & {
    height: $handle-size-small;
    width: $handle-size-small;
  }
}

.direction-topLeft .mover,
.direction-left .mover,
.direction-bottomLeft .mover {
  left: $handle-mover-offset;
}

.direction-topLeft .mover,
.direction-top .mover,
.direction-topRight .mover {
  top: $handle-mover-offset;
}

.direction-topRight .mover,
.direction-right .mover,
.direction-bottomRight .mover {
  right: $handle-mover-offset;
}

.direction-bottomRight .mover,
.direction-bottom .mover,
.direction-bottomLeft .mover {
  bottom: $handle-mover-offset;
}

.bghighlight {
  background-color: $modal-color;
  position: absolute;
  z-index: $overlay-z-index;
}

.preview-overlay {
  align-items: center;
  background-color: $modal-color;
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: $overlay-z-index;
}

.highlight {
  border-radius: 2px;
  border: 2px dashed rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
  cursor: move;
  position: absolute;
  z-index: $overlay-z-index;
}

.highlight-buttons {
  @include flex-container(row, center, center);
  bottom: -55px;
  position: absolute;
  right: 5px;
  z-index: 6;

  .bottom-selection & {
    bottom: 5px;
  }

  .left-selection & {
    right: auto;
    left: 5px;
  }
}

.highlight-button-cancel {
  @extend .button;
  @extend .secondary;
  background-image: url("MOZ_EXTENSION/icons/cancel.svg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  border: 1px solid $light-active;
  margin: 5px;
  width: 40px;
}

.highlight-button-save {
  @extend .button;
  @extend .primary;
  background-image: url("MOZ_EXTENSION/icons/cloud.svg");
  background-position: 8px center;
  background-repeat: no-repeat;
  background-size: 20px 18px;
  font-size: 18px;
  margin: 5px;
  min-width: 80px;
  padding-left: 34px;
}

.highlight-button-download {
  @extend .button;
  @extend .secondary;
  background-image: url("MOZ_EXTENSION/icons/download.svg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  border: 1px solid $light-active;
  // Overrides display: flex from .button, which causes hover problems
  display: block;
  margin: 5px;
  width: 40px;
}

.pixel-dimensions {
  position: absolute;
  pointer-events: none;
  font-weight: bold;
  font-family: sans-serif;
  font-size: 70%;
  color: #000;
  text-shadow:
  -1px -1px 0 #fff,
  1px -1px 0 #fff,
  -1px 1px 0 #fff,
  1px 1px 0 #fff;
}

.preview-buttons {
  @include flex-container(row, center, center);
  position: absolute;
  right: 0;
  top: -2px;
}

.preview-image  {
  position:relative;
  height: 80%;
  max-width: 100%;
  margin: auto 2em;
  text-align: center;
  animation-delay: 50ms;
  animation: bounce-in 300ms forwards ease-in-out;
}

.preview-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90%;
  margin: 50px auto;
  border: 1px solid rgba(255, 255, 255, 0.8);;
}

.preview-button-save {
  @extend .button;
  @extend .primary;
  background-image: url("MOZ_EXTENSION/icons/cloud.svg");
  background-position: 8px center;
  background-repeat: no-repeat;
  background-size: 20px 18px;
  font-size: 18px;
  margin: 5px;
  min-width: 80px;
  padding-left: 34px;
}

// FIXME: some of the styles in .fixed-container were copied from
// .preview-overlay and are probably unnecessary
.fixed-container {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  left: 0;
{'fraction_non_alphanumeric': 0.1494733581164808, 'fraction_numerical': 0.0323729863692689, 'mean_word_length': 3.4071672354948808, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3201214', 'n_tokens_mistral': 5333, 'n_tokens_neox': 4904, 'n_words': 1193}