/* Desktop (>980px): Apple-style slim top bar; Mobile/narrow (<=980px): 48px borderless auto-hiding topbar + floating side pill. */
@media (min-width: 981px) {
  html.hly-lang-suggest-open main {
    padding-top: var(--hly-lang-bar-h, 0px) !important;
  }
}

#hly-lang-suggest {
  position: fixed;
  top: var(--hly-lang-bar-top, 72px);
  left: 0;
  right: 0;
  z-index: 19;
  background: #f2f7f3;
  border-top: 1px solid #d5e4dc;
  border-bottom: 1px solid #aac6b9;
  box-shadow: 0 8px 24px rgba(6, 59, 51, 0.12);
  color: #17302a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Arabic", "Noto Sans Hebrew", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  box-sizing: border-box;
}

#hly-lang-suggest *,
#hly-lang-suggest *::before,
#hly-lang-suggest *::after {
  box-sizing: border-box;
}

.hly-lang-suggest-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hly-lang-suggest-text {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: #17302a;
  flex: 1 1 260px;
}

.hly-lang-suggest-text strong {
  color: #063b33;
  font-weight: 700;
}

.hly-lang-suggest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.hly-lang-suggest-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #075044;
  color: #ffffff !important;
  border: 1px solid #075044;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hly-lang-suggest-go:hover {
  background: #063b33;
  border-color: #063b33;
}

.hly-lang-globe {
  display: none;
  flex-shrink: 0;
}

.hly-lang-go-short {
  display: none;
}

.hly-lang-go-full {
  display: inline;
}

.hly-lang-suggest-stay {
  appearance: none;
  background: #ffffff;
  color: #075044;
  border: 1px solid #aac6b9;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hly-lang-suggest-stay:hover {
  background: #e6f1eb;
  border-color: #075044;
}

.hly-lang-suggest-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #364a43;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.hly-lang-suggest-close:hover {
  background: #d5e4dc;
  color: #063b33;
}

.hly-lang-suggest-go:focus-visible,
.hly-lang-suggest-stay:focus-visible,
.hly-lang-suggest-close:focus-visible {
  outline: 2px solid #063b33;
  outline-offset: 2px;
}

@media (max-width: 980px) {
  header.topbar {
    transition: transform 0.22s ease;
    will-change: transform;
  }

  html.hly-mobile-topbar-hidden header.topbar {
    transform: translateY(-105%);
  }

  header.topbar .main-nav {
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 12px !important;
    gap: 8px !important;
    align-items: center !important;
  }

  header.topbar .brand {
    gap: 6px !important;
  }

  header.topbar .brand img,
  header.topbar .brand-mark {
    height: 26px !important;
    width: auto !important;
  }

  header.topbar .brand .brand-wordmark {
    height: 22px !important;
    max-width: 96px !important;
    width: auto !important;
  }

  header.topbar .brand span {
    font-size: 13.5px !important;
  }

  header.topbar .nav-actions {
    gap: 4px !important;
  }

  header.topbar .mobile-language-trigger,
  header.topbar .mobile-menu {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    min-height: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.15s ease;
  }

  header.topbar .mobile-language-trigger {
    min-width: 34px !important;
    width: auto !important;
    padding: 0 6px !important;
    gap: 4px !important;
  }

  header.topbar .mobile-language-trigger span {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    opacity: 0.92;
  }

  header.topbar .mobile-menu {
    min-width: 34px !important;
    width: 34px !important;
    padding: 0 !important;
  }

  header.topbar .mobile-language-trigger:hover,
  header.topbar .mobile-menu:hover {
    background: rgba(255, 255, 255, 0.12) !important;
  }

  header.topbar .mobile-language-trigger svg,
  header.topbar .mobile-menu svg {
    width: 20px !important;
    height: 20px !important;
  }

  html[data-hly-enterprise="products"] #hly-product-categories {
    top: 48px !important;
    scroll-margin-top: 48px !important;
    transition: top 0.22s ease;
  }

  html.hly-mobile-topbar-hidden[data-hly-enterprise="products"] #hly-product-categories {
    top: 0 !important;
  }

  /* Compact floating side pill above .site-contact-dock */
  #hly-lang-suggest {
    top: auto !important;
    left: auto !important;
    right: 12px !important;
    bottom: var(--hly-lang-pill-bottom, calc(70px + env(safe-area-inset-bottom))) !important;
    width: auto;
    max-width: calc(100vw - 24px);
    z-index: 9985;
    border-radius: 999px;
    border: 1.5px solid #075044;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(6, 59, 51, 0.18);
    transition: bottom 0.2s ease;
  }

  html[dir="rtl"] #hly-lang-suggest {
    left: 12px !important;
    right: auto !important;
  }

  .hly-lang-suggest-inner {
    padding: 4px 5px 4px 11px;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .hly-lang-suggest-text,
  .hly-lang-suggest-stay,
  .hly-lang-go-full {
    display: none;
  }

  .hly-lang-suggest-actions {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .hly-lang-suggest-go {
    background: transparent;
    color: #075044 !important;
    border: 0;
    padding: 4px 2px;
    font-size: 12.5px;
    font-weight: 700;
  }

  .hly-lang-suggest-go:hover {
    background: transparent;
    color: #063b33 !important;
  }

  .hly-lang-globe {
    display: inline-block;
    color: #075044;
  }

  .hly-lang-go-short {
    display: inline;
  }

  .hly-lang-suggest-close {
    min-width: 24px;
    min-height: 24px;
    border-radius: 999px;
    background: #eef5f1;
    color: #17302a;
    font-size: 15px;
  }
}
