/*
  main header component

  general styling
  subheader
  header
  small screen menu toggle
  navigation
  modal submenu
  mobile navigation
  navigation content
  responsivity
*/

/* general styling
============================================================================ */
:root {
  --subheader-news-gradient-from: #2173c4;
  --subheader-news-gradient-to: #0f7b0a;

  --header-submenu-gradient-from: #3a8dde;
  --header-submenu-gradient-to: #38d430;

}

.pos-navigation {
  position: sticky;
  top: 0;
  z-index: 11;
  box-shadow: 0px 4px 6px 0px rgba(var(--color-rgb-interactive-hover), 0.15);
}

.header-container {
  max-width: 1920px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 0;
  margin-inline: auto;
}



/* subheader
============================================================================ */
.pos-subheader {
  font-family: var(--pos-font-default);
  padding: 8px var(--pos-gap-step-step, 24px);
  background: var(--pos-color-page-background, #f7f8fa);
}

.news {
  display: flex;
  align-items: center;
  gap: var(--pos-gap-s-button, 8px);
  flex: 1 0 0;
}

.news>h1 {
  font-family: var(--pos-font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25em;
  background: linear-gradient(90deg,
      var(--subheader-news-gradient-from) 3.79%,
      var(--subheader-news-gradient-to) 94.61%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.news>a {
  color: var(--pos-color-supplementary);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25em;
  text-decoration: underline solid;
  text-decoration-skip-ink: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--pos-gap-step-step);
}

.nav-right>a {
  color: var(--pos-color-supplementary);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--pos-gap-s-button, 8px);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1em;
  letter-spacing: -0.36px;
  text-transform: uppercase;
}

.nav-right>div {
  display: flex;
  height: 40px;
  padding: 0 var(--pos-gap-n-button, 16px);
  border-radius: var(--pos-corner-tag, 40px);
  border: 2px solid var(--pos-color-button-secondary-stroke-normal, #b6bdca);
  align-items: center;
  gap: var(--pos-gap-s-button, 8px);
}

/* header
============================================================================ */
.pos-header {
  font-family: var(--pos-font-default);
  padding: 16px var(--pos-gap-step-step, 24px);
  background: var(--pos-color-panel-background, #fff);
}

.pos-header h1 .label {
  position: absolute;
  left: -100vw;
}

.pos-header h1 a {
  display: flex;
  align-items: center;
}

/* small screen menu toggle
============================================================================ */
.pos-header .toggleMenu,
.pos-header .toggleMenuSwitch {
  display: none;
}

@media (max-width: 768px) {
  .b-version {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .pos-header .toggleMenu {
    width: 44px;
    height: 44px;
    margin-inline-end: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .pos-header .toggleMenu svg {
    stroke: #141414;
    border: 1px solid #141414;
    border-radius: 4px;
  }

  .pos-theme-dark .pos-header .toggleMenu svg {
    border: 1px solid #9da3ad;
    border-radius: 4px;
  }

  .pos-theme-dark .pos-header .toggleMenu svg path {
    stroke: #f2f2f2;
  }

  .pos-header .toggleMenu .open path {
    stroke: #141414;
  }

  .pos-header .toggleMenu .close path {
    stroke: var(--pos-color-interactive);
  }

  .pos-header .toggleMenu .label {
    position: absolute;
    left: -100vw;
  }

  .pos-header .toggleMenuSwitch {
    position: absolute;
    left: -100vw;
  }
}

/* navigation
============================================================================ */
.pos-header nav {
  display: flex;
}

.header-gradient-arrow {
  display: block;
  width: 14px;
  height: 14px;
  margin-bottom: -5px;
  transition: transform 0.3s ease;
}

.pos-header nav>ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .pos-header:has(#toggleMenu:checked) nav {
    display: block;
  }

  .pos-header nav {
    margin-block-start: -1px;
    position: absolute;
    inset-block-start: 8rem;
    inset-inline: 0;
    display: none;
    background-color: var(--pos-color-panel-background);
  }

  .pos-header nav>ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .pos-header nav>ul>li {
    display: flex;
  }
}

.pos-header nav a:not(.button):not(:hover) {
  color: var(--pos-color-normal);
}

/* modal submenu
============================================================================ */
.pos-header-modal {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.pos-header-modal>svg {
  cursor: pointer;
  margin-left: 6px;
}

.pos-header-modal a>svg:nth-of-type(1) {
  border-radius: var(--pos-corner-panel, 4px);
  background: var(--pos-color-page-background, #f7f8fa);
}

.pos-header-modal a:hover>svg:nth-of-type(1) {
  background: linear-gradient(315deg,
      var(--header-submenu-gradient-from) 0%,
      var(--header-submenu-gradient-to) 100%);
  stroke: var(--pos-color-button-primary-text-hover);
}

.pos-header-modal a:hover>svg:nth-of-type(1) path {
  stroke: var(--pos-color-button-primary-text-hover);
}

.pos-header-modal a>svg:nth-of-type(2) {
  margin-left: auto;
}

@media screen and (max-width: 900px) {
  .pos-header-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .pos-header-modal>svg {
    display: block;
    position: absolute;
    right: 24px;
    top: 18px;
  }
}

.pos-header-modal label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-top: -4px;
  gap: 6px;
}

.pos-header-modal:has(.pos-header-toggle:checked) label {
  font-weight: 700;
  color: var(--pos-color-interactive);
}

.pos-header-modal .pos-header-toggle {
  position: absolute;
  left: -100vw;
}

.pos-header-modal>ul {
  position: absolute;
  inset-block-start: calc(100% + 1.8rem);
  inset-inline-start: -0.5rem;
  display: flex;
  flex-direction: column;
  background-color: var(--pos-color-panel-background);
  width: 307px;
  padding: var(--pos-gap-tag-v, 8px) 0;
  align-items: flex-start;
  border-top: 1px solid var(--pos-color-divider-lines, #e2e8f0);
  border-right: 1px solid var(--pos-color-divider-lines, #e2e8f0);
  background: var(--pos-color-panel-background, #fff);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.pos-header-modal>ul:before {
  width: 106px;
  height: 3px;
  position: absolute;
  top: -3px;
  background: linear-gradient(270deg,
      var(--header-submenu-gradient-from) 0%,
      var(--header-submenu-gradient-to) 98.94%);
  content: "";
}

.pos-header-modal .pos-header-toggle:checked+ul {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pos-header nav>ul.mobile-subheader-links {
  display: none;
}

.mobile-login {
  display: none;
}

.close {
  display: none;
}

/* mobile navigation
============================================================================ */
.pos-subheader-mobile {
  display: none;
}

@media screen and (max-width: 900px) {
  .mobile-empty {
    display: none !important;
  }

  .pos-subheader-mobile {
    display: block;
    font-family: var(--pos-font-default);
    padding: 16px var(--pos-gap-step-step, 24px);
    background: var(--pos-color-page-background, #f7f8fa);
  }

  .pos-subheader-mobile .news {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
  }

  .pos-subheader-mobile .news a {
    display: block;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: clamp(180px, 65vw, 600px);

    font-size: 1rem;
    line-height: 1.4;

    /* Improve rendering performance */
    will-change: contents;
    contain: layout;
  }

  .header-buttons>a:first-child {
    display: none;
  }
}

@media (max-width: 900px) {
  .pos-header {
    position: relative;
  }

  .pos-header:has(#toggleMenu:checked) .open {
    display: none;
  }

  .pos-header:has(#toggleMenu:checked) .close {
    display: block;
  }

  .pos-header nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--pos-color-panel-background);
    display: none;
    flex-direction: column;
  }

  .pos-header:has(#toggleMenu:checked) nav {
    display: flex;
  }

  .pos-header nav>ul {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 16px 0;
  }

  .pos-header-modal {
    width: 100%;
    align-items: start;
    justify-content: baseline;
  }

  .pos-header-modal label {
    width: 100%;
    padding: 1rem 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--pos-color-panel-background);
    pointer-events: auto;
  }

  .pos-header-modal:has(.pos-header-toggle:checked) label {
    font-weight: 700;
    color: var(--pos-color-interactive);
  }

  .pos-header-modal ul {
    all: unset;
    display: none;
    width: 100%;
    flex-direction: column;
    background-color: var(--pos-color-panel-background);
    transition: max-height 0.3s ease-in-out;
    z-index: 20;
  }

  .pos-header-modal .pos-header-toggle:checked+ul {
    display: flex;
  }

  .pos-header-modal>ul:before {
    display: none;
  }

  .pos-header nav>ul.mobile-subheader-links {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--pos-color-divider-lines, #e2e8f0);
    padding: 16px 0;
  }

  .pos-header nav>ul.mobile-subheader-links>li>a {
    display: flex;
    height: 48px;
    align-items: center;
    padding: 0px var(--pos-padding-cards-boxes, 24px);
    width: 100%;
  }

  .pos-header nav>ul.mobile-subheader-links>li>a>svg {
    margin-left: auto;
  }

  .mobile-login {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    padding: 16px var(--pos-padding-cards-boxes, 24px);
    border-top: 1px solid var(--pos-color-divider-lines, #e2e8f0);
  }

  .mobile-login button>a {
    color: var(--pos-color-button-primary-text-normal) !important;
  }

  .mobile-login>div {
    display: flex;
    height: 40px;
    padding: 0 var(--pos-gap-n-button, 16px);
    border-radius: var(--pos-corner-tag, 40px);
    border: 2px solid var(--pos-color-button-secondary-stroke-normal, #b6bdca);
    align-items: center;
    gap: var(--pos-gap-s-button, 8px);
  }
}

form[data-form="themeForm"] {
  position: relative;
}

#light-button {
  padding-left: 10px;
  justify-content: center;
  align-items: center;
  display: flex;
  height: 35px;
  width: 35px;
  position: absolute;
  top: -6px;
  left: -11px;
}

#dark-button {
  justify-content: center;
  align-items: center;
  display: flex;
  height: 35px;
  width: 35px;
  position: absolute;
  top: -6px;
  left: 23px;
  padding-right: 10px;
}

/* navigation content
============================================================================ */
.pos-header-modal a {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: stretch;
  min-width: 307px;
  text-decoration: none;
}

.pos-header-modal a:hover {
  background: var(--pos-color-highlighted-background, #eff2f6);
  color: var(--pos-color-prominent, #141414);
  font-size: 1rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25em;
}

.pos-header-modal .menu-indent {
  padding-left: 48px;
}

@media (max-width: 900px) {
  .pos-header-modal a {
    padding-inline-start: 3rem !important;
    border-radius: 0 !important;
  }

  .pos-header-modal .menu-indent {
    padding-inline-start: 4rem !important;
  }
}

.header-left {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--pos-gap-step-step, 24px);
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: var(--pos-gap-n-button, 16px);
}

/* responsivity
============================================================================ */

.small-logo {
  display: none;
}

.full-logo {
  display: block;
}

.pos-header h1 {
  font-size: 1em;
}

.svg-display {
  display: inline-block;
}

@media screen and (max-width: 400px) {
  .header-left {
    max-width: 150px;
    justify-content: end;
  }

  .full-logo {
    scale: 0.8;
  }
}

.full-logo-path {
  fill: var(--pos-color-prominent);
}