/*
 * Shared navigation state for the unified header.
 * Loaded after page-specific styles by site-header-unify.js.
 */

html body header.gptishka-unified-header .header-quick-link.is-current-section,
html body header.gptishka-unified-header .header-quick-link[aria-current="page"],
html body header.gptishka-canonical-header .header-quick-link.is-current-section,
html body header.gptishka-canonical-header .header-quick-link[aria-current="page"] {
  color: rgba(255, 255, 255, 0.98) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  border-color: rgba(72, 237, 157, 0.34) !important;
  background: rgba(53, 229, 141, 0.13) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 10px 28px rgba(20, 180, 112, 0.12) !important;
}

html body header.gptishka-unified-header .header-quick-link.is-current-section::before,
html body header.gptishka-unified-header .header-quick-link[aria-current="page"]::before,
html body header.gptishka-canonical-header .header-quick-link.is-current-section::before,
html body header.gptishka-canonical-header .header-quick-link[aria-current="page"]::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #35e58d;
  box-shadow: 0 0 0 4px rgba(53, 229, 141, 0.1), 0 0 16px rgba(53, 229, 141, 0.42);
}

html body header,
html body header.gptishka-unified-header,
html body header.gptishka-canonical-header {
  position: sticky !important;
  top: 0 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

html body header .header-product-pill,
html body header.gptishka-unified-header .header-product-pill,
html body header.gptishka-canonical-header .header-product-pill {
  color: #03110a !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #2bdc86 0%, #16b876 52%, #0e8a58 100%) !important;
  border: 0 !important;
  box-shadow:
    0 0 0 1px rgba(53, 216, 135, 0.16),
    0 14px 34px rgba(24, 185, 120, 0.22) !important;
}

html body header .header-quick-link:not(.header-social-link):not(.is-current-section):not([aria-current="page"]),
html body header.gptishka-unified-header .header-quick-link:not(.header-social-link):not(.is-current-section):not([aria-current="page"]),
html body header.gptishka-canonical-header .header-quick-link:not(.header-social-link):not(.is-current-section):not([aria-current="page"]) {
  position: relative !important;
  color: rgba(255, 255, 255, 0.66) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  background: rgba(255, 255, 255, 0.043) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.043),
    0 8px 18px rgba(0, 0, 0, 0.12) !important;
}

