@use '@inside-library/styles/mixins/partials/common-mixin' as *;

.custom-main-search {
  z-index: 10;
  position: fixed;
  top: 75px;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 9vh 0;
  background: var(--color-light);

  .field-search {
    input {
      padding: 0;
      padding-right: 5rem;
      font-size: 30px;

      @include mobile {
        font-size: 18px;
      }
    }

    &__dropdown {
      box-shadow: inherit;

      li {
        padding: 1.2rem 0;
      }
    }
  }

  &__cross {
    cursor: pointer;
    position: absolute;
    top: 3rem;
    right: 10%;
    padding: 1rem;
    color: var(--color-primary);

    @include transition(color 0.4s);

    span {
      margin-right: var(--spacing-s);
      font-size: var(--font-size-h5);
    }

    i {
      display: block;
      font-size: var(--font-size-h3);
      transform: rotate(45deg);
      transition: all 0.3s ease;

      @include transition(transform 0.4s);
    }

    &:hover {
      color: var(--color-secondary);

      i {
        transform: rotate(135deg);
      }
    }

    @include mobile {
      top: 1rem;

      span {
        display: none;
      }
    }
  }

  &__infos {
    width: 90%;
    margin: 3rem 0;
    text-align: center;

    @include mobile {
      margin: 2rem 0;
    }

    p {
      font-weight: 300;

      @include fontSize(26);

      @include mobile {
        font-size: var(--font-size-h4);
      }
    }

    &-filters {
      margin: 0 auto;
      margin-top: 1rem;
      max-width: 80%;

      @include mobile {
        width: 100%;
        max-width: 100%;
        margin: 0;
      }

      .filter-active {
        color: var(--color-primary);
      }

      .filter-slideshow {
        width: 100%;

        span {
          display: block;
        }
      }

      li {
        display: inline-block;
        padding: 1rem 2.8rem;
        cursor: pointer;
        color: var(--color-text);
        font-size: var(--font-size-h5);

        @include transition(all 0.3s);

        &:hover {
          color: var(--color-primary);
        }

        &:last-of-type {
          margin-right: 0;
        }
      }
    }
  }

  &__results {
    overflow-y: scroll;
    flex-grow: 1;
    width: 100%;
    max-height: 90%;

    > div {
      width: 90%;
      max-width: 950px;
      margin: auto;
    }

    @include scrollbar;

    &-loading {
      .loader-ui {
        width: 90px;
        margin-top: 13rem;
        padding-top: 10%;

        @include mobile {
          padding-top: 15%;
        }
      }
    }

    @include mobile {
      width: 90%;
    }

    &--empty {
      font-size: 25px;

      p {
        margin-top: 100px;
        color: var(--color-text);
      }
    }
  }

  .pagination-ui {
    margin-top: var(--spacing-l);
  }
}
