/* ───────────────────────────────────────────────────────────────
   Smart Content Personalization — transitions & UI elements
   ─────────────────────────────────────────────────────────────── */

/* Smooth fade for dynamically-swapped CTA text */
[data-cta-primary],
[data-cta-secondary] {
  transition: opacity 0.25s ease-in-out;
}

/* ── Welcome-back banner ──────────────────────────────────────── */
.personalizer-welcome {
  background: linear-gradient(135deg, rgba(112, 84, 217, .92), rgba(70, 50, 160, .95));
  color: #fff;
  padding: .85rem 2rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 1.5rem;
  animation: p-slide-down .5s ease-out both;
  opacity: 1;
  transition: opacity .5s ease-out;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.personalizer-welcome.fade-out {
  opacity: 0;
}

.personalizer-welcome p {
  margin: 0;
  font-size: .95rem;
  font-weight: 500;
}

.personalizer-welcome a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

@keyframes p-slide-down {
  from { transform: translateY(-16px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ── Soft nudge (bottom-right toast) ─────────────────────────── */
.personalizer-nudge {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .4s cubic-bezier(.68, -.55, .27, 1.55),
              transform .4s cubic-bezier(.68, -.55, .27, 1.55);
  pointer-events: none;
}

.personalizer-nudge.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nudge-body {
  background: #fff;
  padding: 1.4rem 1.6rem;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
  max-width: 280px;
  position: relative;
  font-family: inherit;
}

.nudge-body p {
  margin: 0 0 .85rem;
  font-weight: 600;
  color: #1a1a2e;
  font-size: .95rem;
}

.nudge-action {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #7054d9, #5a3ec5);
  color: #fff;
  border: none;
  padding: .7rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  transition: transform .2s, box-shadow .2s;
}

.nudge-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(112, 84, 217, .35);
}

.nudge-close {
  position: absolute;
  top: .45rem;
  right: .6rem;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}

.nudge-close:hover {
  color: #333;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .personalizer-nudge {
    right: 1rem;
    bottom: 1rem;
  }
  .nudge-body {
    max-width: calc(100vw - 2rem);
  }
  .personalizer-welcome {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: .75rem 1.2rem;
  }
}
