@media only screen and (min-width: 1024px) and (max-width: 1200px) {
  .schm-header__logo {
    width: 10%;
  }
}

.schm-header__nav {
  position: static;
}

.searchwp-form .swp-flex--col,
.searchwp-form .swp-flex--row {
  display: flex;
  width: 100%;
}

.searchwp-form .swp-flex--row {
  align-items: center;
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
}

.searchwp-form .searchwp-form-input-container {
  flex: 1;
  min-width: 0;
}

.searchwp-form input.swp-input--search {
  width: 100%;
  border: 0;
  font-family: "Barlow Semi Condensed", Sans-serif;
  font-size: 18px;
  padding: 10px 8px 10px 16px;
  background: transparent;
  background-image: none;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

/* Native search UI (clear button, decorations) — keep type="search" for semantics */
.searchwp-form input.swp-input--search::-webkit-search-decoration,
.searchwp-form input.swp-input--search::-webkit-search-cancel-button,
.searchwp-form input.swp-input--search::-webkit-search-results-button,
.searchwp-form input.swp-input--search::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.searchwp-form input.swp-input--search::-moz-search-clear {
  display: none;
}

.searchwp-form .search-submit {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  margin-right: 8px;
  background: transparent url("../img/search-red.svg") center center no-repeat !important;
  background-size: 19px !important;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.search-submit:hover {
  background-color: #f4f0f1 !important;
}

/* Keep column in layout when closed (nav stays centered) */
.schm-header__search {
  position: relative;
}

.schm-header__search:not(.is-open) {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.schm-header__search.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.searchwp-live-search-results-container {
  padding-bottom: 12px;
}

.schm-header__search > .searchwp-live-search-results {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  margin-top: 6px;
}

.schm-header__search .searchwp-live-search-result {
  border-bottom: none;
  padding: 12px 16px 0 16px;
}

.schm-header__search .searchwp-live-search-result--title {
  margin: 0;
  line-height: 1.3;
}

.schm-header__search .searchwp-live-search-result--title a {
  color: var(--e-global-color-primary, #701724);
}

.schm-header__search .searchwp-live-search-result mark,
.schm-header__search .searchwp-live-search-result .searchwp-highlight,
.schm-header__search .searchwp-live-search-result mark.searchwp-highlight {
  background-color: color-mix(in srgb, #fcd192 50%, white);
  color: inherit;
  padding: 0 0.05em;
  border-radius: 2px;
}

/* Mobile: search overlays below header — parent height stays fixed (no icon jump) */
@media only screen and (max-width: 1024px) {
  .header .e-con:has(.schm-header__search) {
    position: relative;
    overflow: visible;
  }

  .schm-header__nav.e-con {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .schm-header__nav .schm-search-toggle {
    order: 1;
  }

  .schm-header__nav .schm-mobile-menu-filialsuche {
    order: 2;
  }

  .schm-header__nav .schm-mobile-menu-main {
    order: 3;
  }

  .schm-header__row {
    align-self: flex-start;
    width: 100%;
  }

  .schm-header__search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    z-index: 100;
    margin: 0;
    padding: 10px 12px;
    padding-top: 0;
    box-sizing: border-box;
    background-color: var(--e-global-color-primary);
  }

  .schm-header__search:not(.is-open) {
    display: none;
    max-height: none;
    overflow: visible;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .schm-header__search.is-open {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
}

@media only screen and (min-width: 1024px) {
  .schm-search-toggle {
    position: absolute;
    right: 20px;
  }
}

@media only screen and (min-width: 1025px) {
  .schm-search-toggle:has(.schm-search-toggle-button.is-active) {
    display: none;
  }
}

.schm-search-toggle-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  background-color: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
}

.schm-search-toggle-button img {
  display: block;
  width: 22px;
  height: 23px;
}

.schm-search-toggle-button:hover,
.schm-search-toggle-button.is-active {
  background-color: #701724;
  border: 0;
  box-shadow: none;
  transform: none;
}

.schm-search-toggle-button:focus,
.schm-search-toggle-button:focus-visible {
  outline: none;
}
