/* =========================================================================
   ALPHA CONNECTS — AI Chatbot Widget
   Matches site palette: #1412bd (primary) / #eaedff (bg)
   ========================================================================= */

#ac-chat-toggle{position:fixed;bottom:30px;right:30px;width:66px;height:66px;border:none;border-radius:50%;background:linear-gradient(135deg,#1412bd 0%,#3b36f5 55%,#38b6ff 100%);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 28px rgba(20,18,189,.45),inset 0 2px 4px rgba(255,255,255,.35);cursor:pointer;z-index:1000;transition:transform .3s cubic-bezier(.16,1,.3,1);animation:acFloat 3.2s ease-in-out infinite}
#ac-chat-toggle::after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid rgba(56,182,255,.7);animation:acRing 2.4s ease-out infinite;pointer-events:none}
#ac-chat-toggle::before{content:"Ask Alpha AI \1F44B";position:absolute;right:78px;top:50%;transform:translateY(-50%);padding:10px 16px;border-radius:999px;background:#fff;color:#1412bd;font:600 14px 'Inter',sans-serif;white-space:nowrap;box-shadow:0 8px 24px rgba(20,18,189,.2);opacity:0;pointer-events:none;animation:acLabel 10s ease 2s 1 forwards}
#ac-chat-toggle:hover{transform:scale(1.1) rotate(-6deg)}
#ac-chat-toggle svg{width:32px;height:32px;position:relative;z-index:1}
#ac-chat-toggle .ac-chat-dot{position:absolute;top:4px;right:4px;width:14px;height:14px;background:#ff5b5b;border:2px solid #fff;border-radius:50%;z-index:2;animation:acBlink 1.4s ease-in-out infinite}
@keyframes acFloat{0%,100%{translate:0 0}50%{translate:0 -6px}}
@keyframes acRing{0%{transform:scale(1);opacity:.9}100%{transform:scale(1.6);opacity:0}}
@keyframes acBlink{0%,100%{transform:scale(1)}50%{transform:scale(1.25)}}
@keyframes acLabel{0%{opacity:0;transform:translateY(-50%) translateX(12px)}8%,85%{opacity:1;transform:translateY(-50%)}100%{opacity:0;transform:translateY(-50%) translateX(12px)}}
@media(prefers-reduced-motion:reduce){#ac-chat-toggle,#ac-chat-toggle::after,#ac-chat-toggle .ac-chat-dot{animation:none}}
@media(max-width:600px){#ac-chat-toggle{bottom:20px;right:20px;width:58px;height:58px}#ac-chat-toggle::before{display:none}}

#ac-chat-window {
    position: fixed;
    bottom: 104px;
    right: 30px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(20, 18, 189, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    pointer-events: none;
    transition: 0.25s ease;
}

#ac-chat-window.ac-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.ac-chat-header {
    background: #1412bd;
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ac-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ac-chat-header-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 3px;
}

.ac-chat-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.ac-chat-header p {
    font-size: 11px;
    opacity: 0.8;
    margin: 0;
}

.ac-chat-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.ac-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f7f8ff;
}

.ac-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.ac-msg.bot {
    background: #eaedff;
    color: #1412bd;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ac-msg.user {
    background: #1412bd;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ac-msg.typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 16px;
}

.ac-msg.typing span {
    width: 6px;
    height: 6px;
    background: #1412bd;
    border-radius: 50%;
    opacity: 0.4;
    animation: ac-blink 1.2s infinite;
}

.ac-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.ac-msg.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ac-blink {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

.ac-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
    background: #f7f8ff;
    flex-shrink: 0;
}

.ac-chip {
    border: 1px solid rgba(20, 18, 189, 0.25);
    background: #fff;
    color: #1412bd;
    font-size: 11.5px;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.ac-chip:hover {
    background: #1412bd;
    color: #fff;
}

.ac-chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(20, 18, 189, 0.1);
    background: #fff;
    flex-shrink: 0;
}

.ac-chat-input input {
    flex: 1;
    border: 1px solid rgba(20, 18, 189, 0.15);
    background: #f7f8ff;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    outline: none;
    color: #1412bd;
}

.ac-chat-input input:focus {
    border-color: #1412bd;
}

.ac-chat-input button {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #1412bd;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.2s;
}

.ac-chat-input button:hover {
    transform: scale(1.06);
}

.ac-chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ac-chat-input svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 480px) {
    #ac-chat-window {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 96px;
    }
    #ac-chat-toggle {
        right: 16px;
        bottom: 16px;
    }
}
