.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding-top: 24px;
  isolation: isolate;
}

.header-short .container {
  max-width: 1440px;
}

.header__link-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline-end: 8px;
}

.header__body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  min-height: 72px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.18) 100%),
    rgba(20, 21, 23, 0.98);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 20px 60px rgba(0, 0, 0, 0.18);
}

@supports (backdrop-filter: blur(30px)) {
  .header__body {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.16) 100%),
      rgba(20, 21, 23, 0.9);
    backdrop-filter: blur(30px);
  }
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 0 0 auto;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.header-logo__icon {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}

.header-logo__icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.header-logo__text {
  display: block;
  min-width: 0;
  white-space: nowrap;
}

.header__menu--desktop {
  display: flex;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.header__menu {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
}

.header__list {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.header__list li {
  margin-left: 0;
}

.header__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  padding: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.header__link::before,
.header__products-submenu-link::before {
  content: "";
  position: absolute;
  inset: -10px -12px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px transparent;
  opacity: 0;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
  z-index: -1;
}

.header__link:hover {
  color: #ffffff;
  opacity: 0.84;
}

.header__products-submenu-link.active {
  color: var(--primary);
  opacity: 1;
}

.header__products-submenu-link:hover {
  color: #ffffff;
  opacity: 1;
}

.header__products-submenu-link:hover::before {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.header__products-submenu-link.active::before {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 10px 24px rgba(0, 0, 0, 0.16);
}

.header__link--login {
  font-weight: 700;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.header__guest-action {
  display: flex;
  align-items: center;
}

.header__auth-link {
  padding: 0 4px;
}

.header__cta {
  min-height: 40px;
  padding: 10px 20px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.1);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  white-space: nowrap;
}

.header__actions .user-avatar {
  margin-left: 0;
}

.header__actions .user-avatar img,
.header__actions .avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.header__drawer {
  display: none;
}

.header__drawer-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.header__burger {
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
  z-index: 205;
}

.header__burger::before,
.header__burger::after {
  content: "";
  background-color: #fff;
  position: absolute;
  width: 18px;
  height: 2px;
  left: 11px;
  transition:
    transform 0.3s ease,
    top 0.3s ease,
    bottom 0.3s ease,
    opacity 0.3s ease;
}

.header__burger::before {
  top: 13px;
}

.header__burger::after {
  bottom: 13px;
}

.header__burger span {
  background-color: #fff;
  position: absolute;
  width: 18px;
  height: 2px;
  left: 11px;
  top: 19px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__burger.active::before {
  transform: rotate(45deg);
  top: 19px;
}

.header__burger.active::after {
  transform: rotate(-45deg);
  bottom: 19px;
}

.header__burger.active span {
  opacity: 0;
  transform: translateX(-12px);
}

.header__drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 150;
}

.header__drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.language-list {
  background: #18181f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.language-list li + li {
  margin-top: 4px;
}

.language-list a,
.language-list button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  border: none;
  background: transparent;
  text-align: left;
}

.language-list a:hover,
.language-list button:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.language-list a.active,
.language-list button.active {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--primary);
}

.language-select-dropdown .language-list {
  position: static;
  top: auto;
  right: auto;
  min-width: 100%;
}

.language-select {
  display: inline-flex;
  width: auto;
}

.language-select__trigger {
  justify-content: flex-start;
  text-align: left;
}

.header__drawer .language-select {
  width: auto;
  max-width: 80vw;
}

.header__drawer .language-select__trigger {
  width: auto;
  min-width: 160px;
  max-width: min(240px, 80vw);
}

.language-select.ds-language-select-shell {
  width: auto;
  overflow: visible;
}

.language-select.ds-language-select-shell .language-select__trigger.ds-language-trigger {
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
}

.language-select.ds-language-select-shell .language-select__trigger.ds-language-trigger.language-select__trigger--open {
  color: var(--primary);
}

.language-select.ds-language-select-shell .language-select-dropdown,
.language-select-dropdown.ds-language-select-shell {
  z-index: 10040;
}

.language-select.ds-language-select-shell .language-select-dropdown .language-list,
.language-select-dropdown.ds-language-select-shell .language-list {
  position: static;
  top: auto;
  right: auto;
  min-width: 100%;
  padding: 0;
  background:
    linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.05) 100%
    ),
    #141517;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
}

