﻿.search {
  display: flex;
  align-items: center;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper.searching-input {
  padding: var(--Standart-l, 24px);
  position: absolute;
  top: 150px;
  left: 0;
  right: 0;
  bottom: 0;
  margin: var(--margin);
  transform: translateY(-200%);
  transition: transform 0.5s;
  opacity: 1;
  z-index: 110;

  height: 246px;
  padding: var(--Standart-l, 24px);
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  border-radius: var(--Standart-xs, 6px);
  background: var(--Default-white-1000, #FFF);    
  box-shadow: 0px 0px 13px 0px rgb(189 189 189 / 20%);
}

.search-wrapper.searching-input.expanded {
  transform: translateY(0);
}

.search-wrapper.searching-button.hidden {
  opacity: 0;
  z-index: -1;
  display: none;
}

.search-clear-button {
  display: none;
  z-index: -1;

  cursor: pointer;
}

.search-clear-button.show {
  display: block;
  opacity: 100%;
  z-index: 10;
}

.search-wrapper .search-container {
  display: flex;
  width: 100%;
  position: relative;
}

.search-wrapper .k-autocomplete {
  border: unset;
}

.search-wrapper #search {
  display: flex;
  height: 54px;
  padding: var(--Standart-m, 16px);
  padding-left: 46px;
  align-items: center;
  gap: var(--Standart-m, 16px);
  align-self: stretch;
  width: 100%;
  border-radius: var(--Standart-xs, 6px);
  background: var(--Default-black-40, rgba(0, 0, 0, 0.04));
  line-height: normal;

  border: unset;
}

.search-wrapper span.search-clear {
  position: absolute;
  top: 50%;
  display: flex;
}

.search-wrapper span.search-clear {
  right: calc(30% - 27px);
  width: 10px;
  height: 10px;
  background-image: url(/../images/buttons/close-icon.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transform: translateY(-50%);
  cursor: pointer;
}

.search-wrapper .search-icon-wrapper {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(4%) hue-rotate(329deg) brightness(90%) contrast(100%);

  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  z-index: 125;
  height: 56px;
}

.search-clear-text {
  position: absolute;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  z-index: 125;
  height: 56px;
}

.search-clear-text:hover .close-icon {
  filter: brightness(0) saturate(100%) invert(52%) sepia(7%) saturate(16%) hue-rotate(340deg) brightness(100%) contrast(91%);
}

.search-wrapper .search-icon-wrapper img {
  width: 20px;
  height: 20px;
}

.search-wrapper .search-icon.default {
  cursor: pointer;
}

.search-sections-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--Standart-, 12px);
  align-self: stretch;
}

.search-sections-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--Standart-xxs, 4px);
  align-self: stretch;
}

.search-catalog-tags {
  display: flex;
  align-items: flex-start;
  gap: var(--Standart-s, 8px);
  flex-wrap: wrap;
}

.search-catalog-tag {
  display: flex;
  align-items: flex-start;
  border-radius: var(--Standart-xxs, 4px);
  background: var(--Default-black-40, rgba(0, 0, 0, 0.04));

  display: flex;
  padding: var(--Standart-s, 8px) var(--Standart-m, 16px);
  justify-content: center;
  align-items: center;
  gap: 10px;

  color: var(--Default-black-200, rgba(0, 0, 0, 0.20));

  cursor: pointer;
  transition: all .2s ease-in-out;
}

.search-catalog-tag:hover {
  background: #0b0b0b;
  color: white;
}

@media (max-width: 1024px) {
  .search-wrapper.searching-input {
    padding: 10px 30px 10px 10px;
    left: -10px;
    right: -10px;
    height: fit-content;
  }

  .search-wrapper .search-icon-wrapper {
    padding: 6px;
  }

  .search-wrapper span.search-clear {
    right: 10px;
  }
}

/* Поиск в мобильной версии */

.search {
  display: flex;
  align-items: center;
}

.search-wrapper-mobile .f-logo-search-container {
  padding: 0;
  margin-bottom: 40px;
}

