/*
 * PROTECTED: QR divider — do not strip.
 * SSOT for page-order / hero QR chrome (container, background, border, link colors).
 * Linked via scripts/lib/carousel_qr.mjs → pageOrderQrStylesheetLink().
 * Hygiene audit fails if background / border / link color rules regress.
 * Do not move these rules into silo-shared.css (build regenerates that file)
 * or bury them only inside website-packages-shared.css (agents strip them).
 *
 * Brand logo links (page-order-qr__home / site-carousel__qr-home) → homepage.
 * QR graphic + CTA links (page-order-qr__link / cta-link) → packagesOrderUrl().
 */

div.page-order-qr {
  max-width: min(36rem, calc(100% - 2 * var(--page-gutter, 1.25rem)));
  width: 100%;
  margin: 1.75rem auto 1.25rem;
  text-align: left;
  box-sizing: border-box;
  padding-inline: 0;
  position: static;
}

div.page-hero-qr,
div.page-order-qr--hero-mobile {
  display: none;
}

div.page-order-qr .page-order-qr__panel {
  --qr-cta-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.35rem);
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border-radius: var(--qr-cta-radius);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 42%, transparent 100%),
    rgb(12 12 14 / 72%);
  background-color: #0c0c0e;
  color: #ededed;
  box-sizing: border-box;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

div.page-order-qr .page-order-qr__panel:hover,
div.page-order-qr .page-order-qr__panel:focus-within {
  border-color: rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 42%, transparent 100%),
    rgb(18 18 22 / 82%);
  background-color: #121216;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

div.page-order-qr a.page-order-qr__link,
div.page-order-qr a.page-order-qr__link:is(:link, :visited) {
  --qr-cta-radius: 14px;
  display: block;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
  text-decoration-line: none;
  background-color: transparent;
}

div.page-order-qr a.page-order-qr__link:hover,
div.page-order-qr a.page-order-qr__link:focus-visible {
  color: inherit;
  text-decoration: none;
  text-decoration-line: none;
}

.site-carousel__qr-panel {
  --qr-cta-radius: 12px;
  position: relative;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  border-radius: var(--qr-cta-radius);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 42%, transparent 100%),
    rgba(3, 6, 8, 0.36);
  background-color: rgba(3, 6, 8, 0.36);
  color: #ededed;
  text-decoration: none;
  text-decoration-line: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  pointer-events: auto;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.site-carousel__qr-panel:hover,
.site-carousel__qr-panel:focus-within {
  border-color: rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 42%, transparent 100%),
    rgba(3, 6, 8, 0.43);
  background-color: rgba(3, 6, 8, 0.43);
  color: #ffffff;
  text-decoration: none;
  text-decoration-line: none;
  transform: translateY(-1px);
}

.site-carousel__qr .site-carousel__qr-link,
.site-carousel__qr-link,
.site-carousel__qr-link:is(:link, :visited),
.site-carousel__qr-link:hover,
.site-carousel__qr-link:active,
.site-carousel__qr-link:focus-visible {
  --qr-cta-radius: 12px;
  position: relative;
  z-index: 21;
  display: block !important;
  flex: 0 0 auto;
  align-items: initial;
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid transparent;
  border-radius: 0;
  color: #ededed;
  text-decoration: none !important;
  text-decoration-line: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  pointer-events: auto;
  transition: none;
}

.site-carousel__qr-panel:hover .site-carousel__qr-cta,
.site-carousel__qr-panel:focus-within .site-carousel__qr-cta,
.site-carousel__qr-cta-link:hover .site-carousel__qr-cta,
.site-carousel__qr-cta-link:focus-visible .site-carousel__qr-cta {
  filter: brightness(1.05);
}

div.page-order-qr .page-order-qr__graphic {
  flex: 0 0 auto;
  display: block;
  width: clamp(9.5rem, 28vw, 10.5rem);
  height: clamp(9.5rem, 28vw, 10.5rem);
  min-width: 152px;
  min-height: 152px;
  padding: 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #ffffff;
  line-height: 0;
  box-sizing: border-box;
}

div.page-order-qr .page-order-qr__graphic svg {
  display: block;
  width: 100%;
  height: 100%;
}

div.page-order-qr .page-order-qr__copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  text-align: left;
}

.page-order-qr__brand,
.site-carousel__qr-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.site-carousel__qr-brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
}

a.page-order-qr__home,
a.site-carousel__qr-home,
a.page-order-qr__home:is(:link, :visited, :hover, :focus, :focus-visible, :active),
a.site-carousel__qr-home:is(:link, :visited, :hover, :focus, :focus-visible, :active) {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-radius: 8px;
  line-height: 0;
}

a.page-order-qr__home:focus-visible,
a.site-carousel__qr-home:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.9);
  outline-offset: 2px;
}

a.page-order-qr__cta-link,
a.page-order-qr__url-link,
a.site-carousel__qr-cta-link,
a.page-order-qr__cta-link:is(:link, :visited, :hover, :focus, :focus-visible, :active),
a.page-order-qr__url-link:is(:link, :visited, :hover, :focus, :focus-visible, :active),
a.site-carousel__qr-cta-link:is(:link, :visited, :hover, :focus, :focus-visible, :active) {
  color: inherit;
  text-decoration: none !important;
  text-decoration-line: none !important;
}

a.page-order-qr__cta-link:focus-visible,
a.page-order-qr__url-link:focus-visible,
a.site-carousel__qr-cta-link:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.9);
  outline-offset: 2px;
  border-radius: 8px;
}

