@use '../../_global/styles/mixins' as *;
@use '../../_global/styles/vars' as *;

.header-search {
  @media(min-width: 768px) {
    --header-height: 100px;
  }
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--viewport-height, 1vh) * 100 - var(--header-height));
  background-color: var(--swatches-primary-100);

  .outer {
    position: relative;
    padding-bottom: 10px;
  }

  .container {
    margin: auto;
  }

  .form-nav {
    width: 100%;
    background-color: var(--color-background);

    .secondary {
      background-color: var(--swatches-primary-100);
    }
  }

  .secondary {
    position: relative;
    z-index: 1;
    background-color: var(--swatches-primary-100);
    text-align: left;

    ul {
      padding: 15px 14px;
      list-style: none;
      margin: 0;
      font-size: 18px;
      line-height: 20px;

      @media(max-width: 359px) {
        font-size: 16px;
        line-height: 20px;
        padding: 10px;
      }
    }

    li {
      display: inline-block;
    }

    @media (max-width: 767px) and (orientation: landscape) {
      position: absolute;
      right: 100%;
      top: 0;
      width: calc(100vw - 420px);
      min-width: 35vw;

      li {
        display: block;
      }
    }

    a {
      position: relative;
      display: block;
      padding: 5px 6px;
      transition: 0.3s $easeOutQuad;
      text-decoration: underline;
      text-decoration-color: transparent;
      text-decoration-thickness: 2px;
      text-underline-offset: 2px;
      @include focus-visible;

      @media(max-width: 359px) {
        padding: 5px;
      }
    }
  }

  .meta {
    position: relative;
    z-index: 1;
    padding: 0 12px;

    > ul {
      display: flex;
      justify-content: flex-start;
      list-style: none;
      padding: 0;
      margin: 0;
    }

    ul {
      display: flex;
      list-style: none;
      padding: 0;
      margin: 0;

      li {
        padding: 0;
      }
    }

    .icons {
      margin-left: auto;

      .login {
        a {
          &:before {
            @include icon-login-flyout;
            font-family: 'Icons', sans-serif;
            font-size: var(--icon-size-small);
            line-height: 30px;
            float: right;
            margin-left: 5px;
          }

          &:hover {
            text-decoration-color: transparent;
          }
        }

      }

      li:not(.login) a {
        font-size: 0;
        line-height: 0;
        text-decoration: none;

        &:before {
          font-family: 'Icons', sans-serif;
          font-size: var(--icon-size-small);
          line-height: 30px;
        }

        &:hover {
          text-decoration-color: transparent;
        }
      }

      .sign-language a::before {
        @include icon-small-gebaerdensprache;
      }

      .simple-language a::before {
        @include icon-small-leichte-sprache;
      }
    }

    a {
      display: block;
      font-size: var(--font-size-small);
      line-height: 30px;
      margin: 10px 0;
      padding: 5px 8px;
      text-decoration: none;
      /*
      text-decoration: underline;
      text-decoration-color: transparent;
      text-decoration-thickness: 2px;
      text-underline-offset: 2px;
      */
      transition: 0.3s ease;
      text-align: center;
      border: 0;
      background-color: transparent;
      cursor: pointer;
      @include focus-visible;

      @media(max-width: 359px) {
        padding: 5px;
      }

      &:hover {
        text-decoration-color: var(--swatches-primary-500);
      }
    }
  }
}

.page-header {
  .header-search {
    top: 100%;
    @include hide;
  }
}