.search-wrapper-mobile {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.search-wrapper-mobile.searching-input {
  transform: translateX(-200%);
  opacity: 1;
  position: absolute;
  top: 72px;
  right: 0;
  z-index: 150;
  top: 0;
  background: white;
  box-shadow: 0px 0px 13px 0px rgb(189 189 189 / 20%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 450px;
  max-height: 100vh;
  min-height: 100vh;
  padding: 24px 16px;
}

.search-wrapper-mobile.searching-input.expanded {
  transform: translateX(0);
}

.search-wrapper-mobile.searching-button.hidden {
  opacity: 0;
  z-index: -1;
  display: none;
}

.search-mobile-clear-button {
  display: none;
  z-index: -1;
  cursor: pointer;
}

.search-mobile-clear-button.search-wrapper-close {
  transform: translateX(-200%);
  opacity: 0;
}

.search-mobile-clear-button.search-wrapper-close.show {
  transform: translateX(0);
  opacity: 1;
}

.search-mobile-clear-button.show {
  display: block;
  opacity: 100%;
  z-index: 140;
  border-radius: 6px;
  position: fixed;
  top: 0;
  left: 450px;
}

.search-mobile-clear-button.search-wrapper-close.show {
  padding: 0;

  cursor: pointer;
  height: auto;
  background: unset;
  border-radius: 0 4px 4px 0;
  padding-left: 16px;
  backdrop-filter: blur(3px);
  padding-bottom: 100vh;
  padding-top: 33px;
  padding-right: 800px;
}

.search-mobile-clear-button.search-wrapper-close.show .close-icon {
  filter: brightness(0) saturate(100%) invert(99%) sepia(1%) saturate(571%) hue-rotate(221deg) brightness(118%) contrast(100%);
}

.search-wrapper-mobile .search-container {
  display: flex;
  width: 100%;
  position: relative;

  margin-bottom: 8px;
}

.search-wrapper-mobile .k-autocomplete {
  border: unset;
}

.search-wrapper-mobile #search {
  display: flex;
  height: 54px;
  padding: var(--Standart-m, 16px);
  padding-left: 46px;
  align-items: center;
  gap: var(--Standart-m, 16px);
  align-self: stretch;
  width: 100%;
  border-radius: var(--Standart-xs, 6px);
  background: var(--Default-black-40, rgba(0, 0, 0, 0.04));
  line-height: normal;
  border: unset;
}

.search-wrapper-mobile span.search-clear {
  position: absolute;
  top: 50%;
  display: flex;
}

.search-wrapper-mobile span.search-clear {
  right: calc(30% - 27px);
  width: 10px;
  height: 10px;
  background-image: url(/../images/buttons/close-icon.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transform: translateY(-50%);
  cursor: pointer;
}

.search-wrapper-mobile .search-icon-wrapper {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(4%) hue-rotate(329deg) brightness(90%) contrast(100%);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  z-index: 125;
  height: 56px;
}

.search-clear-text {
  position: absolute;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  z-index: 125;
  height: 56px;
}

.search-clear-text:hover .close-icon {
  filter: brightness(0) saturate(100%) invert(52%) sepia(7%) saturate(16%) hue-rotate(340deg) brightness(100%) contrast(91%);
}

.search-wrapper-mobile .search-icon-wrapper img {
  width: 20px;
  height: 20px;
}

.search-wrapper-mobile .search-icon.default {
  cursor: pointer;
}

.search-wrapper-mobile .search-sections-container {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--Standart-, 12px);
  align-self: stretch;
}

.search-sections-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--Standart-xxs, 4px);
  align-self: stretch;
}

.search-catalog-tags {
  display: flex;
  align-items: flex-start;
  gap: var(--Standart-s, 8px);
  flex-wrap: wrap;
}

.search-catalog-tag {
  display: flex;
  align-items: flex-start;
  border-radius: var(--Standart-xxs, 4px);
  background: var(--Default-black-40, rgba(0, 0, 0, 0.04));
  display: flex;
  padding: var(--Standart-s, 8px) var(--Standart-m, 16px);
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--Default-black-200, rgba(0, 0, 0, 0.20));
  cursor: pointer;
  transition: all .2s ease-in-out;
}

.search-catalog-tag:hover {
  background: #0b0b0b;
  color: white;
}

.search-wrapper-mobile.searching-input {
  left: 0;
  height: fit-content;
}

.search-wrapper-mobile .search-icon-wrapper {
  padding: 6px;
}

.search-wrapper-mobile span.search-clear {
  right: 10px;
}

@media (max-width: 660px) {
  .search-wrapper-mobile.searching-input {
    width: 400px;
  }

  .search-mobile-clear-button.search-wrapper-close.show {
    padding-left: 16px;
    backdrop-filter: blur(3px);
    padding-bottom: 100vh;
    padding-top: 33px;
    padding-right: 400px;
  }

  .search-mobile-clear-button.show {
    left: 400px;
  }
}

@media (max-width: 590px) {
  .search-wrapper-mobile.searching-input {
    width: 312px;
  }

  .search-mobile-clear-button.search-wrapper-close.show {
    padding-left: 16px;
    backdrop-filter: blur(3px);
    padding-bottom: 100vh;
    padding-top: 33px;
    padding-right: 312px;
  }

  .search-mobile-clear-button.show {
    left: 312px;
  }
}

@media (max-width: 370px) {
  .search-wrapper-mobile.searching-input {
    width: 280px;
  }

  .search-mobile-clear-button.search-wrapper-close.show {
    padding-left: 16px;
    backdrop-filter: blur(3px);
    padding-bottom: 100vh;
    padding-top: 33px;
    padding-right: 280px;
  }

  .search-mobile-clear-button.show {
    left: 280px;
  }
}

@media (max-width: 330px) {
  .search-wrapper-mobile.searching-input {
    width: 100%;
  }

  .search-mobile-clear-button.search-wrapper-close.show {
    display: block;
    width: 40px;
    height: auto;
    position: absolute;
    z-index: 200;
    padding: 0;
    right: 24px;
    top: 12px;
    padding: 8px;
    background: black;
    border-radius: 6px;
    box-shadow: 0px 1px 9.8px 0px rgba(0, 0, 0, 0.05);
  }
}