.page-order-qr__logo,
.site-carousel__qr-logo {
  width: auto;
  max-width: none;
  height: auto;
  max-height: 48px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  aspect-ratio: auto;
  transform-origin: 50% 50%;
  animation: qrLogoIntro 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

.page-order-qr__logo {
  height: 48px;
  max-height: 48px;
  width: auto;
}

.site-carousel__qr-logo {
  height: 28px;
  max-height: 28px;
}

@keyframes qrLogoIntro {
  0% { opacity: 0; transform: translateX(-14px) rotate(-18deg) scale(0.86); }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .page-order-qr__logo,
  .site-carousel__qr-logo { animation: none; }
}

.site-carousel__qr-cta,
.page-order-qr__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--qr-cta-radius, 14px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(
    90deg,
    #818cf8 0%,
    #c084fc 20%,
    #f472b6 35%,
    #fb923c 50%,
    #34d399 65%,
    #38bdf8 80%,
    #818cf8 100%
  );
  background-size: 200% auto;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  text-decoration-line: none;
  box-shadow:
    0 4px 14px rgba(52, 211, 153, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-weight: 700;
  line-height: 1.25;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-origin: 50% 50%;
  will-change: transform;
  animation:
    qrCtaIn 0.5s 0.1s both,
    logoShift 5s 0.6s linear infinite,
    qrCtaBreathe 3.2s ease-in-out 0.7s infinite;
}

@keyframes qrCtaIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logoShift { to { background-position: 200% center; } }

@keyframes qrCtaBreathe {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 4px 14px rgba(52, 211, 153, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    transform: scale(1.04);
    box-shadow:
      0 7px 22px rgba(52, 211, 153, 0.42),
      0 0 18px rgba(56, 189, 248, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-carousel__qr-cta,
  .page-order-qr__cta {
    animation: none;
    background-position: 0 center;
  }
}

div.page-order-qr .site-carousel__qr-cta,
div.page-order-qr .page-order-qr__cta {
  align-self: flex-start;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
}

div.page-order-qr a.page-order-qr__link,
div.page-order-qr a.page-order-qr__link:is(:link, :visited, :hover, :active, :focus-visible),
div.page-order-qr a.page-order-qr__cta-link,
div.page-order-qr a.page-order-qr__cta-link:is(:link, :visited, :hover, :active, :focus-visible),
div.page-order-qr a.page-order-qr__url-link,
div.page-order-qr a.page-order-qr__url-link:is(:link, :visited, :hover, :active, :focus-visible),
div.page-order-qr a.page-order-qr__home,
div.page-order-qr a.page-order-qr__home:is(:link, :visited, :hover, :active, :focus-visible),
.site-carousel__qr-link,
.site-carousel__qr-link:is(:link, :visited, :hover, :active, :focus-visible),
.site-carousel__qr-cta-link,
.site-carousel__qr-cta-link:is(:link, :visited, :hover, :active, :focus-visible),
.site-carousel__qr-home,
.site-carousel__qr-home:is(:link, :visited, :hover, :active, :focus-visible) {
  text-decoration: none;
  text-decoration-line: none;
}

div.page-order-qr .site-carousel__qr-cta,
div.page-order-qr .page-order-qr__cta,
.site-carousel__qr-cta,
.page-order-qr__cta {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  text-decoration-line: none;
}

div.page-order-qr .page-order-qr__panel:hover .site-carousel__qr-cta,
div.page-order-qr .page-order-qr__panel:focus-within .site-carousel__qr-cta,
a.page-order-qr__cta-link:hover .site-carousel__qr-cta,
a.page-order-qr__cta-link:focus-visible .site-carousel__qr-cta {
  border-color: rgba(255, 255, 255, 0.48);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  text-decoration-line: none;
  filter: brightness(1.05);
}

div.page-order-qr .page-order-qr__url {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #a1a1aa;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 0.2rem 0.2rem 0.35rem;
  opacity: 0.92;
}

div.page-order-qr a.page-order-qr__url-link:hover .page-order-qr__url,
div.page-order-qr a.page-order-qr__url-link:focus-visible .page-order-qr__url {
  color: #e4e4e7;
  opacity: 1;
}

@media (max-width: 768px) {
  div.page-order-qr .page-order-qr__panel {
    flex-direction: column;
    text-align: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  div.page-order-qr a.page-order-qr__link,
  div.page-order-qr a.page-order-qr__link:is(:link, :visited) {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  div.page-order-qr .page-order-qr__graphic {
    flex: 0 0 auto;
    width: max(9.5rem, 152px);
    height: max(9.5rem, 152px);
    min-width: 152px;
    min-height: 152px;
    max-width: 100%;
  }

  div.page-order-qr .page-order-qr__copy {
    align-items: center;
    text-align: center;
    min-width: 0;
  }

  div.page-order-qr .page-order-qr__brand { justify-content: center; }

  .page-order-qr__logo {
    height: 48px;
    max-height: 48px;
  }

  div.page-hero-qr,
  div.page-order-qr--hero-mobile {
    display: block;
    order: -1;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(22rem, 100%);
    margin: 0 auto 1.35rem;
    box-sizing: border-box;
  }

  div.page-hero-qr .page-order-qr__panel,
  div.page-order-qr--hero-mobile .page-order-qr__panel {
    padding: 1rem 1.1rem;
    gap: 0.85rem;
  }

  div.page-hero-qr a.page-order-qr__link,
  div.page-order-qr--hero-mobile a.page-order-qr__link {
    padding: 0;
    gap: 0;
  }
}
