// @import '_variables.scss';
// @import '_utils.scss';
// @import '_animation.scss';
// @import '_common.scss';

.UppyDashboard--modal {
  z-index: $zIndex-2;
}

.UppyDashboard--modal[aria-hidden=true] {
  display: none;
}

// Added to body to prevent the page from scrolling when Modal is open
.is-UppyDashboard-open {
  overflow: hidden;
}

.UppyDashboard--modal .UppyDashboard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba($color-white, 0.8);
  z-index: $zIndex-2;
}

.UppyDashboard-inner {
  position: relative;
  background-color: darken($color-white, 2%);
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: $zIndex-3;
  outline: none;
  border: 1px solid rgba($color-gray, 0.2);

  @media #{$screen-medium} {
    width: 750px;
    height: 550px;
    border-radius: 5px;
  }
}

.UppyDashboard-innerWrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  min-height: 300px;
}

.UppyDashboard--semiTransparent .UppyDashboard-inner {
  background-color: rgba($color-white, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.UppyDashboard--modal .UppyDashboard-inner {
  position: fixed;
  top: 0;
  left: 0;
  border: none;

  @media #{$screen-medium} {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0px 0px 20px 7px rgba($color-gray, 0.15);
  }
}

.UppyDashboard-close {
  @include reset-button;
  display: none;
  position: fixed;
  top: 12px;
  right: 12px;
  cursor: pointer;
  color: lighten($color-asphalt-gray, 25%);
  z-index: $zIndex-4;
  transition: all 0.2s;

  &:hover { color: $color-black; }

  .UppyIcon {
    width: 14px;
    height: 14px;
  }

  .UppyDashboard--wide & {
    color: $color-asphalt-gray;
    top: 16px;
    right: 16px;

    .UppyIcon {
      width: 17px;
      height: 17px;
    }
  }

  .UppyDashboard--modal & {
    display: block;
  }
}

.UppyDashboardTabs {
  padding-top: 7px;
  padding-bottom: 7px;
  border-bottom: 1px dashed lighten($color-gray, 15%);
}

.UppyDashboardTabs[aria-hidden=true] {
  display: none;
}

.UppyDashboardTabs-title {
  font-size: 15px;
  line-height: 30px;
  font-weight: 400;
  text-align: center;
  margin: 0;
  padding: 0;
  text-align: center;
  color: $color-asphalt-gray;

  .UppyDashboard--wide & {
    font-size: 17px;
    line-height: 40px;
  }
}

.UppyDashboard-browse {
  @include reset-button;
  cursor: pointer;
  color: darken($color-cornflower-blue, 10%);
}

.UppyDashboardTabs-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.UppyDashboardTab {
  width: 62px;
  margin: 0 2px;
  display: inline-block;
  text-align: center;

  .UppyDashboard--wide & {
    margin: 0 5px;
    width: 75px;
  }
}

.UppyDashboardTab-btn {
  width: 100%;
  cursor: pointer;
  border: 0;
  background-color: transparent;
  -webkit-appearance: none;
  outline: none;
  transition: all 0.3s;
  color: darken($color-gray, 25%);

  &:focus,
  &:active,
  &:hover {
    color: $color-cornflower-blue;
  }
}

.UppyDashboardTab-name {
  font-size: 8px;
  margin-top: 5px;
  margin-bottom: 0;
  font-weight: normal;
  overflow-x: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  .UppyDashboard--wide & {
    font-size: 9px;
  }
}

// On SVG sizing: https://sarasoueidan.com/blog/svg-style-inheritance-and-FOUSVG/
.UppyDashboardTab .UppyIcon {
  width: 20px;
  height: 20px;
  vertical-align: middle;

  .UppyDashboard--wide & {
    width: 23px;
    height: 23px;
  }
}

.UppyDashboard-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.UppyDashboardContent-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 40px;
  width: 100%;
  border-bottom: 1px solid rgba($color-gray, 0.3);

  .UppyDashboard--wide & {
    height: 50px;
  }
}

