/* Shared public promo utility banner (v3). */

:root {
  --public-promo-h: 0px;
}

html.has-public-promo-banner,
html.has-public-promo-banner body {
  overflow-x: clip;
}

html.has-public-promo-banner iproam-public-header {
  position: sticky;
  top: var(--public-promo-h, 0px);
  z-index: 60;
  align-self: flex-start;
  flex-shrink: 0;
  width: 100%;
}

html.has-public-promo-banner.route-home iproam-public-header,
html.has-public-promo-banner.route-residential-product iproam-public-header,
html.has-public-promo-banner.route-mobile-product iproam-public-header {
  position: sticky;
  top: var(--public-promo-h, 0px);
  right: auto;
  left: auto;
  width: 100%;
  margin-bottom: calc(-1 * var(--ips-header-h));
}

html.route-auth .public-promo-banner,
.public-promo-banner[hidden] {
  display: none !important;
}

html.has-public-promo-banner.route-docs {
  --sticky-top: calc(var(--public-promo-h, 0px) + var(--header-h) + var(--bar-h));
}

html.has-public-promo-banner.route-docs .docs-rail-inner,
html.has-public-promo-banner.route-docs .docs-outline-inner {
  top: calc(var(--public-promo-h, 0px) + var(--header-h));
  max-height: calc(100vh - (var(--public-promo-h, 0px) + var(--header-h)));
}

html.has-public-promo-banner.route-docs .docs-mobilebar {
  top: calc(var(--public-promo-h, 0px) + var(--header-h));
}

html.has-public-promo-banner .toc-sidebar {
  top: calc(96px + var(--public-promo-h, 0px));
  max-height: calc(100vh - (120px + var(--public-promo-h, 0px)));
}

html.has-public-promo-banner .mobile-toc {
  top: calc(72px + var(--public-promo-h, 0px));
}

.public-promo-banner {
  position: sticky;
  top: 0;
  z-index: 61;
  box-sizing: border-box;
  align-self: flex-start;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: #24352e;
  background: #e7f4ee;
  border-bottom: 1px solid rgba(36, 53, 46, 0.12);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.public-promo-banner *,
.public-promo-banner *::before,
.public-promo-banner *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.public-promo-banner-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: calc(100% - 16px);
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0 auto;
  padding: 6px 0;
}

.public-promo-banner-text {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  color: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}

.public-promo-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 34px;
  max-width: 100%;
  padding: 0 12px;
  color: #ffffff;
  background: #007b5d;
  border: 0;
  border-radius: 4px;
  font-size: inherit;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.public-promo-banner-cta[hidden] {
  display: none !important;
}

.public-promo-banner-cta:hover {
  filter: brightness(0.92);
}

.public-promo-banner-cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.public-promo-banner-cta:focus:not(:focus-visible) {
  outline: none;
}

@media (max-width: 639px) {
  .public-promo-banner-inner {
    width: min(1200px, calc(100% - 12px));
    gap: 8px;
    padding: 6px 0;
  }

  .public-promo-banner-cta {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .public-promo-banner,
  .public-promo-banner *,
  .public-promo-banner-cta {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
