.wps-p-0{
  .c-footer {
    padding: 20px 0 0;
  }
}


.c-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px 0;

  @media screen and (min-width: 450px) {
    flex-wrap: nowrap;
  }
}

.c-footer__filter {
  position: relative;
  z-index: 1;
}

.c-footer__more__link {
  font-weight: 500;
  font-size: 12px;
  line-height: 14px;
  color: $primary-color;
  transition: 0.22s;

  svg {
    margin-left: 8px;
    transition: 0.22s;
  }

  &:hover {
    color: $dark-color;

    svg path {
      fill: $dark-color;
    }
  }
}

.c-footer__filter__btn {
  background-color: transparent;
  border: transparent;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: 0.2s;
  font-size: 13px;

  &:hover {
    color: $primary-color;

    &::after {
      border-top-color: $primary-color;
    }
  }

  &::after {
    margin-left: 3px;
    content: "\f142";
    display: inline-block;
    font: normal 22px/1 dashicons;
    transform-origin: center center;
    transition: 0.1s;
    transform: rotate(180deg);
  }
}

.c-footer__filters {
  opacity: 0;
  transform: translateY(-5px);
  visibility: hidden;
  transition: 0.22s;
  position: absolute;
  bottom: 170%;
  left: 0;
  background-color: $white-color;
  box-shadow: 0 0 12px 1px rgba(0, 0, 0, 0.07);
  border-radius: 8px;
  overflow: hidden;
  min-width: 200px;
}

.c-footer__filter.is-active {
  z-index: 999;

  .c-footer__filters {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .c-footer__filter__btn::after {
    transform: rotate(0);
  }
}

.c-footer__filter.is-down {
  .c-footer__filters {
    bottom: unset;
    top: 170%;
  }
}

.c-footer__filters__current-filter {
  background: linear-gradient(360deg, #F8F8F8 0%, rgba(245, 245, 245, 0) 23.33%);
  border-radius: 8px 8px 0px 0px;
  margin: 1px 1px 0;
  padding: 10px 16px;
}

.c-footer__filters__current-filter, .c-footer__current-filter__date-range {
  font-weight: 500;
  font-size: 11px;
  line-height: 180%;
  display: block;
}

.c-footer__current-filter__date-range {
  margin-top: 6px;
  font-size: 12px;
  display: block;
}

.c-footer__filters__list {
  display: flex;
  flex-direction: column;
}

.c-footer__filters__list-item {
  background-color: transparent;
  border: none;
  text-align: left;
  padding: 5px 15px;
  font-weight: 500;
  font-size: 11px;
  line-height: 170%;
  color: $dark-secondary-color;
  transition: 0.15s;
  cursor: pointer;

  &:hover {
    background-color: $light-secondary-color;
  }

  &.is-selected {
    color: $primary-color;
  }
}

.c-footer__filters__more-filters {
  position: absolute;
  width: 100%;
  height: calc(100% - 52.6px);
  top: 0;
  left: 0;
  background-color: $white-color;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translatey(7px);
  transition: 0.22s;

  &.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  .c-footer__filters__list-item:first-child {
    margin-top: 10px;
  }
}

.wps-wrap , #dashboard-widgets-wrap{
  input[type="text"].c-footer__filters__custom-date-input {
    height: 0;
    min-height: 0 !important;
    width: 0;
    visibility: hidden;
    padding: 0 !important;
    margin: 0 !important;
    position: absolute;
    right: -10px;
    top: 0;
  }
}

.c-footer__filters__close-more-filters {
  font-size: 11px;
  line-height: 170%;
  padding: 8px 15px;
  margin-top: auto;
  background-color: transparent;
  border: none;
  text-align: left;
  color: $dark-secondary-color;
  display: flex;
  align-items: center;
  cursor: pointer;

  &:before {
    content: "";
    width: 16px;
    height: 16px;
    background: url(data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjE3IiBoZWlnaHQ9IjE3IiB2aWV3Qm94PSIwIDAgMTcgMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04LjMzMzIyIDEwLjYxMTFMMTEuNDQ0NCA3LjVMMTIuMzMzMyA4LjM4ODg5TDguMzMzMjIgMTIuMzg4OUw0LjMzMzI1IDguMzg4ODlMNS4yMjIxNCA3LjVMOC4zMzMyMiAxMC42MTExWiIgZmlsbD0iIzU2NTg1QSIvPgo8L3N2Zz4K) center center no-repeat;
    transform: rotate(90deg);

    .rtl &{
      transform: rotate(-90deg);
    }
  }

  &:hover {
    background-color: $light-secondary-color;
  }

  svg {
    transform: rotate(90deg);
    margin-right: 8px;
  }
}

.c-footer__filters__list-item--more {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: $dark-secondary-color;
  transition: 0.15s;
  cursor: pointer;

  &:after{
    content: "";
    width: 16px;
    height: 16px;
    background: url(data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjE3IiBoZWlnaHQ9IjE3IiB2aWV3Qm94PSIwIDAgMTcgMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04LjMzMzIyIDEwLjYxMTFMMTEuNDQ0NCA3LjVMMTIuMzMzMyA4LjM4ODg5TDguMzMzMjIgMTIuMzg4OUw0LjMzMzI1IDguMzg4ODlMNS4yMjIxNCA3LjVMOC4zMzMyMiAxMC42MTExWiIgZmlsbD0iIzU2NTg1QSIvPgo8L3N2Zz4K) center center no-repeat;
    transform: rotate(0deg);
  }
}

.c-footer__filters__list-item--custom {
  padding: 14px 16px;
  border-top: 1px solid rgba(218, 220, 224, 0.45);
  margin-top: 5px;
}

.c-footer__filter__btn-group {
  display: flex;
  align-items: center;

  .c-footer__filter__btn {
    padding: 9px 13px;
    border-top: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
    font-weight: 500;
    font-size: 11px;
    background-color: #fff;
    color: #242A31;

    &:hover {
      background-color: $light-secondary-color;
    }

    svg {
      margin-right: 4px;
    }

    &:after {
      content: unset;
    }
  }

  .c-footer__filter__btn--sm {
    max-height: 28px;
    height: 28px;

    &:first-child {
      border: 1px solid #aaa;
      border-radius: 3px 0 0 3px;
    }

    &:last-child {
      border: 1px solid #aaa;
      border-radius: 0 3px 3px 0;
    }

    svg {
      margin-right: 0;
    }
  }
}

.rtl {

  .c-footer__filters {
    left: unset;
    right: 0;
  }

  .c-footer__filter__btn--sm {
    svg {
      transform: rotate(180deg);
    }

    &:first-child {
      border: 1px solid #aaa;
      border-radius: 0 3px 3px 0;
    }

    &:last-child {
      border: 1px solid #aaa;
      border-radius: 3px 0 0 3px;
    }
  }

  .c-footer__filter.js-pages-date-range-picker {
    overflow: hidden;
  }

  .c-footer__filter__btn-group {
    svg {
      margin-right: 0;
      margin-left: 4px;
    }
  }

  .wps-wrap input[type="text"].c-footer__filters__custom-date-input {
    right: 160px;
  }
}

.wps_page #wpfooter {
  margin-left: 0;
  position: absolute !important;
}