.UppyDashboardContent-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  font-size: 14px;
  line-height: 40px;
  font-weight: normal;
  max-width: 170px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-x: hidden;
  margin: auto;

  .UppyDashboard--wide & {
    font-size: 16px;
    line-height: 50px;
    max-width: 300px;
    // top: 15px;
  }
}

.UppyDashboardContent-titleFile {
  text-decoration: underline;
  // overflow: hidden;
  // display: inline-block;
  // vertical-align: text-bottom;
}

.UppyDashboardContent-back {
  @include reset-button;
  position: absolute;
  top: 0;
  right: 15px;
  font-size: 14px;
  line-height: 40px;
  font-weight: 500;
  cursor: pointer;
  color: $color-cornflower-blue;

  .UppyDashboard--wide & {
    // top: 16px;
    font-size: 15px;
    line-height: 50px;
  }
}

.UppyDashboardContent-back .UppyIcon {
  position: relative;
  margin-right: 3px;
}

.UppyDashboardContent-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(-105%);
  transition: transform 0.2s ease-in-out;
  will-change: transform;
  background-color: darken($color-white, 4%);
  box-shadow: 0 0 10px 5px rgba($color-black, 0.15);
  padding: 15px;
  padding-top: 60px;
  overflow: hidden;
  z-index: $zIndex-3;
}

.UppyDashboardContent-panel[aria-hidden=false] {
  transform: none;
}

// Progress bar placeholder

.UppyDashboard-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12%;
}

