/* ============================================================
   Pixel Pulse Digital — "Pulse" AI chat widget stylesheet
   Relies on the CSS custom properties (--teal, --ink, --shadow-hover,
   etc.) defined in :root in the main site stylesheet, so this file
   must be loaded on pages that already declare those variables.
   ============================================================ */

#pulse-chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 999; font-family: 'Inter', sans-serif; }
/* Desktop/tablet only: lift clear of the footer's "Contact" link. Mobile (<=480px, see bottom of file) keeps the original bottom:20px. */
@media (min-width: 481px) {
    #pulse-chat-widget { bottom: 100px; }
}

/* Launcher: pulsing aura + gentle float */
#pulse-chat-toggle-wrap { position: relative; width: 60px; height: 60px; }
.pulse-aura {
    position: absolute; inset: 0; border-radius: 50%;
    background: var(--teal);
    animation: pulseAura 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes pulseAura {
    0% { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(1.9); opacity: 0; }
}
#pulse-chat-toggle {
    position: relative;
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(145deg, #1f9090, var(--teal));
    color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow-hover);
    transition: transform 0.2s ease;
    animation: pulseFloat 3.6s ease-in-out infinite;
    z-index: 2;
}
#pulse-chat-toggle:hover { transform: scale(1.08); }
#pulse-chat-toggle.open { animation: none; }
@keyframes pulseFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* AI mascot avatar face */
.pulse-avatar-face { display: block; }
.pulse-eye {
    transform-box: fill-box; transform-origin: center;
    animation: pulseBlink 4.6s ease-in-out infinite;
}
.pulse-eye-r { animation-delay: 0.05s; }
@keyframes pulseBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    93% { transform: scaleY(0.12); }
    96% { transform: scaleY(1); }
}

/* Chat panel: dark glassmorphism */
#pulse-chat-panel {
    position: absolute; right: 0; bottom: 76px;
    width: 372px; max-width: calc(100vw - 40px);
    height: 500px; max-height: calc(100vh - 140px);
    background: rgba(24, 23, 26, 0.86);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px; box-shadow: 0 30px 70px -20px rgba(0,0,0,0.55);
    display: flex; flex-direction: column; overflow: hidden;
    opacity: 0; transform: translateY(12px) scale(0.98);
    pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
}
#pulse-chat-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
#pulse-chat-header {
    background: linear-gradient(135deg, rgba(26,122,122,0.35), rgba(20,20,24,0.5));
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #fff; padding: 16px 18px; display: flex; align-items: center;
}
.pulse-chat-header-info { display: flex; align-items: center; gap: 10px; }
.pulse-chat-dot { width: 9px; height: 9px; border-radius: 50%; background: #3ecf8e; flex-shrink: 0; box-shadow: 0 0 8px #3ecf8e; animation: pulseDotGlow 1.8s ease-in-out infinite; }
@keyframes pulseDotGlow { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.pulse-chat-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; color: #fff; }
.pulse-chat-sub { font-size: 11.5px; color: rgba(255,255,255,0.55); }
#pulse-chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 11px; }

/* Minimalist empty-state: centered heading + quick-prompt chips */
#pulse-chat-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; text-align: center; padding: 8px 4px;
}
.pulse-empty-heading { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 19px; color: #fff; }
.pulse-empty-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 300px; }
.pulse-chip {
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
    color: #f2f0ec; font-size: 12.5px; font-weight: 600; font-family: inherit;
    padding: 9px 14px; border-radius: 999px; cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.pulse-chip:hover { background: rgba(26,122,122,0.3); border-color: var(--teal); transform: translateY(-1px); }

.pulse-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; animation: pulseMsgIn 0.28s ease both; }
@keyframes pulseMsgIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.pulse-msg-bot { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.09); color: #f2f0ec; align-self: flex-start; border-bottom-left-radius: 4px; }
.pulse-msg-user { background: linear-gradient(135deg, #1f9090, var(--teal)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; box-shadow: 0 4px 14px -4px rgba(26,122,122,0.6); }
.pulse-msg-typing { display: flex; gap: 4px; padding: 12px 14px; }
.pulse-msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.6); opacity: 0.4; animation: pulseTyping 1s infinite ease-in-out; }
.pulse-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.pulse-msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulseTyping { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
#pulse-chat-form { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 14px; border-top: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); }
#pulse-chat-input {
    flex: 1; border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 10px 16px;
    font-size: 13.5px; font-family: inherit; outline: none;
    background: rgba(255,255,255,0.06); color: #fff;
}
#pulse-chat-input::placeholder { color: rgba(255,255,255,0.4); }
#pulse-chat-input:focus { border-color: var(--teal); background: rgba(255,255,255,0.1); }
#pulse-chat-send { width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; box-shadow: 0 4px 12px -3px rgba(26,122,122,0.7); }
#pulse-chat-send:hover { background: #1f9090; }
#pulse-chat-send:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 480px) {
    #pulse-chat-panel { width: calc(100vw - 32px); right: -4px; }
}
