/* Product-page app handoff. Safari's native Smart App Banner owns iOS Safari. */
.app-open-banner {
  display: none;
  background: #10142d;
  color: #fff5df;
  border-bottom: 1px solid #363753;
  font-family: Inter, "Noto Sans Thai", sans-serif;
}

.app-banner-active .app-open-banner { display: block; }

.app-open-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 10px 16px;
}

.app-open-banner-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.app-open-banner-dismiss svg { width: 18px; height: 18px; }
.app-open-banner-dismiss:hover { background: rgba(255, 255, 255, .1); }
.app-open-banner-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; }
.app-open-banner-copy { flex: 1; min-width: 0; line-height: 1.35; }
.app-open-banner-copy strong { display: block; font-size: 16px; font-weight: 600; }
.app-open-banner-copy span { display: block; font-size: 12px; color: #d1cce0; }
.app-open-banner-copy strong, .app-open-banner-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-open-banner-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 5px;
  background: #e6c889;
  color: #17213b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.app-open-banner-action:hover { background: #f7dfa9; color: #17213b; }
.app-open-banner :focus-visible { outline: 3px solid #f0cf68; outline-offset: 3px; }
.app-open-banner[data-app="hex_color_codes"] { background: #0b0c10; color: #fff; border-color: #34343e; }
.app-open-banner[data-app="hex_color_codes"] .app-open-banner-action { background: #fff; color: #16181d; }
.app-open-banner[data-app="hex_color_codes"] .app-open-banner-action:hover { background: #ecebf5; }

/* The banner scrolls away, while the existing navigation stays at the top. */
.app-banner-active nav { position: sticky; top: 0; }
.app-banner-active .dc-product main { padding-top: 0; }
.app-banner-active .hero { padding-top: clamp(40px, 6vw, 96px); }
.app-banner-active .mobile-menu { top: var(--app-banner-menu-top, 64px); }
.app-banner-active .mobile-menu.open { max-height: calc(100dvh - var(--app-banner-menu-top, 64px)); }

@media (max-width: 480px) {
  .app-open-banner-inner { gap: 8px; padding-inline: 8px; }
  .app-open-banner-copy strong { font-size: 15px; }
  .app-open-banner-action { padding-inline: 12px; }
}

/* Preserve HCC's tighter hero spacing on short landscape screens. */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 900px) {
  .app-banner-active .hero { padding-top: 24px; }
}

/* The app name is already in the banner; prioritize the headline and stores here. */
@media (max-height: 430px) and (orientation: landscape) and (max-width: 900px) {
  .app-banner-active .hero { padding-top: 12px; }
  .app-banner-active .hero .eyebrow { display: none; }
}

@media print {
  .app-banner-active .app-open-banner { display: none; }
}
