/* --- FLOAT ANIMATION --- */
@keyframes pcgFloat {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-7px); }
    100% { transform: translateY(0px); }
}
@keyframes pcgPulseRing {
    0%   { transform: scale(1);    opacity: 0.6; }
    100% { transform: scale(1.55); opacity: 0; }
}

/* --- MAIN CHATBOT LAUNCHER --- */
#pcg-launcher {
    position: fixed; bottom: 20px; right: 20px;
    width: 62px; height: 62px;
    background: var(--pcg-primary);
    color: white; border-radius: 50%;
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 999999;
    animation: pcgFloat 3.6s ease-in-out infinite;
    animation-delay: 0.3s;
}
#pcg-launcher::after {
    content: '';
    position: absolute; inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--pcg-primary);
    animation: pcgPulseRing 2.2s ease-out infinite;
}
#pcg-launcher:hover { animation-play-state: paused; transform: scale(1.07); }

/* --- CONTAINER --- */
#pcg-chatbot-container {
    position: fixed; bottom: 100px; right: 20px; width: 360px; height: 520px;
    background: #ffffff; border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    display: flex; flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 999999; border: 1px solid #f0f0f0; overflow: hidden;
}
.pcg-hidden { display: none !important; }

/* --- HEADER --- */
#pcg-header {
    background: var(--pcg-primary);
    color: white; padding: 14px 16px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.pcg-header-left { display: flex; align-items: center; gap: 12px; }
.pcg-avatar-head {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; border: 2.5px solid rgba(255,255,255,0.35);
    background: white;
}
.pcg-header-info { line-height: 1.2; }
.pcg-bot-name { font-weight: 700; font-size: 15px; }
.pcg-bot-status { font-size: 12px; opacity: 0.9; display: flex; align-items: center; gap: 5px; }
.pcg-dot {
    width: 8px; height: 8px; background-color: #4ade80;
    border-radius: 50%; box-shadow: 0 0 6px rgba(74,222,128,0.7);
}
#pcg-close-btn {
    background: rgba(255,255,255,0.15); border: none; color: white;
    font-size: 18px; cursor: pointer; line-height: 1;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
#pcg-close-btn:hover { background: rgba(255,255,255,0.28); }

/* --- MESSAGES --- */
#pcg-messages {
    flex: 1; padding: 18px; overflow-y: auto;
    background: #f8fafc; font-size: 14px;
}
.pcg-msg-row { display: flex; gap: 10px; margin-bottom: 14px; align-items: flex-end; }
.pcg-ai-row  { justify-content: flex-start; }
.pcg-user-row{ justify-content: flex-end; }
.pcg-avatar-chat {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0; margin-bottom: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); background: white;
}
.pcg-ai {
    background: #ffffff; color: #1e293b;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0; padding: 11px 15px; max-width: 80%;
}
.pcg-user {
    background: var(--pcg-primary); color: white;
    border-radius: 18px 18px 4px 18px;
    padding: 10px 15px; max-width: 80%; text-align: left;
}
.pcg-ai a { color: var(--pcg-primary); text-decoration: none; font-weight: 600; }
.pcg-ai a:hover { text-decoration: underline; }

/* --- INPUT --- */
#pcg-input-area {
    padding: 14px 16px; background: white;
    border-top: 1px solid #f1f5f9;
    display: flex; gap: 10px; align-items: center;
}
#pcg-input {
    flex: 1; border: 1.5px solid #e2e8f0;
    padding: 11px 16px; border-radius: 24px;
    outline: none; font-size: 14px; transition: border-color 0.2s;
}
#pcg-input:focus { border-color: var(--pcg-primary); }
#pcg-send-btn {
    background: var(--pcg-primary); color: white; border: none;
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.15s;
}
#pcg-send-btn:hover { background: var(--pcg-primary-dark); transform: scale(1.08); }

/* --- LEAD FORM --- */
.pcg-lead-form-container { border-top: 3px solid var(--pcg-primary); background: var(--pcg-primary-light); }
.pcg-form-input {
    width: 100%; margin-bottom: 8px; padding: 9px 12px;
    border: 1.5px solid #ddd; border-radius: 8px; font-size: 13px;
}
.pcg-form-input:focus { border-color: var(--pcg-primary); outline: none; }
.pcg-form-btn {
    width: 100%; background: var(--pcg-primary); color: white;
    border: none; padding: 10px; border-radius: 8px;
    font-weight: 600; cursor: pointer; font-size: 13px; transition: background 0.2s;
}
.pcg-form-btn:hover { background: var(--pcg-primary-dark); }

/* ============================================================
   EXTRA LAUNCHERS — WhatsApp-style floating widgets
   ============================================================ */
.pcg-extra-launcher {
    position: fixed;
    bottom: 20px; right: 20px;
    width: 58px; height: 58px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.22);
    cursor: pointer; z-index: 99998;
    text-decoration: none; color: #fff;
    animation: pcgFloat 3.6s ease-in-out infinite;
    transition: box-shadow 0.2s;
}
/* Pulse ring — like WhatsApp button */
.pcg-extra-launcher::after {
    content: '';
    position: absolute; inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    animation: pcgPulseRing 2.4s ease-out infinite;
}
/* Stagger animation delays */
.pcg-extra-launcher:nth-child(1) { animation-delay: 0s; }
.pcg-extra-launcher:nth-child(1)::after { animation-delay: 0s; }
.pcg-extra-launcher:nth-child(2) { animation-delay: 0.6s; }
.pcg-extra-launcher:nth-child(2)::after { animation-delay: 0.6s; }
.pcg-extra-launcher:nth-child(3) { animation-delay: 1.2s; }
.pcg-extra-launcher:nth-child(3)::after { animation-delay: 1.2s; }
.pcg-extra-launcher:nth-child(4) { animation-delay: 1.8s; }
.pcg-extra-launcher:nth-child(4)::after { animation-delay: 1.8s; }
.pcg-extra-launcher:hover {
    animation-play-state: paused;
    transform: scale(1.1);
    box-shadow: 0 10px 28px rgba(0,0,0,0.3);
}
.pcg-extra-launcher:hover::after { animation-play-state: paused; }

/* Tooltip */
.pcg-extra-launcher:not(.pcg-launcher-pill)::before {
    content: attr(data-label);
    position: absolute; right: 70px;
    background: rgba(20,20,20,0.82); color: #fff;
    padding: 5px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.pcg-extra-launcher:not(.pcg-launcher-pill):hover::before { opacity: 1; }
.pcg-extra-launcher[data-side="left"]:not(.pcg-launcher-pill)::before { right: auto; left: 70px; }

/* --- PILL STYLE --- */
.pcg-launcher-pill {
    width: auto !important; height: 50px !important;
    border-radius: 100px !important;
    padding: 0 20px 0 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 18px rgba(0,0,0,0.18) !important;
}
.pcg-launcher-pill svg, .pcg-launcher-pill img { flex-shrink: 0; }
.pcg-launcher-pill[data-side="left"] {
    padding: 0 14px 0 20px !important;
    flex-direction: row-reverse;
}

/* Light/white pill variant — like the "📞 Join Now" style in screenshot */
.pcg-launcher-light {
    background: #ffffff !important;
    color: #1e293b !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.08) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
}
.pcg-launcher-light svg { fill: #1e293b !important; }
.pcg-launcher-light:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.2) !important;
    color: #1e293b !important;
}
.pcg-launcher-light span { color: #1e293b !important; font-weight: 700 !important; }
