@import '_variables';
@import '_mixins';

.videos-header {
  display: flex;
  justify-content: space-between;
  margin: 20px 0 50px;

  h1,
  .fake-element {
    flex: 1;
    font-size: 1.5rem;
  }

  input[type=text] {
    @include peertube-input-text(300px);
  }
}

.action-button-delete-selection {
  display: inline-block;

  @include peertube-button;
  @include orange-button;
  @include button-with-icon(21px);

  my-global-icon {
    @include apply-svg-color(#fff);
  }
}

::ng-deep {
  .video {
    flex-wrap: wrap;
  }

  .action-button span {
    white-space: nowrap;
  }

  .video-miniature {
    &.display-as-row {
      // width: min-content !important;
      width: 100% !important;

      .video-bottom .video-miniature-information {
        width: max-content !important;
        min-width: unset !important;
      }
    }

    .video-bottom {
      max-width: 350px;
    }
  }
}

.action-button {
  display: flex;
  margin-left: 55px;
  margin-top: 10px;
  align-self: flex-end;
}

my-delete-button,
my-edit-button {
  margin-right: 10px;
}

@media screen and (max-width: $small-view) {
  .videos-header {
    flex-direction: column;
  }

  .action-button {
    flex-direction: column;
    align-self: center;
    margin-left: 0px;
  }

  ::ng-deep {
    .video-miniature {
      align-items: center;

      .video-bottom,
      .video-bottom .video-miniature-information {
        /* same width than a.video-thumbnail */
        max-width: $video-thumbnail-width !important;
      }
    }
  }

  my-delete-button,
  my-edit-button {
    margin-right: 0px;

    ::ng-deep {
      span, a {
        margin-right: 0px;
      }
    }
  }

  my-delete-button,
  my-edit-button,
  my-button {
    margin-top: 15px;
    width: 100%;
    text-align: center;

    ::ng-deep {
      .action-button {
        /* same width than a.video-thumbnail */
        width: $video-thumbnail-width;
      }
    }
  }
}

// Adapt my-video-miniature on small screens with menu
@media screen and (min-width: $small-view) and (max-width: #{breakpoint(lg) + ($not-expanded-horizontal-margins / 3) * 2}) {
  :host-context(.main-col:not(.expanded)) {
    ::ng-deep {
      .video-miniature {
        flex-direction: column;

        .video-miniature-name {
          max-width: $video-thumbnail-width;
        }
      }
    }
  }
}
