// NOTE TO CONSUMERS: The code and variables in these source files are not considered stable and can change at any time, even in minor and patch releases!
@use "sass:color";
@use '@uppy/core/src/_utils.scss' as *;
@use '@uppy/core/src/_variables.scss' as *;

.uppy-Audio-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.uppy-Audio-audioContainer {
  display: flex;
  width: 100%;
  height: 100%;
  background-color: $gray-300;
  position: relative;
  justify-content: center;
  align-items: center;
}

.uppy-Audio-player {
  width: 85%;
  border-radius: 12px;
}

.uppy-Audio-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.uppy-Audio-footer {
  width: 100%;
  // min-height: 75px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px;
}

.uppy-Audio-audioSourceContainer {
  width: 100%;
  flex-grow: 0;
}

.uppy-size--lg .uppy-Audio-audioSourceContainer {
  width: 33%;
  margin: 0; // vertical alignment handled by the flexbox wrapper
}

.uppy-Audio-audioSource-select {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  padding: 0.4em 1em 0.3em 0.4em;
  width: 100%;
  max-width: 90%;
  border: 1px solid $gray-600;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23757575%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position:
    right 0.4em top 50%,
    0 0;
  background-size:
    0.65em auto,
    100%;
  margin: auto;
  margin-bottom: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;

  .uppy-size--lg & {
    font-size: 14px;
    margin-bottom: 0;
  }
}

.uppy-Audio-audioSource-select::-ms-expand {
  display: none;
}

.uppy-Audio-buttonContainer {
  width: 50%;
  margin-left: 25%;
  text-align: center;
  flex: 1;
}

.uppy-size--lg .uppy-Audio-buttonContainer {
  width: 34%;
  margin-left: 0;
}

.uppy-Audio-recordingLength {
  width: 25%;
  flex-grow: 0;
  color: $gray-600;
  font-family: $font-family-mono;
  text-align: right;
}

.uppy-size--lg .uppy-Audio-recordingLength {
  width: 33%;
}

.uppy-Audio-button {
  @include blue-border-focus;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: $red;
  color: $white;
  cursor: pointer;
  transition: all 0.3s;

  &:hover {
    background-color: color.adjust($red, $lightness: -5%);
  }

  [data-uppy-theme='dark'] & {
    @include blue-border-focus--dark;
  }
}

.uppy-Audio-button--submit {
  background-color: $blue;
  margin: 0 12px;

  &:hover {
    background-color: color.adjust($blue, $lightness: -5%);
  }
}

.uppy-Audio-button svg {
  width: 26px;
  height: 26px;
  max-width: 100%;
  max-height: 100%;
  display: inline-block;
  vertical-align: text-top;
  overflow: hidden;
  fill: currentColor;
}

.uppy-size--md .uppy-Audio-button {
  width: 60px;
  height: 60px;
}

.uppy-Audio-permissons {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column wrap;
  height: 100%;
  flex: 1;
}

.uppy-Audio-permissons p {
  max-width: 450px;
  line-height: 1.3;
  text-align: center;
  line-height: 1.45;
  color: $gray-500;
  margin: 0;
}

.uppy-Audio-permissonsIcon svg {
  width: 100px;
  height: 75px;
  color: $gray-400;
  margin-bottom: 30px;
}

.uppy-Audio-title {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 400;
  margin: 0;
  margin-bottom: 5px;
  padding: 0 15px;
  max-width: 500px;
  text-align: center;
  color: $gray-800;

  [data-uppy-theme='dark'] & {
    color: $gray-200;
  }
}