.language-select.ds-language-select-shell .language-select-dropdown ul,
.language-select-dropdown.ds-language-select-shell ul {
  margin: 0;
  padding: 0 !important;
  list-style: none;
}

.language-select.ds-language-select-shell .language-list img,
.language-select-dropdown.ds-language-select-shell .language-list img {
  display: block;
}

.language-select.ds-language-select-shell .language-list span,
.language-select-dropdown.ds-language-select-shell .language-list span {
  color: #fff;
}

.language-select.ds-language-select-shell .language-list::before,
.language-select.ds-language-select-shell .language-list::after,
.language-select-dropdown.ds-language-select-shell .language-list::before,
.language-select-dropdown.ds-language-select-shell .language-list::after {
  content: "";
  position: absolute;
  left: 0;
  right: 10px;
  height: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 1;
}

.language-select.ds-language-select-shell .language-list::before,
.language-select-dropdown.ds-language-select-shell .language-list::before {
  top: 0;
  background: linear-gradient(
    180deg,
    rgba(24, 24, 31, 0.98) 0%,
    rgba(24, 24, 31, 0) 100%
  );
}

.language-select.ds-language-select-shell .language-list::after,
.language-select-dropdown.ds-language-select-shell .language-list::after {
  bottom: 0;
  background: linear-gradient(
    0deg,
    rgba(24, 24, 31, 0.98) 0%,
    rgba(24, 24, 31, 0) 100%
  );
}

.language-select.ds-language-select-shell .language-list.language-list--scroll-up::before,
.language-select.ds-language-select-shell .language-list.language-list--scroll-down::after,
.language-select-dropdown.ds-language-select-shell .language-list.language-list--scroll-up::before,
.language-select-dropdown.ds-language-select-shell .language-list.language-list--scroll-down::after {
  opacity: 1;
}

.language-select.ds-language-select-shell .language-list button,
.language-select-dropdown.ds-language-select-shell .language-list button {
  display: flex;
  width: 100%;
  align-items: center;
  align-self: stretch;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 0;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 18px;
}

.language-select.ds-language-select-shell .language-list button:hover,
.language-select-dropdown.ds-language-select-shell .language-list button:hover {
  background: rgba(255, 255, 255, 0.04);
}

.language-select.ds-language-select-shell .language-list button.active .language-select__native-name,
.language-select-dropdown.ds-language-select-shell .language-list button.active .language-select__native-name {
  color: var(--primary);
}

.language-select.ds-language-select-shell .language-list button.active,
.language-select-dropdown.ds-language-select-shell .language-list button.active {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0;
}

.language-select.ds-language-select-shell .language-list button.language-select__item--active-first,
.language-select-dropdown.ds-language-select-shell .language-list button.language-select__item--active-first {
  border-radius: 12px 12px 0 0;
}

.language-select.ds-language-select-shell .language-list button.language-select__item--active-last,
.language-select-dropdown.ds-language-select-shell .language-list button.language-select__item--active-last {
  border-radius: 0 0 12px 12px;
}

.language-select.ds-language-select-shell .language-select__native-name,
.language-select-dropdown.ds-language-select-shell .language-select__native-name {
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 18px;
}

.language-select.ds-language-select-shell .language-select__trigger-label {
  white-space: nowrap;
}

.header__drawer .header-link {
  width: 100%;
  display: block;
}

.header__drawer .header__dropdown-button {
  width: 100%;
  justify-content: flex-start;
}

.header__drawer .header-link {
  width: 100%;
}

.header__products {
  width: 100%;
}

.header__products-toggle-btn {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  background-color: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
}

.header__products-toggle-ico {
  display: flex;
  transition: transform 0.2s ease;
}

.header__products-toggle-ico.open {
  transform: rotate(180deg);
}

