//Slider
@import "slider";

.igd-shortcode-wrap {
  user-select: none;
  overflow-y: auto;
  margin-bottom: 1rem;
  color: #333;
  box-sizing: border-box;
  width: var(--module-width);
  height: var(--module-height);

  * {
    box-sizing: inherit;
  }

  /**** Scrollbar ****/
  &::-webkit-scrollbar {
    width: 5px;
  }

  &::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 10px;
  }

  &::-webkit-scrollbar-track {
    background: #ddd;
    border-radius: 10px;
  }

  &.igd-shortcode-browser,
  &.igd-shortcode-search,
  &.igd-shortcode-review,
  &.igd-shortcode-gallery {
    border: 1px solid #ddd;
    border-radius: .5rem;

    .igd-file-browser {
      align-items: stretch;

      .igd-file-browser-header,
      .igd-details {
        top: 0;
      }
    }
  }

  &.igd-shortcode-search {
    .igd-file-browser {
      &-header {
        height: 70px;

        .header-action {
          width: 100%;

          .igd-search-bar {
            margin-left: 0;
            width: 100%;
            height: 50px;
            position: relative;
          }
        }
      }
    }
  }

  &.igd-shortcode-audioVideo {
    overflow: hidden;
  }

  &.igd-shortcode-slider {
    overflow-y: unset;
  }

  &.igd-shortcode-media {
    border: 1px solid #eee;
    overflow-y: unset;
  }

}

.igd-video-player {
  video {
    position: static;
    transform: none;
  }

  audio {
    height: revert !important;
  }
}


.igd-embed-wrap {
  max-width: 100%;
  width: 100%;

  img, audio, video {
    max-width: 100%;
  }

  video {
    aspect-ratio: 16 / 9;
  }

  iframe {
    width: 100%;
    border: none;
    overflow: hidden;

    &[height=""] {
      aspect-ratio: 1.414 / 1;
      height: auto;
      max-height: 100vh;
    }

  }

}

// Gallery
.igd-gallery-item,
.igd-slider .slick-slide > div, {
  .igd-gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(#000, 0.5);
    transition: all .3s ease-in-out;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    padding: 15px;
    pointer-events: none;
    text-align: center;

    .overlay-title {
      font-weight: 500;
      margin-bottom: 5px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      min-height: 20px;
      font-size: 15px;
    }

    .overlay-description {
      margin-bottom: 7px;
      max-height: 100%;
      overflow: hidden;
      line-height: 1.2;
      font-size: 14px;

      &:last-child {
        margin-bottom: 0;
      }
    }

    .overlay-size {
      font-size: 13px;
      line-height: 1.5;
    }

    &.type-always {
      opacity: 1;
      top: auto;
      bottom: 0;
      height: auto;
      padding: 10px 15px;
      max-height: 40%;
    }

  }

  &:hover {
    .igd-gallery-item-overlay {
      opacity: 1;
    }
  }

}


// Access Denied Placeholder
.igd-password-protected,
.igd-email-required,
.igd-login-screen,
.igd-access-denied-placeholder {
  max-width: 500px;
  margin: 20px auto;
  padding: 2rem;
  background: #f1f1f1;
  border-radius: .5rem;
  text-align: center;

  & > img {
    max-width: 100px;
    margin-bottom: 15px;
  }

  h3 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
    margin-top: 10px;
  }

  p {
    font-size: 15px;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #555;
    padding-bottom: 0;
    line-height: normal;
  }

}

.igd-password-protected,
.igd-login-screen,
.igd-email-required {

  input {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: .5rem;
  }

  button {
    padding: 10px 20px;
    border: 0;
    border-radius: .5rem;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    transition: all .3s ease-in-out;
    height: 38px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    i {
      margin-top: -5px;
      margin-right: 7px;
    }

    img {
      margin-right: 5px;
      border: 1px solid #fff;
      border-radius: 50%;
      display: none;
    }

    &:hover {
      background: var(--color-primary-dark);
    }
  }

  form {
    display: flex;
    flex-direction: column;
    align-items: center;

    &.loading {
      button img {
        display: inline-block;
      }

      button i {
        display: none;
      }

    }

  }

  .igd-form-error {
    margin: 10px 0 0 0;
    color: #dc3545 !important
  }

}

.igd-login-screen {
  #igd-login-form {

    .login-username, .login-password {
      width: 100%;

      label {
        display: block;
        margin-bottom: 7px;
        font-weight: 500;
      }

      input {
        max-width: 400px;
      }

    }

    .login-remember {
      margin-bottom: 10px;

      input[type="checkbox"] {
        margin-right: 5px;
        width: 16px;
        height: 16px;
        margin-bottom: 0;
      }

      label {
        margin: 0;
        font-weight: normal;
        display: flex;
        align-items: center;
      }
    }

    .login-submit {
      margin-top: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;

      .igd-spinner {
        display: none;
        border-color: #FFF;
        border-top-color: #3498db;
        margin-right: 10px;
      }

      input[type="submit"] {
        width: 100px;
        background: var(--color-primary);
        color: #fff;
        padding: 10px 20px;
        border: 0;
        border-radius: 5px;
        cursor: pointer;
        transition: all .3s ease-in-out;

        &:hover {
          background: var(--color-primary-dark);
        }
      }
    }
  }

  .igd-login-link {
    margin: 10px auto;
    text-decoration: none !important;
    padding: 10px 20px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 5px;
    display: inline-block;
    transition: all .3s ease-in-out;

    &:hover {
      background: var(--color-primary-dark);
    }
  }

}


.igd-disqus-wrap {
  display: none;
}

// List style for view and download links
.igd-link {
  display: block;
}

.igd-list-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0;
  list-style: none;

  .igd-list-item {
    width: 100%;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: all .3s ease-in-out;
    font-size: 15px;
    padding: 10px;
    border: 0;
    border-bottom: 1px solid #ddd;
    border-radius: 0;

    a {
      text-decoration: none !important;
    }

    &:hover {
      background: #f9f9f9;
    }

    .item-icon {
      margin-right: 10px;
      width: 16px;
      height: 16px;
    }

    .item-name {
      margin-right: auto;
    }

    .item-action {
      margin-right: 15px;

      &:last-child {
        margin-right: 0;
      }
    }

    .igd-link {
      display: inline-block;
      margin-right: 1rem;
      text-decoration: none;
    }
  }

  a {
    text-decoration: none;
    color: #333;
  }

  &.list-style-1,
  &.list-style-3 {
    .item-action {
      &-text {
        display: none;
      }
    }
  }

  &.list-style-2,
  &.list-style-4, {
    .item-action {
      padding: 7px 10px;
      border: 0;
      border-radius: 7px;
      background: var(--color-primary);
      color: #fff;
      cursor: pointer;
      transition: all .3s ease-in-out;
      display: flex;
      align-items: center;
      justify-content: center;

      &:hover {
        background: var(--color-primary-dark);
      }

      i {
        margin-right: 5px;
      }

    }
  }

  &.list-style-3,
  &.list-style-4 {
    .igd-list-item {
      border: 1px solid #ddd;
      border-radius: .5rem;
      padding: 15px;
      margin-bottom: 10px;
    }
  }

}