@use '../../abstracts/variables' as *;

// -----------------------------------------------------------------------------
// Lesson Bank: admin page for searching and importing lessons
// Page: lessonbank.php
// -----------------------------------------------------------------------------

#page-mod-minilesson-lessonbank {

  #fgroup_id_searchgroup {
    background-color: $grey-300;
    padding: 15px;
    margin: 0;
  }

  #advancesearch {
    padding: 15px;
    background-color: $grey-300;

    #fitem_id_level {
      padding: 0 15px;

      .col-md-3 {
        max-width: 100px;
      }
    }
  }

  #fgroup_id_searchgroup .col-md-3 {
    max-width: 100px;
  }

  .searchbox .itemcontainer {
    padding: 10px 0;
    margin: 0;
    border: 1px solid $grey-border;
    border-radius: 4px;
    flex: 1;
  }

  [data-region="cards-container"] {
    min-height: 100px;

    p {
      margin-bottom: 0.2rem;
    }

    [data-action="showtext"] {
      background-color: transparent;
      border: none;
      color: $link-blue;
      box-shadow: none;
    }
  }

  .searchbox [data-region="itemcard"] {
    max-width: calc(50% - 2px);
    margin-top: 2px;
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;

    [data-region="image"] {
      gap: 3px;
    }
  }

  [data-for="page-activity-header"] {
    display: none;
  }

  .lessonbanklayoutbox {
    border: 1px solid $grey-border;
    border-radius: 10px;
    overflow: hidden;
  }

  .listlayoutbtn,
  .gridlayoutbtn {
    border: 0;

    &:focus {
      box-shadow: unset;
      outline: none;
    }

    &.active {
      background-color: $link-blue;
      color: $white;
      border: 1px solid $link-blue;
      box-shadow: unset;

      &:focus {
        background-color: $link-blue;
        color: $white;
        border: 1px solid $link-blue;
        box-shadow: unset;
      }
    }
  }

}

// -----------------------------------------------------------------------------
// DataTables pagination: reports page
// -----------------------------------------------------------------------------

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button {
  border: 1px solid $primary-border !important;
  border-radius: 6px !important;
  background: $white !important;
  color: $primary !important;
  font-weight: 500;
  margin: 0 2px;
  box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button:hover {
  background: $primary-bg !important;
  border-color: $primary !important;
  color: $primary !important;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.current,
.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.current:hover {
  background: $primary !important;
  border-color: $primary !important;
  color: $white !important;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.next {
  border: none !important;
  background: transparent !important;
  color: $primary !important;
  font-size: 14px;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.previous:hover,
.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.next:hover {
  background: transparent !important;
  color: $primary-hover !important;
  border: none !important;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.disabled {
  color: $grey-muted !important;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.previous.disabled,
.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.next.disabled {
  color: $text-muted !important;
  border: none !important;
  background: transparent !important;
  cursor: default;
}

// Lessonbank (continued)

#page-mod-minilesson-lessonbank {

  .listlayout .listtable {

    .imgcolumn {
      width: 200px;
      padding: 10px;
      vertical-align: middle;

      img.searchimg {
        width: 100%;
        height: auto;
      }
    }

    tr td,
    tr th {
      vertical-align: middle;
    }

    th:last-child,
    td:last-child {
      width: 200px;
      white-space: nowrap;
    }

    .listdescription {
      width: 200px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .levelcolumn,
    .langcolumn {
      white-space: nowrap;
    }
  }
}
