/**
 * @file
 * Header search.
 *
 * Below --md this is an icon-only toggle button (.block-header-search__toggle)
 * that expands the pill (.block-header-search__wrapper.is-expanded) on tap —
 * see js/header-search-toggle.js. At --md and above the pill is always
 * visible and the toggle button is hidden.
 */

/*
 * Media query breakpoints.
 * Processed by postcss/postcss-custom-media.
 */

/* Navigation related breakpoints */

/* Grid related breakpoints */

/* Grid shifts from 6 to 14 columns. */

/* Width of the entire grid maxes out. */

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

.block-header-search.is-active .block-header-search__toggle {
    display: none;
  }

.block-header-search__toggle {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: var(--sp2);
  height: var(--sp2);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color--text-muted, #718096);
  cursor: pointer;
}

.block-header-search__toggle svg {
    width: 18px;
    height: 18px;
  }

@media (min-width: 768px) {

.block-header-search__toggle {
    display: none;
}
  }

.block-header-search__wrapper {
  display: none;
  align-items: center;
  gap: var(--sp0-5);
  width: 150px;
  padding-inline: var(--sp0-75);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--border-radius-ui);
  background: rgba(255, 255, 255, 0.07);
  color: var(--color--text-muted, #718096);
  transition: width 0.2s;
}

.block-header-search__wrapper.is-expanded {
    display: flex;
    flex: 1;
    width: auto;
  }

@media (min-width: 768px) {

.block-header-search__wrapper {
    display: flex;
    width: 220px;
}
  }

@media (min-width: 1200px) {

.block-header-search__wrapper {
    width: 260px;
}
  }

.block-header-search__wrapper > svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
  }

.block-header-search__wrapper .search-block-form {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
  }

.block-header-search__wrapper .form-item {
    flex: 1;
    min-width: 0;
    margin: 0;
  }

.block-header-search__wrapper input[type="search"] {
    width: 100%;
    padding-block: var(--sp0-5);
    padding-inline: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    color: var(--color--text-primary, #F4F6F8);
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
  }

.block-header-search__wrapper input[type="search"]::-moz-placeholder {
      color: var(--color--text-muted, #718096);
    }

.block-header-search__wrapper input[type="search"]::placeholder {
      color: var(--color--text-muted, #718096);
    }

.block-header-search__wrapper input[type="search"]:focus {
      outline: none;
    }

/*
     * Hide the browser's built-in "clear" control — we render our own
     * .block-header-search__close, so a native one is a redundant second X.
     */

.block-header-search__wrapper input[type="search"]::-webkit-search-cancel-button,
    .block-header-search__wrapper input[type="search"]::-webkit-search-decoration {
      -webkit-appearance: none;
              appearance: none;
    }

.block-header-search__wrapper .form-actions {
    margin: 0;
  }

/*
   * The mockup shows a single leading search icon; the input already submits
   * on Enter. Keep the real submit button in the DOM (so it's still reachable
   * and clickable for keyboard/screen-reader users who tab to it) but hide it
   * visually instead of rendering a second icon.
   */

.block-header-search__wrapper .search-form__submit {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

.block-header-search__wrapper .search-form__submit:focus {
      position: static;
      overflow: visible;
      width: 22px;
      height: 22px;
      margin: 0;
      clip: auto;
      border-radius: 50%;
      outline: solid 2px var(--color--primary-50);
      outline-offset: 1px;
    }

.block-header-search__wrapper .search-form__submit:focus .icon--search {
        position: absolute;
        inset: 0;
        display: block;
        background-image: url("../../images/search--white.svg");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 13px;
      }

.block-header-search__wrapper .block-header-search__close {
    display: none;
    flex-shrink: 0;
    position: relative;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
  }

.block-header-search__wrapper .block-header-search__close::before,
    .block-header-search__wrapper .block-header-search__close::after {
      position: absolute;
      top: 50%;
      left: 50%;
      display: block;
      width: 14px;
      height: 0;
      content: "";
      border-top: solid 2px var(--color--text-muted, #718096);
    }

.block-header-search__wrapper .block-header-search__close::before {
      transform: translate(-50%, -50%) rotate(45deg);
    }

.block-header-search__wrapper .block-header-search__close::after {
      transform: translate(-50%, -50%) rotate(-45deg);
    }

.block-header-search__wrapper.is-expanded .block-header-search__close {
    display: block;
  }