html body header .lang-current,
html body header.gptishka-unified-header .lang-current,
html body header.gptishka-canonical-header .lang-current {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  background: rgba(10, 12, 18, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}

html body header .header-quick-link.header-social-link,
html body header .header-quick-link.header-social-link:hover,
html body header .header-quick-link.header-social-link:focus-visible {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  flex: 0 0 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body header .header-quick-link.header-social-link {
  transition: color 180ms ease, transform 180ms ease !important;
}

html body header .header-quick-link.header-social-link--vk {
  color: #0077ff !important;
}

html body header .header-quick-link.header-social-link--telegram {
  color: #229ed9 !important;
}

html body header .header-social-link--vk + .header-social-link--telegram {
  margin-left: -8px !important;
}

html body header .header-quick-link.header-social-link--vk:hover,
html body header .header-quick-link.header-social-link--vk:focus-visible {
  color: #2d91ff !important;
  transform: translateY(-2px) !important;
  outline: none !important;
}

html body header .header-quick-link.header-social-link--telegram:hover,
html body header .header-quick-link.header-social-link--telegram:focus-visible {
  color: #4ab3e6 !important;
  transform: translateY(-2px) !important;
  outline: none !important;
}

html body header .header-social-icon {
  display: block;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
  fill: currentColor !important;
}

html body header .header-social-icon.header-social-icon--telegram {
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  flex-basis: 20px !important;
}

html body header .header-social-icon.header-social-icon--vk {
  transform: translateX(3px);
}

html body header .header-social-icon.header-social-icon--telegram {
  transform: translateX(-3px);
}

@media (min-width: 1181px) {
  html body header.gptishka-canonical-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    width: min(1680px, calc(100% - clamp(28px, 7vw, 144px))) !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 8px auto 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
  }

  html body header .nav.nav-shell,
  html body header.gptishka-canonical-header .nav.nav-shell,
  html body:has(main.redeem-page) header .nav.nav-shell,
  html body:has(main.bundle-activation-page) header .nav.nav-shell,
  html body:has(main.vpn-activation-page) header .nav.nav-shell,
  html body:has(main.vpn-activation-wrap) header .nav.nav-shell,
  html body.vpn-activation-flow header .nav.nav-shell {
    width: 100% !important;
    min-height: 54px !important;
    height: 54px !important;
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    justify-content: normal !important;
    column-gap: clamp(12px, 1.35vw, 20px) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html body header.gptishka-canonical-header .logo-link.logo-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-width: 0 !important;
    height: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body header.gptishka-canonical-header .logo-img.logo-img {
    display: block !important;
    width: auto !important;
    height: 32px !important;
    max-width: none !important;
    max-height: 32px !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.32)) !important;
  }

  html body header .header-product-pill,
  html body header.gptishka-unified-header .header-product-pill,
  html body header.gptishka-canonical-header .header-product-pill {
    min-height: 42px !important;
    height: 42px !important;
    padding: 7px 18px 7px 9px !important;
  }

  html body header .header-product-pill__logo,
  html body header.gptishka-unified-header .header-product-pill__logo,
  html body header.gptishka-canonical-header .header-product-pill__logo {
    width: 28px !important;
    height: 28px !important;
  }

  html body header .header-quick-links,
  html body header.gptishka-unified-header .header-quick-links,
  html body header.gptishka-canonical-header .header-quick-links,
  html body:has(main.redeem-page) header .header-quick-links,
  html body:has(main.bundle-activation-page) header .header-quick-links,
  html body:has(main.vpn-activation-page) header .header-quick-links,
  html body:has(main.vpn-activation-wrap) header .header-quick-links,
  html body.vpn-activation-flow header .header-quick-links {
    justify-self: end !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  html body header .header-tools,
  html body header .header-actions,
  html body header.gptishka-unified-header .header-tools,
  html body header.gptishka-unified-header .header-actions,
  html body header.gptishka-canonical-header .header-tools,
  html body header.gptishka-canonical-header .header-actions {
    grid-column: 4 !important;
    justify-self: end !important;
    gap: 10px !important;
  }
}

@media (min-width: 1181px) and (max-width: 1320px) {
  html body header .header-quick-link:not(.header-social-link),
  html body header.gptishka-unified-header .header-quick-link:not(.header-social-link) {
    min-height: 36px !important;
    padding: 0 11px !important;
    font-size: 12px !important;
  }
}

@media (min-width: 1321px) {
  html body header .header-quick-link:not(.header-social-link),
  html body header.gptishka-unified-header .header-quick-link:not(.header-social-link) {
    min-height: 38px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
  }
}

/*
 * Responsive canonical header.
 * Preserve the desktop composition on tablets and keep every navigation
 * control available in a compact two-row layout on portrait devices.
 */
@media (min-width: 861px) and (max-width: 1180px) {
  html body header.gptishka-canonical-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    width: calc(100% - 28px) !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 8px auto 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body header.gptishka-canonical-header .nav.nav-shell {
    width: 100% !important;
    min-height: 50px !important;
    height: 50px !important;
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: clamp(8px, 1.2vw, 14px) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body header.gptishka-canonical-header .logo-link.logo-link {
    width: auto !important;
    height: 50px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body header.gptishka-canonical-header .logo-img.logo-img {
    width: auto !important;
    height: 29px !important;
    max-width: none !important;
    max-height: 29px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill {
    min-width: 0 !important;
    max-width: 220px !important;
    min-height: 38px !important;
    height: 38px !important;
    gap: 7px !important;
    padding: 6px 12px 6px 7px !important;
    font-size: 12px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill__logo {
    width: 25px !important;
    height: 25px !important;
    flex: 0 0 25px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body header.gptishka-canonical-header .header-quick-links {
    display: flex !important;
    justify-self: end !important;
    justify-content: flex-end !important;
    gap: 2px !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body header.gptishka-canonical-header .header-quick-link:not(.header-social-link) {
    min-height: 34px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
  }

  html body header.gptishka-canonical-header .header-quick-link.header-social-link {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    flex: 0 0 34px !important;
  }

  html body header.gptishka-canonical-header .header-social-icon.header-social-icon--vk {
    width: 21px !important;
    min-width: 21px !important;
    height: 21px !important;
    transform: translateX(2px) !important;
  }

  html body header.gptishka-canonical-header .header-social-icon.header-social-icon--telegram {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    flex-basis: 18px !important;
    transform: translateX(-2px) !important;
  }

  html body header.gptishka-canonical-header .header-tools,
  html body header.gptishka-canonical-header .header-actions {
    grid-column: 4 !important;
    justify-self: end !important;
    min-width: 0 !important;
    gap: 6px !important;
  }

  html body header.gptishka-canonical-header .lang-current {
    min-height: 40px !important;
    padding: 7px 11px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 860px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  html body header.gptishka-canonical-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    width: calc(100% - 24px) !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 8px auto 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body header.gptishka-canonical-header .nav.nav-shell {
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 42px 38px !important;
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  html body header.gptishka-canonical-header .logo-link.logo-link {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body header.gptishka-canonical-header .logo-img.logo-img {
    display: block !important;
    width: auto !important;
    height: 28px !important;
    max-width: 148px !important;
    max-height: 28px !important;
    object-fit: contain !important;
  }

  html body header.gptishka-canonical-header .header-tools,
  html body header.gptishka-canonical-header .header-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    min-width: 0 !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body header.gptishka-canonical-header .lang-current {
    min-height: 38px !important;
    height: 38px !important;
    gap: 7px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    min-width: 0 !important;
    max-width: 190px !important;
    min-height: 36px !important;
    height: 36px !important;
    gap: 7px !important;
    padding: 5px 11px 5px 6px !important;
    font-size: 11px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill__logo {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body header.gptishka-canonical-header .header-quick-links {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 2px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body header.gptishka-canonical-header .header-quick-link:not(.header-social-link) {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }

  html body header.gptishka-canonical-header .header-quick-link.header-social-link {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 32px !important;
    min-height: 32px !important;
    flex: 0 0 30px !important;
  }

  html body header.gptishka-canonical-header .header-social-icon.header-social-icon--vk {
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
    transform: translateX(1px) !important;
  }

  html body header.gptishka-canonical-header .header-social-icon.header-social-icon--telegram {
    width: 17px !important;
    min-width: 17px !important;
    height: 17px !important;
    flex-basis: 17px !important;
    transform: translateX(-1px) !important;
  }

  html body header.gptishka-canonical-header .header-social-link--vk + .header-social-link--telegram {
    margin-left: -5px !important;
  }
}

@media (max-width: 520px) {
  html body header.gptishka-canonical-header {
    width: calc(100% - 20px) !important;
    margin-top: 6px !important;
  }

  html body header.gptishka-canonical-header .nav.nav-shell {
    grid-template-rows: 40px 36px !important;
    column-gap: 6px !important;
    row-gap: 5px !important;
  }

  html body header.gptishka-canonical-header .logo-link.logo-link {
    height: 40px !important;
  }

  html body header.gptishka-canonical-header .logo-img.logo-img {
    height: 26px !important;
    max-width: 132px !important;
    max-height: 26px !important;
  }

  html body header.gptishka-canonical-header .lang-current {
    min-height: 36px !important;
    height: 36px !important;
    gap: 6px !important;
    padding: 5px 9px !important;
    font-size: 11px !important;
  }

  html body header.gptishka-canonical-header .lang-current img,
  html body header.gptishka-canonical-header .lang-current .lang-flag-img {
    width: 23px !important;
    height: 17px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill {
    max-width: 152px !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 5px 8px 5px 5px !important;
    font-size: 10px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill__logo {
    width: 22px !important;
    height: 22px !important;
    flex-basis: 22px !important;
  }

  html body header.gptishka-canonical-header .header-quick-link:not(.header-social-link) {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 6px !important;
    font-size: 9px !important;
  }

  html body header.gptishka-canonical-header .header-quick-link.header-social-link {
    width: 27px !important;
    min-width: 27px !important;
    max-width: 27px !important;
    height: 30px !important;
    min-height: 30px !important;
    flex-basis: 27px !important;
  }

  html body header.gptishka-canonical-header .header-social-icon.header-social-icon--vk {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
  }

  html body header.gptishka-canonical-header .header-social-icon.header-social-icon--telegram {
    width: 15px !important;
    min-width: 15px !important;
    height: 15px !important;
    flex-basis: 15px !important;
  }
}

@media (max-width: 360px) {
  html body header.gptishka-canonical-header .logo-img.logo-img {
    max-width: 124px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill {
    max-width: 140px !important;
  }

  html body header.gptishka-canonical-header .header-quick-link:not(.header-social-link) {
    padding-inline: 5px !important;
    font-size: 8.5px !important;
  }
}

@media (max-width: 340px) {
  html body header.gptishka-canonical-header .logo-img.logo-img {
    max-width: 116px !important;
  }

  html body header.gptishka-canonical-header .header-product-pill {
    max-width: 122px !important;
  }

  html body header.gptishka-canonical-header .header-quick-link:not(.header-social-link) {
    padding-inline: 4px !important;
    font-size: 8px !important;
  }

  html body header.gptishka-canonical-header .header-quick-link.header-social-link {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    flex-basis: 24px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body header .header-quick-link.header-social-link {
    transition: none !important;
  }
}
