/* ============================================================================
 * assets/css/presale_consultant_attention_v1.css   —  litcrm_presale_attention_v1
 *
 * Subtle "call attention" treatment for the closed Pre-Sale Carrier Consultant widget,
 * plus a glowing "New" badge — in the spirit of the alert bell, but professional.
 *
 * UI-only. Theme-native: every accent comes from the platform CSS variables
 * (--primary / --primary-dark / --primary-soft / --accent / --panel / --text / --border /
 * --lit-banner-grad) with neutral teal fallbacks — no hardcoded platform blue.
 *
 * State model (driven by assets/js/presale_consultant_attention_v1.js):
 *   .psc-attention.is-collapsed  -> first visit, widget closed: animate (pulse + bell nudge)
 *   .psc-seen / opened           -> animation removed; badge stays, static + softened
 * Animations only run while CLOSED and never under prefers-reduced-motion.
 * ========================================================================== */

/* ---- The "New" badge: always visible, theme-tinted, static by default ---- */
.psc-new-badge{
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--primary-dark, #1f9d86);
  background: var(--primary-soft, color-mix(in srgb, var(--primary, #2bb59b) 14%, transparent));
  border: 1px solid color-mix(in srgb, var(--primary, #2bb59b) 38%, transparent);
  /* gentle static halo so it reads as "new" even after the active animation stops */
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #2bb59b) 10%, transparent);
}

/* Softened once seen (kept visible, calmer) */
.psc-seen .psc-new-badge{
  box-shadow: none;
  opacity: .92;
}

/* ---- Active attention state: only while first-visit AND collapsed ---- */
.psc-attention.is-collapsed .psc-new-badge{
  animation: pscAttentionPulse 2.2s ease-in-out infinite;
}

/* Gentle glowing ring around the closed header, like the alert bell drawing the eye */
.psc-attention.is-collapsed #pscToggle,
.psc-attention.is-collapsed .psc-header{
  animation: pscAttentionGlow 2.2s ease-in-out infinite;
}

/* Bell-like nudge on the widget icon: mostly at rest, a brief wiggle each cycle */
.psc-attention.is-collapsed .psc-header-icon{
  animation: pscAttentionNudge 3.6s ease-in-out infinite;
  transform-origin: 50% 0;
}

@keyframes pscAttentionPulse{
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary, #2bb59b) 0%, transparent); }
  50%      { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary, #2bb59b) 20%, transparent); }
}

@keyframes pscAttentionGlow{
  0%, 100% { box-shadow: inset 0 0 0 0 transparent; }
  50%      { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary, #2bb59b) 22%, transparent); }
}

/* The nudge spends ~85% of the cycle at rest, then a small bell-swing. Not constant motion. */
@keyframes pscAttentionNudge{
  0%, 82%, 100% { transform: rotate(0deg); }
  86% { transform: rotate(-9deg); }
  90% { transform: rotate(7deg); }
  94% { transform: rotate(-4deg); }
  98% { transform: rotate(2deg); }
}

/* ---- Accessibility: no motion for reduced-motion users (badge stays static) ---- */
@media (prefers-reduced-motion: reduce){
  .psc-attention.is-collapsed .psc-new-badge,
  .psc-attention.is-collapsed #pscToggle,
  .psc-attention.is-collapsed .psc-header,
  .psc-attention.is-collapsed .psc-header-icon{
    animation: none !important;
  }
}

/* LITCRM_PRESALE_NEW_LOGO_BADGE_V1
   Replaces the squeezed text pill with a transparent image badge.
   The badge pulses big/small while the widget is new/attention-active. */
.psc-new-badge.psc-new-badge-logo {
  display: inline-block !important;
  width: 76px !important;
  max-width: 76px !important;
  min-width: 76px !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 8px 0 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
  object-position: center !important;
  flex: 0 0 auto !important;
  vertical-align: middle !important;
  pointer-events: none !important;
  transform-origin: center center !important;
  filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--primary, #2bb59b) 24%, transparent));
}

.psc-attention.is-collapsed .psc-new-badge.psc-new-badge-logo {
  animation: pscNewLogoBigSmall 1.2s ease-in-out infinite !important;
}

.psc-seen .psc-new-badge.psc-new-badge-logo {
  animation: none !important;
  opacity: 0.86;
  transform: rotate(-4deg) scale(0.94);
  filter: drop-shadow(0 3px 6px color-mix(in srgb, var(--primary, #2bb59b) 16%, transparent));
}

.psc-new-badge-expired {
  display: none !important;
}

@keyframes pscNewLogoBigSmall {
  0%, 100% {
    transform: rotate(-5deg) scale(0.88);
    filter: drop-shadow(0 3px 6px color-mix(in srgb, var(--primary, #2bb59b) 18%, transparent));
  }
  50% {
    transform: rotate(-5deg) scale(1.24);
    filter: drop-shadow(0 8px 16px color-mix(in srgb, var(--primary, #2bb59b) 42%, transparent));
  }
}

@media (prefers-reduced-motion: reduce) {
  .psc-attention.is-collapsed .psc-new-badge.psc-new-badge-logo {
    animation: none !important;
    transform: rotate(-4deg) scale(1);
  }
}

/* LITCRM_PRESALE_NEW_LOGO_ALWAYS_PULSE_5DAY_V2
   Force the image-based New logo to pulse big/small during the 5-day launch window,
   even if the user has already opened the widget. */
#pscPanel .psc-new-badge.psc-new-badge-logo:not(.psc-new-badge-expired),
#pscPanel.psc-seen .psc-new-badge.psc-new-badge-logo:not(.psc-new-badge-expired),
#pscPanel.is-collapsed .psc-new-badge.psc-new-badge-logo:not(.psc-new-badge-expired),
#pscPanel:not(.psc-new-expired) .psc-new-badge.psc-new-badge-logo:not(.psc-new-badge-expired) {
  animation-name: pscNewLogoBigSmall !important;
  animation-duration: 1.15s !important;
  animation-timing-function: ease-in-out !important;
  animation-iteration-count: infinite !important;
  transform-origin: center center !important;
}

#pscPanel .psc-new-badge.psc-new-badge-logo.psc-new-badge-expired,
#pscPanel.psc-new-expired .psc-new-badge.psc-new-badge-logo {
  display: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #pscPanel .psc-new-badge.psc-new-badge-logo:not(.psc-new-badge-expired),
  #pscPanel.psc-seen .psc-new-badge.psc-new-badge-logo:not(.psc-new-badge-expired),
  #pscPanel.is-collapsed .psc-new-badge.psc-new-badge-logo:not(.psc-new-badge-expired),
  #pscPanel:not(.psc-new-expired) .psc-new-badge.psc-new-badge-logo:not(.psc-new-badge-expired) {
    animation: none !important;
    transform: rotate(-4deg) scale(1) !important;
  }
}

