/*  ----------------------------------------------------------------------------
    Search
*/
/* the search button */
#td-header-search-button {
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    display: none;
  }
}

#td-header-search-button-mob {
  display: none;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    display: block;
  }
}

/* the search drop down */
.td-search-box-wrap {
  position: absolute;
  top: 100%;
  right: 0;
}

/* responsive without mobile */
@media (min-width: @responsive_p_tablet_min) {
  .td-drop-down-search {
    .td-search-form {
      margin: 20px;
    }
  }
}

.td-header-wrap {
  .td-drop-down-search {
    position: absolute;
    top: 100%;
    right: 0;
    visibility: hidden;
    .opacity(0);
    .transition(all 0.4s ease);
    .transform(translate3d(0, 20px, 0));
    background-color: #fff;
    .box-shadow(0 2px 6px rgba(0,0,0,0.2));
    border-top: 0;
    width: 342px;
    pointer-events: none;

    /* this class is added by the js to open the menu - will be used for animation */
    &.td-drop-down-search-open {
      visibility: visible;
      .opacity(1);
      .transform(translate3d(0, 0, 0));
      pointer-events: auto;
    }

    /* search form */
    .btn {
      position: absolute;
      height: 32px;
      min-width: 67px;
      line-height: 17px;
      padding: 7px 15px 8px;
      text-shadow: none;
      vertical-align: top;
      right: 20px;
      margin: 0 !important;
      .transition(background-color @td_transition_time); // !!!! check transition

      &:hover {
        background-color: @td_theme_color;
      }
    }

    /* triangle top */
    &:before {
      position: absolute;
      top: -9px;
      right: 19px;
      display:block;
      content:'';
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 0 5.5px 6px 5.5px;
      border-color: transparent transparent @td_theme_color transparent;
    }

    &:after {
      position: absolute;
      top: -3px;
      display: block;
      content: '';
      right: 0;
      left: 0;
      margin: 0 auto;
      width: 100%;
      height: 3px;
      background-color: @td_theme_color;
    }
  }

  #td-header-search {
    width: 235px;
    height: 32px;
    margin: 0;
    border-right: 0;
    line-height: 17px;
    border-color: #eaeaea !important;

    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 91%;
      font-size: 16px;
    }
  }

  /* hack to show the link on all the module */
  .td_module_mx2 .entry-title {
    a:after {
      position: absolute;
      left: 0;
      width: 100%;
      top: 0;
      bottom: 0;
      content: '';
      z-index: 1; // is needed
    }
  }

  .td-post-category {
    z-index: 2;
    position: relative;
  }

  .result-msg {
    text-align: center;
    padding: 4px 0 6px 0;
    font-family: @font3;
    font-size: 12px;
    color: #222;
    font-style: italic;

    a {
      color: #222;
      display: block;
      &:hover {
        color: @td_theme_color;
      }
    }
  }

  .td-aj-search-results {
    background-color: rgba(144, 144, 144, 0.02);
    border-top: 1px solid #ededed;
    border-bottom: 1px solid #ededed;
    padding: 10px 0;

    .item-details {
      margin: 10px 20px 10px 115px;
    }

    .td-module-thumb {
      top: 10px;
      margin-left: 20px;
    }
  }

  .td_module_mx2 {
    padding-bottom: 0;
  }

  .no-result {
    background-color: #fdfdfd;
    border-top: 1px solid #ededed;
    border-bottom: 1px solid #ededed;
  }

  .meta-info {
    line-height: 14px;
  }

  .td-aj-cur-element {
    background-color: rgba(128, 128, 128, 0.1);
  }
}