.UppyDashboard-progressBarContainer.is-active {
  z-index: $zIndex-4;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.UppyDashboard-next {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: none;
  background-color: rgba($color-gray, 0.7);
  -webkit-appearance: none;
  border: 0;
  z-index: $zIndex-3;
  transition: background-color 0.5s;
  color: $color-white;
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  margin: 0;
  outline: none;
  cursor: not-allowed;
}

.UppyDashboard-next.is-active {
  cursor: pointer;
  background-color: $color-cornflower-blue;

  &:hover {
    background-color: darken($color-cornflower-blue, 20%);
  }
}

.UppyDashboard-filesContainer {
  @include clearfix;
  position: relative;
  overflow-y: hidden;
  margin: 0;
  flex: 1;
}

.UppyDashboard-files {
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.UppyDashboard.drag .UppyDashboard-innerWrap  {
  background-color: darken($color-white, 10%)
}

.UppyDashboard.drag .UppyDashboard-files--noFiles {
  border-color: darken(#E4E4E4, 20%);
}

.UppyDashboard-bgIcon {
  width: 100%;
  max-width: 360px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  transition: all 0.3s;
  padding: 0 20px;
}

.UppyDashboard-bgIcon .UppyIcon {
  width: 100%;
  height: 80px;
  fill: none;
  stroke: $color-asphalt-gray;

  .UppyDashboard--wide & {
    height: 110px;
  }
}

.UppyDashboard.drag .UppyDashboard-bgIcon {
  opacity: 1;
}

.UppyDashboard-dropFilesTitle {
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  font-weight: normal;
  color: $color-asphalt-gray;
  margin: 0;
  margin-top: 25px;

  .UppyDashboard--wide & {
    font-size: 18px;
  }
}

.UppyDashboardItem {
  list-style: none;
  margin: 10px 0;
  position: relative;
  background-color: $color-white;
  display: flex;
  align-items: center;
  border: 1px solid rgba($color-gray, 0.2);

  .UppyDashboard--wide & {
    flex-direction: column;
    float: left;
    width: 140px;
    height: 170px;
    margin: 15px 21px;
    border-radius: 6px;
    border: 0;
  }
}

.UppyDashboardItem-preview {
  width: 60px;
  height: 60px;
  border-bottom: 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;

  .UppyDashboard--wide & {
    width: 100%;
    height: 100px;
    border: 0;
  }
}

.UppyDashboardItem-sourceIcon {
  color: rgba($color-white, 0.95);
  position: absolute;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  z-index: $zIndex-3;

  .UppyDashboard--wide & {
    top: 8px;
    left: 8px;
    width: 15px;
    height: 15px;
  }
}

.UppyDashboardItem-sourceIcon .UppyIcon {
  filter: drop-shadow(0 0 1px rgba(0,0,0,.15));
}

.UppyDashboardItem-previewInnerWrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  .UppyDashboard--wide & {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
  }
}

  .UppyDashboardItem-previewInnerWrap:after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba($color-black, 0.65);
    display: none;
    z-index: $zIndex-2;
  }


.UppyDashboardItem-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.UppyDashboardItem-previewIconWrap {
  height: 85%;
  position: relative;
}

.UppyDashboardItem-previewIconBg {
  height: 100%;
  filter: drop-shadow(rgba(0, 0, 0, 0.1) 0px 0px 1px);
}

.UppyDashboardItem-previewIcon {
  // width: 34px;
  // height: 26px;
  width: 25%;
  max-height: 55%;
  z-index: $zIndex-1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  .UppyDashboard--wide & {
    width: 40%;
    max-height: 80%;
  }
}

.UppyDashboardItem-info {
  padding: 8px 32px 8px 10px;
  position: relative;
  max-width: 70%;

  .UppyDashboard--wide & {
    width: 100%;
    max-width: 100%;
    flex: 1;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    border: 1px solid rgba($color-gray, 0.2);
    border-top: 0;
    // height: 60px;
  }
}

.UppyDashboardItem-name {
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
  margin: 0;
  padding: 0;
  max-height: 28px;
  overflow: hidden;
  margin-bottom: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;

  .UppyDashboard--wide & {
    word-wrap: break-word;
    white-space: normal;
  }
}

.UppyDashboardItem-name a {
  text-decoration: underline;
  color: $color-black;
}

.UppyDashboardItem-status {
  font-size: 11px;
  font-weight: normal;
  color: $color-gray;
  margin-bottom: 4px;
}

.UppyDashboardItem-statusSize {
  text-transform: uppercase;
}

.UppyDashboardItem-edit,
.UppyDashboardItem-copyLink {
  @include reset-button;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  position: absolute;
  top: 9px;
  right: 10px;

  .UppyDashboard--wide & {
    top: 8px;
    right: 8px;
  }
}

.UppyDashboardItem-edit .UppyIcon {
  width: 11px;
  height: 11px;
  color: $color-asphalt-gray;

  .UppyDashboard--wide & {
    width: 12px;
    height: 12px;
  }
}

.UppyDashboardItem-copyLink .UppyIcon {
  width: 11px;
  height: 11px;
  color: $color-asphalt-gray;

  .UppyDashboard--wide & {
    width: 13px;
    height: 13px;
  }
}

.UppyDashboardItem-action {
  position: absolute;
  top: 8px;
  right: 5px;
  z-index: $zIndex-3;

  .UppyDashboard--wide & {
    top: -8px;
    right: -8px;
  }
}

.UppyDashboardItem-remove {
  @include reset-button;
  cursor: pointer;
  color: rgba($color-asphalt-gray, 0.6);
  width: 16px;

  .UppyDashboard--wide & {
    width: 20px;
    color: $color-asphalt-gray;
  }
}

  .UppyDashboardItem.is-inprogress:not(.is-resumable) {
    .UppyDashboardItem-remove {
      display: none;
    }
  }

.UppyDashboardItem-remove .UppyIcon {
  max-width: 100%;
}

.UppyDashboardItem-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: $zIndex-3;
  color: $color-white;
  text-align: center;
  width: 120px;
  display: none;
  transition: all .35 ease;
}

  .UppyDashboardItem.is-complete .UppyDashboardItem-progress {
    transform: initial;
    top: -7px;
    right: -7px;
    left: initial;
    width: auto;
  }

  .UppyDashboardItem.is-inprogress .UppyDashboardItem-progress,
  .UppyDashboardItem.is-complete .UppyDashboardItem-progress {
    display: block;
  }

