/*
 * sticky-cta.css — ANZ v3 Sticky Mobile Add-to-Cart CTA
 *
 * Namespace: .anz-v3-sticky-cta
 * Covers: mobile sticky add-to-cart (IA spec §7 KEEP)
 * All selectors scoped: body.anz-v3 .anz-v3-sticky-cta*
 * No hex values — var(--...) only.
 *
 * Phase 4 pages: PDP mobile (DIGITAL-6478)
 * Disposition: KEEP per IA spec §7 — Coral Reef bg, Cloud White text.
 *   "request moment" per brand philosophy §1.2.
 * Provenance: plan §4.1, IA spec §7, brand PDF page 4 (Coral Reef CTAs)
 */


/* ===================================================================
 * STICKY BAR — fixed to bottom of viewport on mobile only
 * =================================================================== */

body.anz-v3 .anz-v3-sticky-cta {
  background-color: var(--accent);
  bottom: 0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
  display: none;
  left: 0;
  padding: var(--space-3) var(--space-4);
  position: fixed;
  right: 0;
  width: 100%;
  z-index: 300000;
}

body.anz-v3 .anz-v3-sticky-cta.is-visible {
  display: block;
}

body.anz-v3 .anz-v3-sticky-cta__inner {
  align-items: center;
  display: flex;
  gap: var(--space-4);
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--container-max);
}

body.anz-v3 .anz-v3-sticky-cta__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

body.anz-v3 .anz-v3-sticky-cta__product-name {
  color: var(--accent-text);
  font-size: var(--type-body-s-size);
  font-weight: var(--font-weight-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.anz-v3 .anz-v3-sticky-cta__price {
  color: var(--accent-text);
  font-size: var(--type-h3-size);
  font-weight: var(--font-weight-medium);
  line-height: var(--type-h3-lh);
}

body.anz-v3 .anz-v3-sticky-cta__btn {
  align-items: center;
  background-color: var(--anz-pacific-blue);
  border: 2px solid var(--anz-pacific-blue);
  border-radius: var(--radius-md);
  color: var(--anz-cloud-white, #ffffff);
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  font-family: var(--font-family);
  font-size: var(--type-body-m-size);
  font-weight: var(--font-weight-medium);
  justify-content: center;
  min-width: 140px;
  padding: var(--space-3) var(--space-6);
  text-decoration: none;
  text-transform: none;
  transition:
    background-color var(--motion-fast) var(--motion-exit),
    color var(--motion-fast) var(--motion-exit);
  white-space: nowrap;
}

body.anz-v3 .anz-v3-sticky-cta__btn:focus,
body.anz-v3 .anz-v3-sticky-cta__btn:hover {
  background-color: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
}

body.anz-v3 .anz-v3-sticky-cta__btn:focus-visible {
  outline: var(--focus-ring-width) solid var(--text-on-primary);
  outline-offset: var(--focus-ring-offset);
}


/* ===================================================================
 * RESPONSIVE — visible on mobile only
 * =================================================================== */

@media (max-width: 768px) {
  body.anz-v3 .anz-v3-sticky-cta.is-visible {
    display: block;
  }
}

@media (min-width: 769px) {
  body.anz-v3 .anz-v3-sticky-cta {
    display: none !important;
    /* !important required: JS may add .is-visible on scroll; this ensures the
     * sticky bar never renders on desktop regardless of JS state. */
  }
}


/* ===================================================================
 * REDUCED MOTION
 * =================================================================== */

@media (prefers-reduced-motion: reduce) {
  body.anz-v3 .anz-v3-sticky-cta__btn {
    transition: none;
  }
}
