@use "_variables" as *;
@use "_mixins" as *;
@use "_form-mixins" as *;

my-timestamp-input {
  width: 100px;
}

.header,
.dropdown-item,
.input-container,
.new-playlist-block {
  padding: 8px 24px;
}

.dropdown-item:active {
  color: inherit;
}

.header {
  min-width: 240px;
  margin-bottom: 10px;
  border-bottom: 1px solid $separator-border-color;

  .first-row {
    display: flex;
    align-items: center;

    .title {
      font-size: 18px;
      flex-grow: 1;
    }
  }
}

.playlists {
  max-height: 200px;
  overflow-y: auto;
}

.playlist {
  padding: 0;

  > .primary-row {
    padding: 8px 10px 8px 24px;
  }

  > .optional-rows {
    @include padding-left(24px);
  }

  &.has-optional-row:hover {
    background-color: inherit;
  }
}

.primary-row {
  display: flex;
  width: 100%;

  my-peertube-checkbox {
    align-self: center;

    @include margin-right(10px);
  }

  .display-name {
    display: flex;
    align-items: flex-end;
    flex-grow: 1;
    margin: 0;
    font-weight: $font-regular;
    cursor: pointer;
    font-size: 1rem;
  }

  .optional-row-icon {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;

    @include margin-left(0.5rem);

    my-global-icon {
      position: relative;
      top: 1px;
      width: 19px;
      height: 19px;
      color: pvar(--fg-400);

      @include margin-right(0);
    }

    &:hover {
      opacity: 0.8;
    }
  }
}

.optional-rows {
  display: grid;
  grid-template-columns: 35px 105px 105px;
  row-gap: 3px;
  column-gap: 10px;
  align-items: center;

  my-peertube-checkbox {
    @include margin-left(auto);
  }

  .header-label {
    font-size: 13px;
    color: pvar(--fg-300);
    padding-left: 2px;

    &:nth-child(1) {
      grid-column: 2;
    }

    &:nth-child(2) {
      grid-column: 3;
    }
  }
}

.new-playlist-button,
.new-playlist-block {
  padding-top: 10px;
  border-top: 1px solid $separator-border-color;
}

.new-playlist-button {
  cursor: pointer;

  my-global-icon {
    position: relative;
    left: -1px;
    top: -1px;
    width: 21px;
    height: 21px;
    line-height: 21px;
    display: inline-block;
    color: pvar(--fg-400);

    @include margin-right(13px);
  }
}

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