.UppyDashboardItem-progressBtn {
  @include reset-button;
  width: 38px;
  height: 38px;
  opacity: 0.9;
  cursor: pointer;
  transition: all .35s ease;

  .UppyDashboard--wide & {
    width: 55px;
    height: 55px;
  }
}

  .UppyDashboardItem.is-complete .UppyDashboardItem-progressBtn {
    width: 18px;
    height: 18px;
    opacity: 1;

    .UppyDashboard--wide & {
      width: 25px;
      height: 25px;
    }
  }

.UppyDashboardItem-progressInfo {
  font-size: 9px;
  line-height: 1;
  font-weight: 500;
  height: 10px;
  display: none;
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  text-shadow: 0 1px 0 rgba($color-black, 0.3);

  .UppyDashboard--wide & {
    display: block;
  }
}

.UppyIcon-progressCircle {
  width: 100%;
  height: 100%;
}

.UppyDashboardItem .bg {
  stroke: rgba($color-white, 0.4);
  opacity: 0;
  // transition: all 0.2s;
}

.UppyDashboardItem .progress {
  stroke: $color-white;
  transition: stroke-dashoffset .5s ease-out;
  opacity: 0;
}

.UppyDashboardItem .play {
  stroke: $color-white;
  fill: $color-white;
  opacity: 0;
  transition: all 0.2s;
  display: none;
}

.UppyDashboardItem .cancel {
  // stroke: $color-white;
  fill: $color-white;
  opacity: 0;
  transition: all 0.2s;
}

.UppyDashboardItem .pause {
  stroke: $color-white;
  fill: $color-white;
  opacity: 0;
  transition: all 0.2s;
  display: none;
}

.UppyDashboardItem.is-resumable {
  .pause, .play { display: block; }
  .cancel { display: none; }
}

.UppyIcon-progressCircle .check {
  opacity: 0;
  fill: $color-white;
  transition: all 0.2s;
}

.UppyDashboardItem.is-inprogress {
  .bg, .progress, .pause, .cancel {
    opacity: 1;
  }

  .UppyDashboardItem-previewInnerWrap:after {
    display: block;
  }
}

.UppyDashboardItem.is-paused {
  .pause {
    opacity: 0;
  }
  .play {
    opacity: 1;
  }
}

.UppyDashboardItem.is-complete {
  .UppyDashboardItem-progressBtn {
    cursor: default;
  }

  // .UppyDashboardItem-previewInnerWrap:after {
  //   display: block;
  // }

  .progress {
    stroke: $color-green;
    fill: $color-green;
    opacity: 1;
  }

  .check {
    opacity: 1;
  }
}




.UppyTotalProgress {
  @include reset-button;
  width: 70px;
  height: 70px;
  cursor: pointer;
}

.UppyTotalProgress .UppyIcon {
  width: 100%;
  height: 100%;
}

.UppyTotalProgress .bg {
  stroke: rgba($color-cornflower-blue, 0.3);
  transition: all 0.2s;
  opacity: 1;
  box-shadow: 1px 2px 4px 0px rgba($color-black, 0.2);
}

.UppyTotalProgress .progress {
  stroke: darken($color-cornflower-blue, 5%);
  transition: stroke-dashoffset .5s ease-out;
  opacity: 1;
}

.UppyTotalProgress .play {
  stroke: darken($color-cornflower-blue, 5%);
  fill: darken($color-cornflower-blue, 5%);
  transition: all 0.2s;
  opacity: 0;
}

.UppyTotalProgress .pause {
  stroke: darken($color-cornflower-blue, 5%);
  fill: darken($color-cornflower-blue, 5%);
  transition: all 0.2s;
  opacity: 1;
}

.UppyTotalProgress .check {
  fill: $color-white;
  transition: all 0.2s;
  opacity: 0;
}

.UppyTotalProgress--is-paused {
  .pause {
    opacity: 0;
  }
  .play {
    opacity: 1;
  }
}

.UppyTotalProgress--is-complete {
  cursor: default;

  .pause, .play {
    opacity: 0;
  }

  .bg {
    stroke: $color-green;
    opacity: 1;
  }

  .progress {
    stroke: $color-green;
    fill: $color-green;
    opacity: 1;
  }
  .check {
    opacity: 1;
  }
}

