/*------------------------------------*\
    #SEARCH FORM
\*------------------------------------*/
/**
 * 1) Search form that contains a text input and button
 */

/**
 * Page header title
 */


.c-search-form__body {
  opacity: 0;
  position: absolute;
  transform: scale(0);
  width: 40px;

  input {
    opacity: 0;
  }

  .c-btn {
    height: 42px;
    padding: 0;
    width: 42px;
  }

  .c-btn-close {
    background: none;
    right: 50px;
    top: 5px;
    transform: scale(.75) translateY(2px);

    &:hover,
    &:focus {
      box-shadow: none;
    }

    .c-btn__icon {
      color: var(--color-neutral-gray-70);
      margin: 0;
    }
  }
}

#search-trigger .c-btn,
#search-trigger-mobile .c-btn {
  outline: none;
}

.search-active {
  &.stuck.c-search-form__body {
    top: -6px;
    width: 300px;
  }

  #search-trigger {
    transform: translateY(0);
  }

  .c-btn:hover,
  .c-btn:focus {
    background: var(--bg-primary);
    color: var(--color-neutral-white);
  }

  #search-area {
    position: relative;
  }

  #search-trigger {
    transform: translateY(-49px);
    transition: transform .2s linear 0s;
    z-index: 1;

    @media all and (min-width: 60em) {
      transform: translateY(-14px);
    }
  }

  .c-search-form__body {
    background-color: var(--color-neutral-white);
    border: 2px solid var(--border-search-form-body);
    border-radius: 28px;
    display: block;
    height: 55px;
    opacity: 1;
    overflow: hidden;
    position: absolute;
    right: 10px;
    top: -55px;
    transform: scale(1);
    transition: opacity .1s linear .2s, width .2s linear .2s;
    width: 400px;
    z-index: 10;

    @media all and (min-width: 610px) {
      max-width: 360px;
    }

    @media all and (max-width: 751px) {
      top: 21px;
      width: calc(100% - 20px);
    }

    @media all and (min-width: 47em) {
      right: 0;
    }

    @media all and (min-width: 60em) {
      top: -20px;
    }

    @media all and (min-width: 70em) {
      right: 0;
    }

    input {
      border: 0;
      font-size: var(--font-size-med-2);
      height: 55px;
      opacity: 1;
      outline: none;
      padding-top: 10px;
      transition: opacity .3s linear .6s;
      width: calc(100% - 95px);
    }

    .c-btn {
      position: absolute;
      right: 5px;
      top: 4px;

      &.c-btn-close {
        right: 50px;
        transition-duration: .15s;

        &:hover,
        &:focus {
          background: none;
          top: 6px;
          transform: scale(1);
        }
      }
    }
  }
}
