.popup-new-media {
  $parent: ".popup";

  #{$parent} {
    &-container {
      width: 420px;
      max-width: 420px;
      /* padding: 12px 20px 50px; */
      padding: 12px 20px 32.5px;
      //max-height: unquote('min(640px, 100%)');
      max-height: 100%;

      &.is-media:not(.is-album) {
        /* max-height: 425px; */
  
        #{$parent}-photo {
          max-height: 320px;
          margin: 0 auto;
  
          img {
            object-fit: contain;
          }

          > div {
            display: flex;
            justify-content: center;
          }
        }
      }

      &.is-album {
        #{$parent}-photo {
          margin: 0 auto;
          position: relative;

          > div {
            position: absolute;
          }

          img, video {
            object-fit: cover;
            width: 100%;
            height: 100%;
          }
        }
      }
    }

    &-header {
      flex: 0 0 auto;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 9px;
      padding: 12px 20px 15px;
  
      .btn-primary {
        width: 79px;
        height: 36px;
        font-size: 14px;
        font-weight: normal;
        padding: 0;
        padding-top: 2px;
        margin-top: -3px;
        border-radius: $border-radius-medium;
      }
    }
  
    &-close {
      font-size: 1.5rem;
      margin: -1px 0 0 -4px;
    }
  
    &-title {
      flex: 1;
      padding: 0 2rem 0 1.5rem;
      margin: 0;
      margin-top: -3px;
      font-size: 1.25rem;
      font-weight: 500;
    }
  
    &-photo {
      max-width: 380px;
      //display: flex;
      overflow: hidden;
      //justify-content: center;
      width: fit-content;
      border-radius: $border-radius-medium;
      /* align-items: center; */
  
      .document {
        max-width: 100%;
        overflow: hidden;
        cursor: default;
        padding-left: 3.75rem;
        height: 4.5rem;
  
        &-name {
          font-weight: normal;
          width: 100%;
          max-width: 100%;
          overflow: hidden;
          text-overflow: ellipsis;
          line-height: 1.5;
        }

        &-ico {
          height: 48px;
          width: 48px;
          font-size: 16px;
          font-weight: normal;
          line-height: 11px;
          letter-spacing: 0;
        }
  
        /* &.photo {
          .document-ico {
            border-radius: $border-radius;
          }
        } */
      }
    }
  }

  .scrollable {
    position: relative;
  }

  .input-field {
    width: 100%;
    margin-top: 25px;
    flex: 0 0 auto;

    &::placeholder {
      color: #a2acb4;
    }

    input {
      //height: 54px;
      font-size: 1rem;
      border-radius: $border-radius-medium;
    }

    label {
      font-size: inherit;
      opacity: 0;
    }
  }
}

.popup-create-poll.popup-new-media .btn-primary {
  width: 94px;
}

.popup-new-media.popup-send-photo {
  .popup-header {
    padding: 0;
  }
}