.UppyTotalProgress-info {
  font-size: 10px;
  color: $color-asphalt-gray;
}

.UppyDashboardItem-progressNum {
  position: relative;
  z-index: $zIndex-2;
}

.UppyDashboardItem-progressInner {
  height: 15px;
  background-color: $color-cornflower-blue;
  position: absolute;
  top: 0;
  left: 0;
}

.UppyDashboard-actions {
  text-align: center;
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: $zIndex-3;

  .UppyDashboard--wide & {
    bottom: 20px;
    right: 20px;
  }
}

// .UppyDashboard-actions button:nth-child(2) {
//   margin-top: 10px;
// }

.UppyDashboard-pauseResume .UppyIcon {
  width: 100%;
  height: 100%;
}

.UppyDashboard-upload {
  position: relative;
  width: 50px;
  height: 50px;

  .UppyDashboard--wide & {
    width: 60px;
    height: 60px;
  }
}

.UppyDashboard-upload .UppyIcon {
  position: relative;
  top: 1px;
  width: 50%;
}

.UppyDashboard-uploadCount {
  position: absolute;
  top: -12px;
  right: -12px;
  background-color: $color-green;
  color: $color-white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  line-height: 16px;
  font-size: 8px;

  .UppyDashboard--wide & {
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 9px;
  }
}

//
// File Card
//

.UppyDashboardFileCard {
  transform: translateY(0);
  transition: all 0.25s ease-in-out;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: $zIndex-4;
  box-shadow: 0px 0px 10px 4px rgba($color-black, 0.1);
  background-color: $color-white;
}

.UppyDashboardFileCard[aria-hidden=true] {
  transform: translateY(-105%);
}

.UppyDashboardFileCard-inner {
  height: 100%;
  padding-top: 40px;

  .UppyDashboard--wide & {
    padding-top: 50px;
  }
}

.UppyDashboardFileCard-preview {
  height: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba($color-gray, 0.3);
  background-color: lighten($color-gray, 40%);
  position: relative;
}

.UppyDashboardFileCard-preview img {
  box-shadow: 0px 3px 20px rgba($color-black, 0.15);
  max-width: 90%;
  max-height: 90%;
  object-fit: cover;
}

.UppyDashboardFileCard-info {
  padding: 30px 20px 20px 20px;
}

.UppyDashboardFileCard-fieldset {
  font-size: 0;
  border: 0;
  padding: 0;
  margin: 0;
  margin-bottom: 15px;
  max-width: 450px;
  margin: auto;
  margin-bottom: 15px;
}

.UppyDashboardFileCard-label {
  display: inline-block;
  vertical-align: middle;
  width: 25%;
  font-size: 11px;
  color: $color-asphalt-gray;

  .UppyDashboard--wide & {
    font-size: 13px;
  }
}

.UppyDashboardFileCard-input {
  display: inline-block;
  vertical-align: middle;
  width: 75%;
  border: 0;
  border-bottom: 1px solid rgba($color-asphalt-gray, 0.3);
  outline: none;
  font-size: 12px;
  line-height: 1.8;
  padding-left: 5px;
  margin: auto;

  .UppyDashboard--wide & {
    font-size: 15px;
  }
}

.UppyDashboardFileCard-input:focus {
  border-color: $color-asphalt-gray;
}

.UppyDashboardFileCard-done {
  width: 50px;
  height: 50px;

  .UppyDashboard--wide & {
    width: 60px;
    height: 60px;
  }
}

.UppyDashboardFileCard-done .UppyIcon {
  width: 25px;
  height: 25px;

  .UppyDashboard--wide & {
    width: 30px;
    height: 30px;
  }
}

// StatusBar

.UppyDashboard--wide .UppyStatusBar-content .UppyIcon {
  width: 17px;
  height: 17px;
}

.UppyDashboard--wide .UppyStatusBar {
  height: 40px;
  line-height: 40px;
  font-size: 14px;
}
