/* =========================================================
   HEADER SEARCH
   ========================================================= */

/* --- SEARCH WRAPPER --- */
div#block-touchstone-me-headercontent .search-block-form.c-site-search {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;

  width: 44px;
  height: 44px;

  overflow: visible;

  transition: width 0.25s ease;
}

/* Remove Drupal spacing */
div#block-touchstone-me-headercontent .search-block-form.c-site-search .form-actions,
div#block-touchstone-me-headercontent .search-block-form.c-site-search .form-wrapper,
div#block-touchstone-me-headercontent .search-block-form.c-site-search .form-item {
  margin: 0;
}

/* =========================================================
   OPEN STATE
   ========================================================= */

div#block-touchstone-me-headercontent .search-block-form.c-site-search:focus-within,
div#block-touchstone-me-headercontent .search-block-form.c-site-search.is-search-open {
  width: 320px;
}

/* =========================================================
   SEARCH INPUT
   ========================================================= */

div#block-touchstone-me-headercontent .search-block-form.c-site-search .c-site-search__search {
  width: 0;
  height: 44px;

  opacity: 0;
  pointer-events: none;

  padding: 0;

  border: 0;
  border-radius: 999px;

  background: #fff;
  color: #111;

  outline: none;

  transition:
    width 0.25s ease,
    opacity 0.2s ease,
    padding 0.2s ease;

  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

/* --- INPUT OPEN --- */
div#block-touchstone-me-headercontent .search-block-form.c-site-search:focus-within .c-site-search__search,
div#block-touchstone-me-headercontent .search-block-form.c-site-search.is-search-open .c-site-search__search {
  width: 320px;

  opacity: 1;
  pointer-events: auto;

  padding: 10px 16px 10px 60px;

  border: 1px solid rgba(0,0,0,.18);
}

/* Placeholder */
div#block-touchstone-me-headercontent .search-block-form.c-site-search .c-site-search__search::placeholder {
  color: #777;
}

/* =========================================================
   FORM ACTIONS WRAPPER
   ========================================================= */

div#block-touchstone-me-headercontent .search-block-form.c-site-search .form-actions {
  position: absolute;
  left: 0;
  top: 50%;

  width: 44px;
  height: 44px;

  transform: translateY(-50%);

  z-index: 4;
}

/* =========================================================
   SEARCH BUTTON / ICON
   ========================================================= */

div#block-touchstone-me-headercontent .search-block-form.c-site-search .c-site-search__submit {
  all: unset;
  box-sizing: border-box;

  width: 44px;
  height: 44px;

  border-radius: 999px;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  line-height: 0;

  background-color: transparent;

  border: 1px solid rgba(0,0,0,.25);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%234b4b4b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M10.75 18.5a7.75 7.75 0 1 1 0-15.5 7.75 7.75 0 0 1 0 15.5Z M16.25 16.25 21 21'/%3E%3C/svg%3E");

  background-repeat: no-repeat;
  background-position: center center;
  background-size: 22px 22px;

  font-size: 0;
  text-indent: -9999px;
  overflow: hidden;
}

/* Hover */
div#block-touchstone-me-headercontent .search-block-form.c-site-search .c-site-search__submit:hover {
  background-color: rgba(0,0,0,.06);
}

/* Active */
div#block-touchstone-me-headercontent .search-block-form.c-site-search .c-site-search__submit:active {
  transform: scale(.97);
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

  div#block-touchstone-me-headercontent .search-block-form.c-site-search:focus-within,
  div#block-touchstone-me-headercontent .search-block-form.c-site-search.is-search-open {
    width: 230px;
  }

  div#block-touchstone-me-headercontent .search-block-form.c-site-search:focus-within .c-site-search__search,
  div#block-touchstone-me-headercontent .search-block-form.c-site-search.is-search-open .c-site-search__search {
    width: 230px;
  }

}