.etps-header-search {
  position: relative;
  z-index: 100;
  width: var(--etps-header-search-width, 320px);
  max-width: 100%;
  flex: 0 1 var(--etps-header-search-width, 320px);
  color: var(--etps-header-search-text, #0f172a);
  font: inherit;
}

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

.etps-header-search__form,
.etps-header-search__control {
  position: relative;
  width: 100%;
  margin: 0;
}

.etps-header-search__label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.etps-header-search__control {
  display: flex;
  align-items: center;
}

.etps-header-search__icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--etps-header-search-accent, #0b76be);
  pointer-events: none;
}

.etps-header-search__input[type="search"] {
  appearance: none;
  width: 100%;
  height: var(--etps-header-search-height, 44px);
  min-height: var(--etps-header-search-height, 44px);
  margin: 0;
  padding: 0 42px;
  border: 1px solid var(--etps-header-search-border, #dbe3ee);
  border-radius: var(--etps-header-search-radius, 8px);
  outline: 0;
  background: var(--etps-header-search-background, #fff);
  color: var(--etps-header-search-text, #0f172a);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  line-height: normal;
}

.etps-header-search__input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.etps-header-search__input[type="search"]::placeholder {
  color: var(--etps-header-search-placeholder, #94a3b8);
  opacity: 1;
}

.etps-header-search__input[type="search"]:focus-visible {
  border-color: var(--etps-header-search-accent, #0b76be);
  box-shadow: 0 0 0 3px var(--etps-header-search-accent-bg, rgba(11, 118, 190, 0.12));
}

.etps-header-search__clear {
  position: absolute;
  right: 8px;
  display: inline-flex;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  outline: 0;
  background: transparent !important;
  color: var(--etps-header-search-placeholder, #94a3b8);
  box-shadow: none;
  cursor: pointer;
}

.etps-header-search__clear svg {
  display: block;
  width: 13px;
  height: 13px;
}

.etps-header-search__clear:hover,
.etps-header-search__clear:focus-visible {
  background: var(--etps-header-search-accent-bg, rgba(11, 118, 190, 0.12)) !important;
  color: var(--etps-header-search-text, #0f172a);
}

.etps-header-search__suggestions[hidden] {
  display: none !important;
}

.etps-header-search__suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 10000;
  max-height: min(520px, 65vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--etps-header-search-border, #dbe3ee);
  border-radius: var(--etps-header-search-radius, 8px);
  background: var(--etps-header-search-background, #fff);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}

.etps-header-search__heading {
  padding: 10px 10px 6px;
  color: var(--etps-header-search-placeholder, #64748b);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.etps-header-search__option {
  display: flex;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: max(4px, calc(var(--etps-header-search-radius, 8px) - 2px));
  outline: 0;
  background: transparent;
  color: var(--etps-header-search-text, #0f172a);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.etps-header-search__option:hover,
.etps-header-search__option.is-active {
  background: var(--etps-header-search-accent-bg, rgba(11, 118, 190, 0.12));
  color: var(--etps-header-search-text, #0f172a);
}

.etps-header-search__image {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: max(4px, calc(var(--etps-header-search-radius, 8px) - 3px));
  background: #f1f5f9;
  object-fit: cover;
}

.etps-header-search__copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.etps-header-search__copy strong {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.etps-search-match {
  padding: 0;
  background: transparent;
  color: var(--etps-header-search-accent, #0b76be);
  font: inherit;
  font-weight: 800;
}

.etps-header-search__copy small,
.etps-header-search__term small {
  color: var(--etps-header-search-placeholder, #64748b);
  font-size: 12px;
}

.etps-header-search__term,
.etps-header-search__all {
  justify-content: space-between;
}

.etps-header-search__all {
  margin-top: 6px;
  border-top: 1px solid var(--etps-header-search-border, #dbe3ee);
  border-radius: 0;
  color: var(--etps-header-search-accent, #0b76be);
  font-weight: 700;
}

.etps-header-search__empty {
  padding: 16px 12px;
  color: var(--etps-header-search-placeholder, #64748b);
  font-size: 13px;
  font-weight: 500;
}

.etps-header-search.is-loading .etps-header-search__input {
  cursor: progress;
}

@media (max-width: 719px) {
  .etps-header-search {
    width: 100%;
    flex-basis: 100%;
  }

  .etps-header-search__suggestions {
    position: fixed;
    top: var(--etps-header-search-mobile-top, 80px);
    right: auto;
    left: var(--etps-header-search-mobile-left, 12px);
    width: var(--etps-header-search-mobile-width, calc(100vw - 24px));
    max-height: min(520px, calc(100vh - var(--etps-header-search-mobile-top, 80px) - 16px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .etps-header-search * {
    scroll-behavior: auto !important;
  }
}
