/* Seasonal campaign styling for SchedulHub Gifts (admin: Seasonal Campaigns).
   Loaded on every Gifts page; the strip, cards and prompts render only while a campaign is
   live, and the Christmas touches apply only under body.gifts-theme-christmas. */

/* Seasonal strip above the nav. The CTA's ::after stretches over the whole bar, so the CTA
   itself must stay unpositioned and untransformed or the click area shrinks back to it. */
.gifts-campaign-strip {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(420px 120px at 10% 0%, rgba(246, 213, 143, 0.2), transparent 70%),
    radial-gradient(520px 140px at 92% 100%, rgba(255, 140, 120, 0.18), transparent 70%),
    linear-gradient(100deg, #4a0e12 0%, var(--gifts-coral-dark) 45%, var(--gifts-coral) 100%);
  color: #fff;
  box-shadow: inset 0 -1px 0 rgba(246, 213, 143, 0.4);
}
.gifts-campaign-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 50px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.gifts-campaign-strip-ico {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fde9b5, #d9a441 55%, #a8731f);
  color: #5a1414;
  font-size: 0.88rem;
  box-shadow: 0 0 0 3px rgba(246, 213, 143, 0.2), 0 4px 14px rgba(0, 0, 0, 0.3);
  animation: gifts-strip-glow 3.2s ease-in-out infinite;
}
.gifts-campaign-strip-msg {
  margin: 0;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gifts-campaign-strip-timer {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(20, 4, 6, 0.28);
  border: 1px solid rgba(246, 213, 143, 0.38);
  color: #f6d58f;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.gifts-campaign-strip-timer b { color: #fff; font-weight: 700; }
.gifts-campaign-strip-timer i { font-size: 0.74rem; }
.gifts-campaign-strip-clock { display: inline-flex; gap: 4px; }
.gifts-campaign-strip-seg b {
  display: inline-block;
  min-width: 1.7em;
  margin-right: 1px;
  padding: 1px 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  text-align: center;
}
.gifts-campaign-strip-timer.is-final-day .gifts-campaign-strip-seg.is-d { display: none; }
.gifts-campaign-strip-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background-color: #fff;
  background-image: linear-gradient(110deg, transparent 40%, rgba(246, 213, 143, 0.7) 50%, transparent 60%);
  background-size: 250% 100%;
  background-repeat: no-repeat;
  background-position: 100% 0;
  color: var(--gifts-coral-dark);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.5);
  animation: gifts-strip-sheen 5s ease-in-out 1.5s infinite;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.gifts-campaign-strip-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.gifts-campaign-strip-cta i { font-size: 0.72rem; transition: transform 0.2s var(--gifts-ease); }
.gifts-campaign-strip:hover .gifts-campaign-strip-cta {
  background-color: #f6d58f;
  color: #4a0e12;
}
.gifts-campaign-strip:hover .gifts-campaign-strip-cta i { transform: translateX(3px); }

/* Snowfall: each layer moves a whole number of its own tiles per loop, so it never jumps. */
.gifts-campaign-strip.is-christmas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 1.2px, transparent 1.9px),
    radial-gradient(circle, rgba(255, 255, 255, 0.4) 0.9px, transparent 1.5px),
    radial-gradient(circle, rgba(246, 213, 143, 0.6) 1.5px, transparent 2.2px);
  background-size: 110px 60px, 70px 40px, 170px 80px;
  background-position: 10px 0, 40px 12px, 90px 30px;
  /* Thinned behind the message so flakes don't read as specks on the text. */
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.18) 28%, rgba(0, 0, 0, 0.18) 72%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.18) 28%, rgba(0, 0, 0, 0.18) 72%, #000 100%);
  animation: gifts-strip-snow 10s linear infinite;
}
@keyframes gifts-strip-snow {
  to { background-position: -100px 120px, 40px 92px, 90px 190px; }
}
@keyframes gifts-strip-sheen {
  0% { background-position: 100% 0; }
  45%, 100% { background-position: 0% 0; }
}
@keyframes gifts-strip-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(246, 213, 143, 0.2), 0 4px 14px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(246, 213, 143, 0.08), 0 0 18px rgba(246, 213, 143, 0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .gifts-campaign-strip.is-christmas::before,
  .gifts-campaign-strip-ico,
  .gifts-campaign-strip-cta { animation: none; }
}