.header__products-submenu {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 16px 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.header__products-submenu.open {
  display: flex;
}

.header__products-submenu-link {
  padding-left: 0;
  justify-content: flex-start;
  font-weight: 400;
  line-height: 24px;
}

.header__dropdown-button {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
}

.header__dropdown-button .ico,
.header__dropdown-button .info {
  display: inline-flex;
  align-items: center;
}

.header__dropdown-button .ico {
  width: 16px;
  height: 16px;
  justify-content: center;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

.header__dropdown-button .ico svg {
  transform: none;
}

.dropdown__body.header__dropdown-body {
  min-width: 209px;
  padding: 0;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%),
    #141517;
  overflow: hidden;
}

.dropdown__body.header__dropdown-body.is-open {
  display: flex;
}

.header__dropdown.dropdown-open .header__dropdown-button .ico svg {
  transform: none;
}

.header__dropdown.dropdown-open .header__dropdown-button .ico {
  transform: rotate(0deg);
}

.dropdown__body.header__dropdown-body .btn {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  align-self: stretch;
  width: 100%;
  margin: 0;
  gap: 0;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 0;
  text-align: left;
  color: #ffffff;
  font-weight: 400;
  line-height: 24px;
}

.dropdown__body.header__dropdown-body .btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.dropdown__body.header__dropdown-body .btn.active {
  color: var(--primary);
  min-height: 44px;
  padding: 0 24px;
  border-radius: 0;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.dropdown__body.header__dropdown-body.header__dropdown-body--tools {
  max-height: min(420px, calc(100vh - 120px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.header__dropdown-placeholder {
  min-height: 24px;
}

.header__products-submenu-placeholder {
  min-height: 24px;
}

@media (max-width: 1200px) {
  .header {
    padding-top: 16px;
  }

  .header__body {
    min-height: 64px;
    gap: 16px;
    padding: 14px 16px;
  }

  .header__brand {
    flex: 1 1 auto;
    gap: 12px;
  }

  .header__menu--desktop {
    display: none;
  }

  .header__burger {
    display: inline-flex;
  }

  .header__actions {
    gap: 12px;
  }

  .header__guest-action {
    display: none;
  }

  .header.header--drawer-open {
    display: none;
  }

  .header__drawer {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    background: #1a1b1f;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 24px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    margin-left: 0;
    z-index: 200;
    overflow: hidden;
  }

  .header__drawer.open {
    transform: translateX(0);
  }

  [dir="rtl"] .header__drawer {
    transform: translateX(100%);
  }

  [dir="rtl"] .header__drawer.open {
    transform: translateX(0);
  }

  .header__drawer-header {
    display: flex;
    width: 100%;
    min-height: 64px;
    margin: 0 0 24px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%),
      rgba(20, 21, 23, 0.72);
    backdrop-filter: blur(30px);
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
  }

  .header__drawer-header-actions {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }

  .header__drawer-header-actions.header__guest-action {
    display: inline-flex;
  }

  .header__drawer-header .header__auth-link {
    display: inline-flex;
    white-space: nowrap;
  }

  .header__drawer-header .header__cta {
    width: auto;
    max-width: fit-content;
    white-space: nowrap;
  }

  .header__menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 16px;
  }

  .header__menu--mobile,
  .header__menu--mobile .header__list {
    width: 100%;
  }

  .header__menu--mobile {
    flex: 1 1 auto;
    min-height: 0;
    justify-content: space-between;
    gap: 0;
  }

  .header__drawer-scroll {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    padding-bottom: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .header__drawer-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .header__menu--mobile .header__list {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 0;
  }

  .header__menu--mobile .header__list li {
    margin: 0;
    width: 100%;
  }

  .header__drawer .header__link,
  .header__drawer .header__products-toggle-btn {
    width: 100%;
    justify-content: flex-start;
    min-height: auto;
    padding: 0;
    line-height: 24px;
  }

  .header__drawer .header__link::before,
  .header__drawer .header__products-toggle-btn::before,
  .header__drawer .header__products-submenu-link::before {
    display: none;
  }

  .header__drawer .header__link:hover,
  .header__drawer .header__products-toggle-btn:hover,
  .header__drawer .header__products-submenu-link:hover {
    opacity: 1;
  }

  .header__drawer .header__link.active,
  .header__drawer .header__products-toggle-btn.active {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    color: var(--primary);
    opacity: 1;
  }

  .header__drawer .header__link.active::before,
  .header__drawer .header__products-toggle-btn.active::before {
    opacity: 0;
    background: transparent;
    box-shadow: none;
  }

  .header__drawer .header__link--login {
    justify-content: center;
    text-align: center;
  }

  .header__drawer .language-select {
    width: auto;
    max-width: 100%;
  }

  .header__drawer .language-select__trigger {
    width: auto;
    min-width: 160px;
    max-width: min(240px, 80vw);
  }

  .header__drawer .header-link {
    width: 100%;
    display: block;
  }

  .header__drawer .header__dropdown-button {
    width: 100%;
    justify-content: flex-start;
  }

  .header__drawer .header__products-submenu {
    width: 100%;
    gap: 0;
    margin-top: 8px;
    padding: 0;
    border-left: 0;
  }

  .header__drawer .header__products-submenu-link {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    align-self: stretch;
    justify-content: flex-start;
    min-height: 44px;
    padding: 10px 16px;
    line-height: 24px;
    font-weight: 400;
    background: transparent;
  }

  .header__drawer .header__products-submenu-link:hover {
    color: #ffffff;
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
  }

  .header__drawer .header__products-submenu-link.active {
    min-height: 44px;
    padding: 10px 16px;
    color: var(--primary);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
  }

  .header__drawer .header__products-submenu-link.active::before {
    opacity: 0;
    background: transparent;
    box-shadow: none;
  }

  .header__drawer .header__cta {
    width: 100%;
    justify-content: center;
    max-width: none;
  }

  .header__drawer-footer {
    flex: 0 0 auto;
    width: min(353px, 100%);
    margin: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 8px;
    background: #1a1b1f;
  }

  .header--drawer-open .header__actions,
  .header__actions.header__actions--hidden {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .header {
    padding-top: 12px;
  }

  .header__body {
    min-height: 58px;
    gap: 12px;
    padding: 12px;
  }

  .header__brand {
    gap: 8px;
  }

  .header__actions {
    gap: 10px;
  }

  .header__task-queue-button {
    display: none;
  }

  .header__auth-link {
    font-size: 16px;
  }

  .header__cta {
    min-height: 40px;
    padding: 10px 18px;
  }
}

@media (max-width: 460px) {
  .header__drawer-footer {
    display: flex;
  }

  .header__drawer-header-actions {
    display: none;
  }

  .header__drawer-header-actions--authenticated {
    display: inline-flex;
  }
}

@media (max-width: 575.98px) {
  .header-logo__text {
    display: none;
  }

  .header__drawer .header-logo__text {
    display: block;
  }
}

@media (max-width: 420px) {
  .header__brand {
    gap: 6px;
  }

  .header-logo {
    gap: 6px;
  }

  .header-logo__text {
    max-width: 96px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
  }

  .header__actions {
    gap: 6px;
    min-width: 0;
  }

  .header__auth-link {
    display: inline-flex !important;
    padding: 0;
    font-size: 16px;
  }

  .header__cta {
    max-width: 112px;
    overflow: hidden;
    padding: 10px 12px;
    font-size: 12px;
    text-overflow: ellipsis;
  }
}

@media (max-width: 374.98px) {
  .header__drawer-header:has(.header__drawer-header-actions--authenticated) .header-logo__text {
    display: none !important;
  }
}

@media (max-width: 320px) {
  .header__body {
    min-height: 56px;
    padding: 12px;
    max-width: 296px;
    justify-content: space-between;
  }

  .header-logo__text {
    display: none;
  }

  .header__auth-link,
  .header__cta {
    display: none !important;
  }

  .header__cta.header__authenticated-cta {
    display: inline-flex !important;
  }

  .header__drawer {
    padding: 12px 12px 20px;
  }

  .header__drawer-footer {
    width: 100%;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 0;
  }

  .header__drawer .header-logo__text,
  .header__drawer .header__cta,
  .header__drawer .header__auth-link {
    display: inline-flex !important;
  }

  .header__drawer .header__cta {
    min-height: 38px;
    padding: 9px 12px;
  }

  .header__drawer-header {
    width: 100%;
  }
}
