// general
.td-header-logo-wrap {
  position: relative;
  padding: 24px 0;

  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    padding: 16px 0;
  }

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

.td-header-menu-wrap-full {
  z-index: 9998;
  position: relative;
}

// ads
.td-header-rec-wrap {
  .td-a-rec,
  .td-g-rec {
    margin-bottom: 0;
  }
}

/*  ----------------------------------------------------------------------------
    Logo in header
*/
.td-header-sp-logo {
  position: relative;
  float: left;
  width: 22.85714285714286%;

  img {
    margin: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }

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


/*  ----------------------------------------------------------------------------
    Logo in menu
*/
// general
#td-header-menu {
  .td-header-logo {
    padding: 0;
  }
}

.td-main-menu-logo {
  display: none;
  float: left;
  margin-right: 10px;
  height: 55px;

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

  a {
    line-height: 55px;
  }

  img {
    padding: 3px 0;
    position: relative;
    vertical-align: middle;
    max-height: 55px;

    @media (max-width: @responsive_p_phone_max) {
      position: absolute;
      top: 0;
      bottom: 0;
      right: 0;
      left: 0;
      margin: auto;
      padding: 0;
    }

    @media (max-width: @responsive_l_tablet_max) {
      max-width: 160px;
    }
  }
}

@media (min-width: @responsive_p_tablet_min) {
  .td-affix .td-logo-sticky {
    display: block;
  }


  // Small height for menu with affix
  .td-header-wrap {
    .td-affix {
      .td-main-menu-logo {
        height: 55px !important;

        a {
          line-height: 55px !important;
        }

        img {
          max-height: 55px !important;
          top: -2px;
        }
      }

      .sf-menu > li > a,
      .td-icon-search {
        line-height: 55px !important;
      }
    }
  }
}

// h1 logo title seo
.td-visual-hidden {
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}
.td-logo {
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: inherit !important;
}


/* -------------------------------------------------------------------------------

      logo on sticky menu

*/
// logo in header

// disable
.td-logo-in-header .td-sticky-disable {
  &.td-mobile-logo,
  &.td-header-logo {
    display: none;
  }
  &.td-mobile-logo {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: block;
    }
  }
}

// header logo
.td-logo-in-header .td-sticky-header {
  &.td-mobile-logo {
    display: none;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: inherit;
    }
  }

  &.td-header-logo {
    display: block;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }
}

// mobile logo
.td-logo-in-header .td-sticky-mobile {
  &.td-mobile-logo {
    display: block;
  }

  &.td-header-logo {
    display: none;
  }
}


// logo in menu

// disable
.td-logo-in-menu .td-sticky-disable {
  &.td-mobile-logo {
    display: none;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: block;
    }
  }
  &.td-header-logo {
    display: block;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }
}
.td-affix .td-logo-in-menu .td-sticky-disable {
  &.td-header-logo {
    display: none;
  }
}

// header logo
.td-logo-in-menu .td-sticky-header {
  &.td-mobile-logo {
    display: none;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: block;
    }
  }
  &.td-header-logo {
    display: block;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }
}

// mobile logo
.td-logo-in-menu .td-sticky-mobile {
  &.td-mobile-logo {
    display: none;
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: block;
    }
  }

  &.td-header-logo {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      display: none;
    }
  }
}
.td-affix .td-logo-in-menu .td-sticky-mobile {
  &.td-header-logo {
    display: none;
  }
  &.td-mobile-logo {
    display: block;
  }
}


// condition when no mobile logo
.td-affix .td-logo-in-menu .td-main-logo {
  display: none;
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    display: block;
  }
}

.td-affix .td-logo-in-menu.td-logo-sticky .td-main-logo {
  display: block;
}


/*  ----------------------------------------------------------------------------
    Header menu affix
*/
.td-header-menu-wrap.td-affix {
  .transform(translate3d(0, 0, 0));
  margin-right: auto;
  margin-left: auto;
  width: 100%;
  z-index: 9999;
  position: fixed !important;
  background-color: #fff;
  background-color: rgba(255,255,255,0.95);
  top: 0;
  left: 0;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    background-color: #222;
  }

  .td-main-menu-logo {
    margin-right: 32px;
  }

  #td-header-menu {
    width: 100%;
  }

  .sf-menu ul ul {
    margin-top: -15px;
    padding: 15px 0;
  }
}

.td-affix .td-logo-in-menu .td-sticky-mobile {
  &.td-header-logo {
    display: none;
  }

  &.td-mobile-logo {
    display: block;
  }
}

.td-affix .td-logo-in-menu .td-sticky-disable {
  &.td-header-logo {
    display: none;
  }
}

// condition when no mobile logo
.td-affix .td-logo-in-menu .td-main-logo {
  display: none;

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

.td-affix .td-logo-in-menu.td-logo-sticky .td-main-logo {
  display: block;
}

// fix menu affix when admin bar + responsive
.admin-bar .td-header-menu-wrap.td-affix {
  top: 32px;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    top: 46px;
  }

  @media (max-width: 602px) {
    top: 0;
  }
}

// Small height for menu with affix
@media (min-width: @responsive_p_tablet_min) {
  .td-affix .td-logo-sticky {
    display: block;
  }
}