.gifts-lhero-cta { margin-bottom: 22px; }
.gifts-lhero-photo.is-campaign {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.gifts-campaign-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.gifts-campaign-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--gifts-surface);
  border: 1px solid var(--gifts-card-border);
  border-radius: 16px;
  box-shadow: var(--gifts-card-shadow);
  color: var(--gifts-espresso);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gifts-campaign-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--gifts-card-shadow-hover);
  border-color: var(--gifts-gold);
  color: var(--gifts-espresso);
}
@media (min-width: 768px) {
  .gifts-campaign-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 18px;
  }
  .gifts-campaign-card-text { flex: 1 1 auto; }
  .gifts-campaign-card .gifts-campaign-card-arrow { margin-top: auto; }
}
.gifts-campaign-card-ico {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gifts-coral), var(--gifts-coral-dark));
  color: #f6d58f;
  font-size: 1.1rem;
}
.gifts-campaign-card-text { flex: 1; min-width: 0; line-height: 1.3; }
.gifts-campaign-card-text strong { display: block; font-size: 0.98rem; }
.gifts-campaign-card-text span { display: block; margin-top: 2px; color: var(--gifts-muted); font-size: 0.82rem; }
.gifts-campaign-card-arrow { color: var(--gifts-gold-dark); font-size: 0.8rem; }

.gifts-campaign-prompt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px dashed var(--gifts-gold);
  border-radius: 12px;
  background: #fff8ea;
  color: var(--gifts-espresso);
  font-size: 0.9rem;
  line-height: 1.4;
}
.gifts-campaign-prompt-ico { color: var(--gifts-coral); font-size: 1.15rem; padding-top: 1px; }
.gifts-campaign-prompt strong { display: block; }
.gifts-campaign-prompt span { color: var(--gifts-muted); }

/* Christmas: burgundy and gold, a touch more festive than the everyday cream. */
.gifts-theme-christmas .gifts-lhero {
  background:
    radial-gradient(900px 420px at 88% 8%, rgba(194, 138, 46, 0.22), transparent 60%),
    radial-gradient(700px 380px at 0% 100%, rgba(156, 43, 43, 0.14), transparent 60%),
    #fbf1e6;
}
.gifts-theme-christmas .gifts-lhero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(194, 138, 46, 0.35) 1.5px, transparent 2px),
    radial-gradient(circle, rgba(156, 43, 43, 0.22) 1.5px, transparent 2px);
  background-size: 90px 90px, 140px 140px;
  background-position: 12px 20px, 60px 70px;
  opacity: 0.55;
}
.gifts-theme-christmas .gifts-lhero > .container { position: relative; z-index: 1; }
.gifts-theme-christmas .gifts-lhero-photo {
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--gifts-gold), 0 18px 40px rgba(125, 34, 34, 0.22);
}
.gifts-theme-christmas .gifts-eyebrow { color: var(--gifts-gold-dark); }
.gifts-theme-christmas .gifts-section h2 { position: relative; }
.gifts-theme-christmas .gifts-campaign-collections {
  background: linear-gradient(180deg, #fbf1e6, var(--gifts-cream));
}

@media (max-width: 767.98px) {
  /* One compact row: badge, message (timer tucked under it), and the CTA as an arrow button. */
  .gifts-campaign-strip-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "ico msg cta" "ico timer cta";
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    min-height: 0;
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .gifts-campaign-strip-ico { grid-area: ico; width: 30px; height: 30px; flex-basis: 30px; font-size: 0.8rem; }
  .gifts-campaign-strip-msg { grid-area: msg; font-size: 0.77rem; line-height: 1.3; }
  .gifts-campaign-strip-timer {
    grid-area: timer;
    justify-self: start;
    margin-top: 4px;
    padding: 1px 9px;
    gap: 6px;
    font-size: 0.68rem;
  }
  .gifts-campaign-strip-seg b { padding: 0 2px; border-radius: 4px; }
  .gifts-campaign-strip-cta {
    grid-area: cta;
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }
  .gifts-campaign-strip-cta-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .gifts-lhero-cta { width: 100%; margin-bottom: 18px; }
  .gifts-lhero-photo.is-campaign { aspect-ratio: 4 / 5; }

  /* Compact, horizontally scrollable cards on phones. */
  .gifts-campaign-cards {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding: 0 12px;
    margin: 0 -12px;
    padding: 4px 12px 10px;
    scrollbar-width: none;
  }
  .gifts-campaign-cards::-webkit-scrollbar { display: none; }
  .gifts-campaign-card {
    flex: 0 0 230px;
    scroll-snap-align: start;
    padding: 12px 14px;
  }
  .gifts-campaign-card-ico { flex-basis: 40px; width: 40px; height: 40px; font-size: 1rem; }
}
