/* Proactive nudges: the bubble next to the launcher, and the launcher's eyes */

#wpreplai-root .wr-nudge {
    position: relative;
    width: 280px;
    max-width: calc(100vw - 32px);
    padding: 13px 14px;
    border-radius: 16px 16px 4px 16px;
    background: #FFFFFF;
    box-shadow: 0 18px 44px -14px rgba(14, 14, 18, 0.4), 0 0 0 1px rgba(14, 14, 18, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: wr-nudge-in 0.45s ease-out both;
}

@keyframes wr-nudge-in {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

#wpreplai-root .wr-nudge-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #A1A1AA;
    font-size: 17px;
    line-height: 28px;
    text-align: center;
}

#wpreplai-root .wr-nudge-close:hover { background: var(--wr-bubble); color: var(--wr-text); }
#wpreplai-root .wr-nudge-from { padding-right: 24px; font-size: 11.5px; font-weight: 600; color: var(--wr-subtle); }
#wpreplai-root .wr-nudge-text { padding-right: 8px; font-size: 14px; line-height: 1.45; }
#wpreplai-root .wr-nudge-actions { display: flex; gap: 6px; flex-wrap: wrap; }

#wpreplai-root .wr-nudge-primary,
#wpreplai-root .wr-nudge-secondary {
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

#wpreplai-root .wr-nudge-primary { background: var(--wr-text); color: #FFFFFF; }
#wpreplai-root .wr-nudge-secondary { border: 1px solid #DADAE0; background: #FFFFFF; color: var(--wr-text); }
#wpreplai-root .wr-nudge-secondary:hover { border-color: var(--wr-text); }

@media (max-width: 640px) {
    #wpreplai-root.is-open .wr-nudge { display: none; }
}

/* ── The launcher's eyes ── */
#wpreplai-root.wr-animated .wr-launcher-open {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#wpreplai-root .wr-eyes {
    display: flex;
    align-items: center;
    gap: 7.5px;
    transition: transform 0.35s ease;
}

#wpreplai-root .wr-eyes span {
    width: 4.6px;
    height: 13.9px;
    border-radius: 3px;
    background: #FFFFFF;
    transition: width 0.25s, height 0.25s, border-radius 0.25s, background 0.25s, border 0.25s;
}

#wpreplai-root .wr-idea {
    position: absolute;
    top: -2px;
    right: -1px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--wr-brand);
    background: #FFFFFF;
    color: var(--wr-brand);
    font-size: 10px;
    font-weight: 800;
    line-height: 12px;
    text-align: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s, transform 0.2s;
}

/* Watching: glances around and blinks */
@keyframes wr-look {
    0%, 18%   { transform: translate(0, 0); }
    24%, 40%  { transform: translate(-5px, -2px); }
    46%, 62%  { transform: translate(5px, -1px); }
    68%, 100% { transform: translate(0, 0); }
}

@keyframes wr-eye-blink {
    0%, 92%, 100% { transform: scaleY(1); }
    95%           { transform: scaleY(0.15); }
}

#wpreplai-root.wr-mood-watching .wr-eyes { animation: wr-look 6s ease-in-out infinite; }
#wpreplai-root.wr-mood-watching .wr-eyes span { animation: wr-eye-blink 4.5s infinite; }

/* Following: turns toward the cursor */
#wpreplai-root.wr-mood-following .wr-eyes { transform: translate(var(--wr-ex, 0), var(--wr-ey, 0)); }

/* Curious: one eye squints, looking aside */
#wpreplai-root.wr-mood-curious .wr-eyes { align-items: flex-end; transform: translateX(-3px); }
#wpreplai-root.wr-mood-curious .wr-eyes span:first-child { height: 9.7px; }
#wpreplai-root.wr-mood-curious .wr-eyes span:last-child { height: 16px; }

/* Has an idea: eyes wide, with a "!" */
#wpreplai-root.wr-mood-idea .wr-eyes { transform: translateY(-3.5px); }
#wpreplai-root.wr-mood-idea .wr-eyes span { height: 16px; border-radius: 4.6px; }
#wpreplai-root.wr-mood-idea .wr-idea { opacity: 1; transform: none; }

/* Happy: smiling arcs */
#wpreplai-root.wr-mood-happy .wr-eyes { gap: 6px; }
#wpreplai-root.wr-mood-happy .wr-eyes span {
    width: 9.2px;
    height: 5.2px;
    border: 3.4px solid #FFFFFF;
    border-bottom: none;
    border-radius: 9px 9px 0 0;
    background: transparent;
}

/* Not looking: eyes closed and turned away while a private field is in use */
#wpreplai-root.wr-mood-notlooking .wr-eyes { gap: 6px; transform: translate(6.8px, 1.8px) rotate(-10deg); }
#wpreplai-root.wr-mood-notlooking .wr-eyes span {
    width: 11.5px;
    height: 6.3px;
    border: 3.8px solid #FFFFFF;
    border-top: none;
    border-radius: 0 0 11.5px 11.5px;
    background: transparent;
}

/* Resting: eyes closed for the rest of the visit */
#wpreplai-root.wr-mood-resting .wr-eyes { transform: translateY(2.3px); }
#wpreplai-root.wr-mood-resting .wr-eyes span { width: 8px; height: 3.2px; }

@media (prefers-reduced-motion: reduce) {
    #wpreplai-root .wr-nudge { animation: none; }
    #wpreplai-root .wr-eyes,
    #wpreplai-root .wr-eyes span { animation: none !important; transition: none; }
}
