/* old */

.popup-search {
  position: absolute;

  left: 0;

  width: calc(100% + 2 * var(--wrap));

  margin: 0;

  margin-left: calc(-1 * var(--wrap));

  background-color: var(--color-white);

  -webkit-transition: -webkit-transform 0.3s ease;

  transition: -webkit-transform 0.3s ease;

  transition: transform 0.3s ease;

  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

@media (min-width: 900px) {
  .popup-search {
    top: 100%;

    z-index: -1;

    padding: 2.25rem 0 8.25rem;

    -webkit-transform: translateY(-100%);

    transform: translateY(-100%);
  }
}

@media (max-width: 899px) {
  .popup-search {
    top: 0;

    display: -webkit-box;

    display: -ms-flexbox;

    display: flex;

    -webkit-box-align: center;

    -ms-flex-align: center;

    align-items: center;

    left: calc(100% + 2 * var(--wrap) + 5px);

    z-index: 3;

    height: 100%;

    padding: 1rem 0 1rem;
  }
}

@media (min-width: 900px) {
  .popup-search._opened {
    -webkit-transform: translateY(0);

    transform: translateY(0);
  }
}

@media (max-width: 899px) {
  .popup-search._opened {
    -webkit-transform: translateX(calc(-100% - 5px));

    transform: translateX(calc(-100% - 5px));
  }
}

.popup-search__wrapper {
  position: relative;

  width: 100%;
}

@media (min-width: 900px) {
  .popup-search__wrapper {
    max-width: 51.666%;

    margin: 0 auto;
  }
}

@media (max-width: 899px) {
  .popup-search__wrapper {
    padding: 0 var(--wrap);
  }
}

.popup-search__close {
  position: absolute;

  z-index: 1;

  top: 0;

  right: 0;

  display: -webkit-box;

  display: -ms-flexbox;

  display: flex;

  width: 1.5rem;

  height: 100%;

  padding: unset;

  border: unset;

  border-radius: unset;

  background-color: unset;

  -webkit-box-pack: center;

  -ms-flex-pack: center;

  justify-content: center;

  -webkit-box-align: center;

  -ms-flex-align: center;

  align-items: center;
}

@media (min-width: 900px) {
  .popup-search__close {
    padding-bottom: 1.0625rem;
  }
}

@media (max-width: 899px) {
  .popup-search__close {
    right: var(--wrap);

    padding-bottom: 0.5rem;
  }
}

.popup-search__close img,
.popup-search__close svg {
  width: 100%;

  height: auto;

  -webkit-transition: -webkit-transform 0.6s ease;

  transition: -webkit-transform 0.6s ease;

  transition: transform 0.6s ease;

  transition: transform 0.6s ease, -webkit-transform 0.6s ease;
}

html:not(.v-mobile) .popup-search__close:hover img {
  -webkit-transform: rotate(90deg);

  transform: rotate(90deg);
}

.popup-search__close:focus-visible svg {
  -webkit-transform: rotate(90deg);

  transform: rotate(90deg);
}

html:not(.v-mobile) .popup-search__close:hover img {
  -webkit-transform: rotate(90deg);

  transform: rotate(90deg);
}

.popup-search__close:focus-visible svg {
  -webkit-transform: rotate(90deg);

  transform: rotate(90deg);
}

.popup-search__form {
  position: relative;

  z-index: 0;

  width: 100%;
}

@media (min-width: 900px) {
  .popup-search__form button[type="submit"],
  .popup-search__form input[type="submit"] {
    padding-bottom: 1.0625rem;
  }
}

@media (max-width: 899px) {
  .popup-search__form button[type="submit"],
  .popup-search__form input[type="submit"] {
    padding-bottom: 0.5rem;
  }
}

.popup-search__form button[type="submit"] img,
.popup-search__form button[type="submit"] svg,
.popup-search__form input[type="submit"] img,
.popup-search__form input[type="submit"] svg {
  width: 100%;

  height: auto;
}

.popup-search__form button[type="submit"] img path,
.popup-search__form button[type="submit"] img circle,
.popup-search__form button[type="submit"] svg path,
.popup-search__form button[type="submit"] svg circle,
.popup-search__form input[type="submit"] img path,
.popup-search__form input[type="submit"] img circle,
.popup-search__form input[type="submit"] svg path,
.popup-search__form input[type="submit"] svg circle {
  -webkit-transition: stroke 0.3s ease;

  transition: stroke 0.3s ease;
}

/* new */

.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.search-modal::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background-image: url("../../assets/bigLogo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.05;
  z-index: 1;
  pointer-events: none;
}

.search-modal._opened {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.search-modal__container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  background-color: var(--color-white);
  padding: 60px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-grey-050);
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-modal._opened .search-modal__container {
  transform: translateY(0);
}

.search-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: var(--color-blue-200);
  border: none;
  cursor: pointer;
  color: var(--color-white);
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  z-index: 10;
}

.search-modal__close:hover {
  background-color: var(--color-black);
}

.search-modal__close svg,
.search-modal__close img {
  width: 20px;
  height: 20px;
  transition: transform 0.4s ease;
  display: block;
}

.search-modal__close:hover svg,
.search-modal__close:hover img {
  transform: rotate(90deg);
}

.search-modal__title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-grey-300);
  margin-bottom: 2rem;
  font-weight: 600;
  text-align: left;
}

.search-modal__form-wrapper {
  position: relative;
  width: 100%;
}

.search-modal__form-wrapper form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
}

.search-modal__form-wrapper input[type="search"],
.search-modal__form-wrapper input[type="text"] {
  width: 100%;
  height: 80px;
  font-family: "Roboto", sans-serif;
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--color-black);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-grey-200);
  border-radius: 0;
  padding: 0 60px 0 0;
  margin: 0;
  transition: border-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.search-modal__form-wrapper input[type="search"]::-webkit-search-decoration,
.search-modal__form-wrapper input[type="search"]::-webkit-search-cancel-button,
.search-modal__form-wrapper input[type="search"]::-webkit-search-results-button,
.search-modal__form-wrapper
  input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.search-modal__form-wrapper input[type="search"]:focus,
.search-modal__form-wrapper input[type="text"]:focus {
  outline: none;
  border-color: var(--color-blue-100);
}

.search-modal__form-wrapper input::placeholder {
  color: var(--color-grey-200);
  opacity: 1;
  font-weight: 100;
}

.search-modal__form-wrapper button[type="submit"],
.search-modal__form-wrapper input[type="submit"] {
  position: absolute;
  top: 0;
  right: 0 !important;
  bottom: 0;
  width: 50px;
  height: 100%;
  margin: 0 !important;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue-200);
  transition: transform 0.3s ease, color 0.3s ease;
  z-index: 10;
}

.search-modal__form-wrapper button[type="submit"] svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.5px;
  display: block;
}

.search-modal__form-wrapper button[type="submit"]:hover {
  color: var(--color-black);
  transform: scale(1.1);
}

@media (max-width: 900px) {
  .search-modal__container {
    padding: 40px 20px;
    max-width: 90%;
  }

  .search-modal__form-wrapper input[type="search"],
  .search-modal__form-wrapper input[type="text"] {
    font-size: 1.75rem;
    height: 60px;
  }

  .search-modal__close {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 600px) {
  .search-modal {
    align-items: flex-start;
    padding-top: 0;
  }

  .search-modal__container {
    padding: 80px 20px 40px;
    max-width: 100%;
    height: auto;
    min-height: 50vh;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid var(--color-grey-050);
  }

  .search-modal__form-wrapper input[type="search"],
  .search-modal__form-wrapper input[type="text"] {
    font-size: 1.5rem;
  }
}
