@use '../../utils' as *;

/*----------------------------------------*/
/*  Header Styles
/*----------------------------------------*/

// Header transparent
.header-transparent {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  z-index: 99;
}

// Active-sticky
.active-sticky {
  position: fixed !important;
  top: 0;
  z-index: 111;
  inset-inline-end: 0;
  inset-inline-start: 0;
  width: 100%;
  animation: sticky 0.3s;
  -webkit-animation: sticky 0.3s;
  background-color: rgba($white, $alpha: 0.1) !important;
  box-shadow: 0 2px 4px rgba(7, 37, 68, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

// Mode-switcher
.mode-switcher {
  button {
    position: relative;
    top: -3px;
  }
}

// Heder one styles
.header-style-one {
  border-bottom: 1px solid #95959526;

  &.active-sticky {
    border: 0;

    .td-main-menu {
      background-color: transparent;
      border-color: transparent;
    }
  }

  .header-logo {
    img {
      height: 30px;

      @media #{$xs} {
        height: 24px;
      }
    }
  }

  .header-inner {
    @include flexbox();
    align-items: center;
    justify-content: space-between;
    padding: 0 80px;

    @media #{$lg} {
      padding: 0 30px;
    }

    @media #{$sm,$md} {
      padding: 12px 30px;
    }

    @media #{$xs} {
      padding: 12px 15px;
    }

    .header-left {
      display: flex;
      align-items: center;
      column-gap: 80px;
    }
  }

  .header-quick-actions {
    display: flex;
    align-items: center;
    column-gap: 16px;

    .header-btns-wrap {
      display: flex;
      align-items: center;
      column-gap: 12px;

      .td-btn {
        &.btn-fill-border {
          background: #192031;
          border-color: rgba($white, $alpha: 0.08);
          &:hover {
            border-color: var(--td-primary)
          }
        }
      }
    }
  }
}

// Language css
.language-nav {
  background-color: transparent !important;
  position: relative;
  height: 40px;
  border-radius: 40px;
  @include inline-flex();
  align-items: center;
  justify-content: center;

  .translate_wrapper {
    &.active {
      .more_lang {
        display: block;
        position: absolute;
        background-color: var(--td-black-alt);
        top: 47px;
        inset-inline-end: 0;
        @include border-radius(8px);
        border: 1px solid rgba(171, 178, 225, 0.3);
        padding: 6px 6px;
        width: 196px;
        box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.2);

        &:before {
          width: 0;
          height: 0;
          border-inline-start: 7px solid transparent;
          border-inline-end: 7px solid transparent;
          border-bottom: 7px solid rgba(171, 178, 225, 0.3);
          content: "";
          top: -7px;
          position: absolute;
          inset-inline-end: 20px;
          z-index: 2;
        }

        &:after {
          width: 0;
          height: 0;
          border-inline-start: 7px solid transparent;
          border-inline-end: 7px solid transparent;
          border-bottom: 7px solid rgba(171, 178, 225, 0.3);
          content: "";
          top: -7px;
          position: absolute;
          inset-inline-end: 20px;
          z-index: 1;
        }
      }
    }
  }

  .current_lang {
    cursor: pointer;
    text-transform: uppercase;
    overflow: hidden;

    .lang {
      .flag-icon {
        width: 24px;
        height: 24px;
        @include inline-flex();
        align-items: center;
        background-size: cover;
        border-radius: 40px;
      }

      svg * {
        stroke: var(--td-white);
      }
    }
  }

  .lang.selected {
    display: none;
  }

  .lang {
    span.lang-txt {
      @include inline-flex();
      margin-inline-start: 6px;
      margin-inline-end: 6px;
      font-size: 14px;
      font-weight: 500;
      color: var(--td-white);
    }

    span {
      span {
        color: rgba($white, $alpha: 0.6);
        font-weight: 400;
        margin-inline-start: 5px;
        text-transform: capitalize
      }
    }
  }

  .more_lang {
    transform: translateY(-20px);
    opacity: 0;
    cursor: pointer;
    display: none;
    transition: all 0.3s cubic-bezier(0.25, 1.15, 0.35, 1.15);

    .lang {
      padding: 6px 6px;
      @include flexbox();
      @include border-radius(6px);

      i {
        width: 24px;
        height: 24px;
        @include inline-flex();
        align-items: center;
        background-size: cover;
        border-radius: 40px;
      }

      &:hover {
        background: var(--td-primary);
        color: var(--td-white);

        span {
          color: var(--td-white);
        }
      }
    }
  }

  .more_lang {
    &.active {
      opacity: 1;
      transform: translateY(0px);
    }
  }
}