/* ─────────────────────────────────────────────────────────────────
   css/save-offer.css
   Styles for the use.html save-offer banner — Task #46 turn 6.

   Banner is pinned to the TOP of use.html (vs. the bottom — top is
   where browser chrome hints already live, so users instinctively
   look there for "you got a thing"). Slides in from above on first
   mount, sticks until the user picks Save / No thanks / ✕.

   Visual tone: warm cream ("save this gift") — NOT alarm-amber. We
   don't want users to feel pressured. NN/g: respect the user.
   ───────────────────────────────────────────────────────────────── */

.save-offer-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10005;            /* below switcher modal (10000) backdrop
                                interaction is fine, but above topbar
                                so the banner reads as "system told you
                                something". */
  background: #FFF7E6;        /* warm cream — matches Quick Boards row */
  color: #3a2f12;
  border-bottom: 1px solid #E8D9B0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  /* Slide-in from above. Keep duration short so it doesn't feel
     theatrical — banner needs to be there, not announce itself. */
  transform: translateY(-100%);
  transition: transform 220ms ease-out;
  font-size: 0.95rem;
  line-height: 1.35;
}

.save-offer-banner.open {
  transform: translateY(0);
}

.save-offer-body {
  flex: 1;
  min-width: 0;               /* allow text to wrap rather than push
                                the close button off-screen */
}

.save-offer-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.1rem;
  color: #2c2510;
}

.save-offer-name {
  font-weight: 600;
  color: #1A1A2E;
  margin: 0.1rem 0 0.05rem;
  /* Long names should ellipsize, not blow up the banner. Two-line
     wrap on tiny phones is acceptable. */
  word-break: break-word;
  overflow-wrap: anywhere;
}

.save-offer-sub {
  font-size: 0.8rem;
  color: #6c5c2a;
  margin-bottom: 0.35rem;
}

.save-offer-explainer {
  font-size: 0.85rem;
  color: #4d4222;
  margin-bottom: 0.55rem;
}

.save-offer-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Primary: amber action — same family as builder Save button so the
   action feels familiar to anyone who's used the builder. NN/g:
   consistent action language across the app. */
.save-offer-save {
  background: #F5A623;
  color: #1A1A2E;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  /* WCAG: 44×44 minimum tap target via padding+font size. */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.save-offer-save:hover { background: #E89610; }
.save-offer-save:active { transform: translateY(1px); }
.save-offer-save:focus-visible {
  outline: 3px solid #2C7BE5;
  outline-offset: 2px;
}

/* Secondary: plain text-button. Subtle so it doesn't compete with
   Save — but reachable. */
.save-offer-no {
  background: transparent;
  color: #6c5c2a;
  border: 1px solid transparent;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
}

.save-offer-no:hover {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.2);
}

.save-offer-no:focus-visible {
  outline: 2px solid #2C7BE5;
  outline-offset: 2px;
}

/* Close X — corner-anchored, distinct from "No thanks" so users who
   "just want it gone" have a fast path. Both routes mark the hash as
   dismissed (same effect), but two paths satisfy two mental models. */
.save-offer-close {
  background: transparent;
  border: none;
  color: #6c5c2a;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Slightly bigger hit area without enlarging the visual via padding
     (32×32 is the visual; the focus ring shows the hit area). */
}

.save-offer-close:hover { background: rgba(0,0,0,0.06); }
.save-offer-close:focus-visible {
  outline: 2px solid #2C7BE5;
  outline-offset: 2px;
}

/* ── Narrow phones ────────────────────────────────────────────────
   ≤420px: stack the actions full-width so primary Save dominates the
   thumb zone. This is the "just landed from a QR" critical path. */
@media (max-width: 420px) {
  .save-offer-banner {
    padding: 0.65rem 0.75rem;
  }
  .save-offer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .save-offer-actions .save-offer-save,
  .save-offer-actions .save-offer-no {
    width: 100%;
  }
}

/* ── Reduced motion ───────────────────────────────────────────────
   Some users get dizzy from slide-ins. Honor the preference. */
@media (prefers-reduced-motion: reduce) {
  .save-offer-banner {
    transition: none;
  }
}
