html.wm2-search-open,
body.wm2-search-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.wm2-search-open {
  touch-action: none;
}

[data-wm2-search-trigger][data-wm2-pointer-focus-restored]:focus,
[data-wm2-search-trigger][data-wm2-pointer-focus-restored]:focus-visible {
  outline: none;
  box-shadow: none;
  color: inherit;
}

.wm2-search {
  --wm2-search-inline-start: max(var(--wm2-header-inline-gap), env(safe-area-inset-left, 0px));
  --wm2-search-inline-end: max(var(--wm2-header-inline-gap), env(safe-area-inset-right, 0px));
  --wm2-search-panel-shadow: 0 28px 90px rgba(20, 16, 13, 0.26);
  --wm2-search-backdrop: rgba(25, 21, 18, 0.42);
  --wm2-search-field-line: rgba(40, 35, 31, 0.32);
  --wm2-search-placeholder: #8a827b;
  --wm2-search-enter-duration: 200ms;
  --wm2-search-control-duration: 180ms;
  --wm2-search-control-ease: ease;
  --wm2-search-panel-top: calc(
    var(--wm2-header-top-gap) + env(safe-area-inset-top, 0px) + 76px
  );
  box-sizing: border-box;
  position: fixed;
  z-index: 100;
  top: var(--wm2-search-panel-top);
  right: auto;
  bottom: auto;
  left: var(--wm2-search-inline-start);
  display: block;
  width: min(
    720px,
    calc(100% - var(--wm2-search-inline-start) - var(--wm2-search-inline-end))
  );
  height: auto;
  max-width: none;
  max-height: calc(
    var(--wm2-search-viewport-height, 100svh)
    - var(--wm2-search-panel-top)
    - max(10px, env(safe-area-inset-bottom, 0px))
  );
  margin: 0;
  padding: 22px 20px 20px;
  border: 1px solid var(--wm2-line);
  border-radius: var(--wm2-header-radius);
  background: var(--wm2-paper);
  box-shadow: var(--wm2-search-panel-shadow);
  color: var(--wm2-ink);
  font-family: var(--wm2-font);
  font-synthesis: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  animation: wm2-search-enter var(--wm2-search-enter-duration) var(--wm2-ease) both;
}

.wm2-search:not([open]) {
  display: none;
}

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

.wm2-search :where(button, input) {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.wm2-search :where(button) {
  padding: 0;
  cursor: pointer;
}

.wm2-search :where(p, h2) {
  margin: 0;
}

.wm2-search__panel {
  width: 100%;
}

.wm2-search__backdrop {
  display: none;
}

.wm2-search__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.wm2-search__eyebrow {
  margin-bottom: 7px;
  color: var(--wm2-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.wm2-search__heading h2 {
  font-size: clamp(21px, 5.6vw, 27px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.wm2-search__close {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -9px -8px 0 0;
  transition: color var(--wm2-search-control-duration) var(--wm2-search-control-ease);
}

.wm2-search[data-open-modality="pointer"] .wm2-search__close:focus {
  outline: none;
  box-shadow: none;
  color: var(--wm2-ink);
}

.wm2-search__form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.wm2-search__field {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 40px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--wm2-search-field-line);
  transition:
    border-color var(--wm2-search-control-duration) var(--wm2-search-control-ease),
    box-shadow var(--wm2-search-control-duration) var(--wm2-search-control-ease);
}

.wm2-search__field:focus-within {
  border-color: var(--wm2-accent);
  box-shadow: 0 1px 0 var(--wm2-accent);
}

.wm2-search__field > .wm2-icon {
  width: 21px;
  height: 21px;
  color: var(--wm2-muted);
}

.wm2-search__input {
  min-width: 0;
  width: 100%;
  height: 52px;
  padding: 0 10px;
  outline: 0;
  font-size: 17px;
  font-weight: 450;
  line-height: 1.35;
}

.wm2-search__input::placeholder {
  color: var(--wm2-search-placeholder);
  opacity: 1;
}

.wm2-search__input::-webkit-search-cancel-button,
.wm2-search__input::-webkit-search-decoration,
.wm2-search__input::-webkit-search-results-button,
.wm2-search__input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.wm2-search__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.wm2-search__clear[hidden] {
  display: none;
}

.wm2-search__clear .wm2-icon {
  width: 17px;
  height: 17px;
}

.wm2-search .wm2-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--wm2-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--wm2-ink);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transition:
    border-color var(--wm2-search-control-duration) var(--wm2-search-control-ease),
    background-color var(--wm2-search-control-duration) var(--wm2-search-control-ease),
    color var(--wm2-search-control-duration) var(--wm2-search-control-ease);
}

.wm2-search__hint {
  margin-top: 14px;
  color: var(--wm2-muted);
  font-size: 11px;
  line-height: 1.45;
}

.wm2-search__close:hover,
.wm2-search__close:focus-visible,
.wm2-search__clear:hover,
.wm2-search__clear:focus-visible {
  color: var(--wm2-accent);
}

.wm2-search__close:focus-visible,
.wm2-search__clear:focus-visible,
.wm2-search__submit:focus-visible {
  outline: 2px solid var(--wm2-accent);
  outline-offset: 3px;
}

.wm2-search__submit:focus-visible,
.wm2-search__submit:active {
  border-color: var(--wm2-accent-hover);
  background: var(--wm2-accent-hover);
  color: var(--wm2-on-accent);
}

@media (hover: hover) and (pointer: fine) {
  .wm2-search__submit:hover {
    border-color: var(--wm2-accent-hover);
    background: var(--wm2-accent-hover);
    color: var(--wm2-on-accent);
  }
}

@media (hover: none) and (pointer: coarse) {
  .wm2-search .wm2-search__submit {
    transition-duration: 0ms;
  }
}

@keyframes wm2-search-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 680px) {
  .wm2-search {
    padding: 30px 32px 28px;
  }

  .wm2-search__form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    margin-top: 34px;
  }

  .wm2-search__submit {
    min-width: 118px;
    min-height: 46px;
  }

  .wm2-search__hint {
    margin-top: 16px;
  }
}

@media (min-width: 980px) {
  .wm2-search {
    position: absolute;
    z-index: 1;
    top: calc(100% + var(--wm2-header-panel-gap));
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    overscroll-behavior: none;
    touch-action: auto;
    animation: none;
  }

  .wm2-search__backdrop {
    display: block;
    position: fixed;
    z-index: 0;
    inset: 0;
    background: var(--wm2-search-backdrop);
  }

  .wm2-search__panel {
    position: relative;
    z-index: 1;
    width: min(
      720px,
      calc(100% - var(--wm2-header-inline-gap) - var(--wm2-header-inline-gap))
    );
    max-height: calc(
      100dvh
      - var(--wm2-header-top-gap)
      - var(--wm2-header-utility-height)
      - var(--wm2-header-tier-gap)
      - var(--wm2-header-primary-height)
      - var(--wm2-header-panel-gap)
      - max(10px, env(safe-area-inset-bottom, 0px))
    );
    margin: 0 auto;
    padding: 30px 32px 28px;
    border: 1px solid var(--wm2-line);
    border-radius: var(--wm2-header-radius);
    background: var(--wm2-paper);
    box-shadow: var(--wm2-search-panel-shadow);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    animation: wm2-search-enter var(--wm2-search-enter-duration) var(--wm2-ease) both;
  }
}

@media (max-width: 389px) {
  .wm2-search {
    padding-right: 14px;
    padding-left: 14px;
  }

  .wm2-search__heading h2 {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wm2-search {
    --wm2-search-enter-duration: 0ms;
    --wm2-search-control-duration: 0ms;
  }
}
