.cpe-search {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
}

.cpe-search *,
.cpe-search *::before,
.cpe-search *::after {
  box-sizing: border-box;
}

.cpe-search__form {
  display: flex;
  overflow: visible;
  width: 100%;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.cpe-search__input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 10px 20px;
  border: 1px solid rgba(22, 33, 57, 0.1);
  border-radius: 50px 0 0 50px;
  outline: 0;
  background: #fff;
  color: rgba(22, 33, 57, 0.78);
  box-shadow: none;
  font: 400 14px/1.2 Poppins, sans-serif;
  appearance: none;
}

.cpe-search__input::placeholder {
  color: rgba(22, 33, 57, 0.48);
  opacity: 1;
}

.cpe-search__input:focus {
  border-color: #e62c3b;
  box-shadow: 0 0 0 2px rgba(230, 44, 59, 0.12);
}

.cpe-search__button {
  display: inline-grid;
  flex: 0 0 65px;
  width: 65px;
  height: 44px;
  place-items: center;
  margin: 0;
  padding: 10px 20px;
  border: 0;
  border-radius: 0 50px 50px 0;
  background: #e62c3b;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
}

.cpe-search__button:hover,
.cpe-search__button:focus-visible {
  color: #fff;
  background: #cf2432;
}

.cpe-search__button:focus-visible {
  outline: 2px solid #162139;
  outline-offset: 2px;
}

.cpe-search__button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.cpe-search__preview {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 999;
  max-height: min(440px, 65vh);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #e8e8ec;
  border-radius: 14px;
  background: #fff;
  color: #162139;
  box-shadow: 0 18px 46px rgba(22, 33, 57, 0.18);
}

.cpe-search__result {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  color: #162139;
  text-decoration: none;
}

.cpe-search__result:hover,
.cpe-search__result:focus-visible {
  background: #f7f7f9;
}

.cpe-search__thumb {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 7px;
  background: #f6f6f8;
}

.cpe-search__result-title {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpe-search__result-meta {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #7b8491;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpe-search__all {
  display: block;
  padding: 13px 14px;
  border-top: 1px solid #eceef1;
  color: #e62c3b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.cpe-search__all:hover,
.cpe-search__all:focus-visible {
  background: #fff6f7;
}

.cpe-search__empty,
.cpe-search__loading {
  padding: 20px;
  color: #7b8491;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 767px) {
  .cpe-search__preview {
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    max-height: min(440px, 60vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cpe-search *,
  .cpe-search *::before,
  .cpe-search *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
