@use "../variables" as vars;

.pagination-wrapper {
  display: flex;
  position: fixed;
  background: var(--pagination-background-color);
  bottom: 0;
  right: 0;
  width: 100%;
  left: 0px;
  height: var(--pagination-height);
  padding-left: var(--main-menu-width);
  text-align: left;
  border-top: 1px solid var(--pagination-border-color, --border-color);
  z-index: 10;
}

.pagination {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-2);

  a,
  span,
  em {
    font-size: var(--font-size_medium);
    font-weight: var(--font-weight_normal);
    color: var(--icon-color);
    padding: var(--spacing-1);
    margin: var(--spacing-0);
    border-radius: var(--border-radius_medium);
  }

  a:hover {
    color: var(--text-color);
    background-color: var(--border-color);
    text-decoration: none;
  }

  span a {
    padding: 0;
  }

  .arrows {
    display: inline-flex;
    flex-wrap: nowrap;
  }

  .pages {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    overflow-y: visible;
    max-width: 75%;

    @media screen and (max-width: vars.$large-screen-break-point) {
      max-width: 60vw;
    }
  }

  .page {
    padding: var(--spacing-1) var(--spacing-2);
    text-align: center;
  }

  .current {
    color: var(--pagination-active-text-color);
    background-color: var(--pagination-active-bg-color);
    cursor: default;
  }

  .previous_page {
    margin-right: var(--spacing-2);
  }

  .next_page {
    margin-left: var(--spacing-2);
  }

  .disabled {
    color: var(--pagination-disabled-text-color);
  }

  .gap {
    border: none;
    background: transparent;
    cursor: default;
    margin: 0;
    color: var(--pagination-disabled-text-color);
  }

  .next_page,
  .previous_page,
  .first-page,
  .last-page,
  .gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .icon {
    fill: currentColor;
  }
}

.per-page-select-form {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  justify-content: end;
  width: var(--sidebar-width);
  margin-left: auto;
  padding: var(--spacing-2);

  @media screen and (max-width: vars.$large-screen-break-point) {
    --sidebar-width: auto;

    label span {
      display: none;
    }
  }

  @media screen and (max-width: vars.$medium-screen-break-point) {
    display: none;
  }
}

#assign_image_list .pagination-wrapper,
#assign_file_list .pagination-wrapper {
  position: absolute;
  padding-left: 0;
  padding-right: 0;
}
