/* 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/. */

/* These two background images build on the generic styles defined in
 * MenuButtons/index.css when using an icon. */
.menuButtonsShareButtonButton::before {
  background-image: url(../../../../res/img/svg/share-dark-12.svg);
}

.menuButtonsShareButtonButton-uploading::before {
  background-image: url(../../../../res/img/svg/sharing-animated-dark-12.svg);
}

.menuButtonsShareButtonError {
  background-color: var(--red-60);
  color: white;
}

.menuButtonsShareButtonError:hover {
  background-color: var(--red-70);
}

.buttonWithPanel.open > .menuButtonsShareButtonError,
.menuButtonsShareButtonError:hover:active {
  background-color: var(--red-80);
}

.menuButtonsShareButtonError::before {
  background-image: url(../../../../res/img/svg/error.svg);
}

.publishPanelPanel {
  --width: 510px;
}

.publishPanelContent {
  position: relative;

  /* This aligns all content, except the big icon. */
  padding-left: 70px;
}

.publishPanelTitle {
  /* "60px" This is the value to put the background image at the right location.
   * This background image is 44x44, so this puts it 16px left of the text. */
  padding-left: 60px;
  margin: 0 0 0 -60px;
  background: url(../../../../res/img/svg/info.svg) left center no-repeat;
  line-height: 44px; /* This is the height of the background image */
}

.publishPanelInfoDescription {
  flex: 1;
  margin-bottom: 1em;
  line-height: 1.5;
}

.publishPanelDataChoices {
  margin-left: 10px;
}

.publishPanelDataChoicesLabel {
  display: flex;
  margin: 4px 0;
}

.publishPanelDataChoicesIndicator {
  margin-left: 8px;
}

.publishPanelButtons {
  display: flex;
  justify-content: right;
  margin-top: 20px;
}

.publishPanelButton {
  display: inline-flex;
  min-width: 132px;
  box-sizing: content-box;
  align-items: center;
  justify-content: center;
  margin: 0 8px;
  cursor: default;
  text-align: center;
  text-decoration: none;
}

.publishPanelButtonDisabled {
  opacity: 0.6;
}

.publishPanelButtonDisabled:hover,
.publishPanelButtonDisabled:active:hover {
  background-color: var(--grey-90-a10);
}

.publishPanelButtonsSvg {
  position: relative;
  top: 4px;
  display: inline-block;
  margin-top: -6px;
  margin-right: 5px;
}

.publishPanelButtonsSvgUpload {
  width: 20px;
  height: 20px;
  background: url(../../../../res/img/svg/upload.svg) center center no-repeat;
}

.publishPanelButtonsSvgDownload {
  width: 20px;
  height: 20px;
  background: url(../../../../res/img/svg/download.svg) center center no-repeat;
}

.menuButtonsDownloadSize {
  display: inline-block;
  margin: 0 4px;
  font-size: 11px;
}

.publishPanelUpload {
  position: relative;
  padding: 10px 0;
}

.publishPanelUploadTop {
  margin: 10px;
}

.publishPanelUploadPercentage {
  margin: 10px 0;
  color: var(--blue-60);
}

.publishPanelUploadBar {
  overflow: hidden;
  height: 5px;
  border-radius: 2px;
  background-color: var(--grey-40);
}

.publishPanelUploadBarInner {
  position: absolute;
  top: 0;
  height: 3px;
  border-radius: 0 2px 2px 0;
  animation: animate-stripes 1s linear infinite;
  background-color: var(--blue-50);
  background-image: linear-gradient(
    135deg,
    transparent 20%,
    rgb(255 255 255 / 0.4) 20%,
    rgb(255 255 255 / 0.4) 40%,
    transparent 40%,
    transparent 60%,
    rgb(255 255 255 / 0.4) 60%,
    rgb(255 255 255 / 0.4) 80%,
    transparent 80%
  );
  background-size:
    21px 20px,
    100% 100%,
    100% 100%;
}

@keyframes animate-stripes {
  100% {
    background-position: -21px 0;
  }
}

.publishPanelError {
  margin: 10px 0;
}

/* Do not animate the publish animation for stripes at the top loading bar. */
@media (prefers-reduced-motion) {
  .publishPanelUploadBarInner {
    animation: none;
  }
}
