/* Manage Activity Tags */
#page-blocks-ned_teacher_tools-manage_activities_settings {
  .moodleform-tags-filter > * {
    margin-left: 25px;
  }

  #ned_moodleform_tags {
    margin-left: 20px;
    margin-right: 250px;

    .row_none_found {
      text-align: center;
      display: none;

      & > td {
        border-left: none;
        white-space: nowrap;
      }
    }

    th, td {
      position: relative;
    }

    .cell-name {
      text-align: left;
    }

    input.ned_tags_checkbox {
      position: absolute;
      left: -20px;
      height: 12px;
      width: 12px;
      top: calc(50% - 6px);
      margin: 0;
    }

    td.cell-tags > input[type=hidden] + select[ned_tags_selector]:nth-last-child(2),
    td.cell-tags > input[type=hidden] + select[ned_tags_selector] + a,
    td.cell-tags > .form-autocomplete-selection + div + ul.form-autocomplete-suggestions + a {
      display: none;
    }

    td.cell-tags {
      min-width: 100px;
      padding: 5px 5px 0 0;
      text-align: center;

      .badge.badge-info {
        margin: 0 !important;
      }

      & > .form-autocomplete-selection {
        min-height: 20px;
        max-width: 30vw;
        margin: 0;
        margin-bottom: 4px;

        & > .form-autocomplete-selection {
          white-space: nowrap;
          overflow-x: auto;
          margin: 0;
        }

        & + div {
          position: absolute !important;
          left: 100%;
          left: calc(100% + 20px);
          top: 0;
          height: 100%;
          width: 50%;
          padding: 0;
          max-width: 140px;
          margin-right: 0;

          & > input {
            position: absolute;
            top: 50% !important;
            transform: translateY(-50%);
            margin: 0;
            height: 38px;
            box-sizing: border-box;
          }

          & > .form-autocomplete-downarrow {
            top: 5px;
            left: 100%;
          }

          & + ul.form-autocomplete-suggestions {
            margin: 0;
            left: 100%;
            /* calc don't work in some themes */
            left: calc(100% + 20px);
            max-width: 140px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            width: 50%;
            min-width: 140px;
            border-width: 1px;
            top: calc(50% + 19px);

            &:focus {
              outline: none;
            }
          }
        }
      }
    }
  }

  #manage_activities_settings {
    text-align: center;

    .moodleform-tags-filter {
      text-align: left;
      display: flex;
      align-items: flex-start;
      margin: 10px 0;

      .filter-element {
        display: flex;
        align-items: center;
        height: 30px;
      }

      label {
        margin-right: 10px;
        margin-bottom: 0;
      }

      input, select {
        margin: 0;
      }

      .filter_by_name {
        input[type='text'] {
          order: 3;
          box-sizing: border-box;
        }

        input[type='checkbox'] {
          order: 1;
          margin-left: 20px;
          margin-right: 5px;
        }

        label {
          order: 2;
        }

        .filter-element:not(:last-child) {
          margin-bottom: 10px;
        }
      }
    }

    .table-moodleform-tags {
      display: inline-block;
    }

    .form-autocomplete-suggestions {
      li {
        background-color: unset;

        &:hover {
          background-color: #00a3f4;
          color: #fff;
        }
      }
    }

    /**/
    .bulk_edit {
      display: flex;
      width: 80%;
      max-width: 80%;
      margin: auto;
      min-width: 900px;
      margin-top: 20px;

      & > .fitem_tags {
        display: flex;
        width: 50%;
        max-width: 50%;

        & > .fitemtitle {
          width: unset;
        }

        & > .ftags {
          margin-left: 20px;

          .form-autocomplete-suggestions {
            margin-top: -10px;

            & + div input.form-control {
              margin: 0;
            }
          }
        }

        .ftags .form-autocomplete-downarrow {
          left: 100%;
          top: 0;
        }
      }

      & > .fitem {
        width: 50%;
        margin: 0;
        flex-wrap: nowrap;

        & > .col-md-3 {
          display: inline;
          width: unset;
          max-width: unset;
          flex: unset;
          padding: 0;
        }

        & > .col-md-9 {
          max-width: 50%;
          flex: 50%;
          padding: 0;

          .form-autocomplete-selection {
            display: inline-block;
            width: unset !important;
          }
        }
      }

      & > .fitem_tags .ftags > a,
      .felement[data-fieldtype="tags"] a,
      & > .fitem_tags .ftags > input[type=hidden] + select[ned_tags_selector]:nth-last-child(2) {
        display: none;
      }
    }

    /**/
    #fitem_fgroup_id_buttonar {
      justify-content: unset;
      background: none;
      border: none;
      padding: 0;
      margin-top: 20px;

      & > div:first-child {
        display: none;
      }

      & > .felement.fgroup {
        margin-left: 0;
      }
    }

    #fgroup_id_buttonar {
      justify-content: unset;
      background: none;
      border: none;
      padding: 0;

      &.row > div {
        border: none;
        margin-top: 20px;

        &:first-child {
          display: none;
        }
      }

      & > .felement.fgroup {
        margin-left: 0;
      }
    }
  }
}
/* Manage Activity Tags End */
