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

#ac-chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 50%;
    background-color: #1412bd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(20, 18, 189, 0.35);
    cursor: pointer;
    z-index: 1000;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#ac-chat-toggle:hover {
    transform: scale(1.08);
}

#ac-chat-toggle svg {
    width: 28px;
    height: 28px;
}

#ac-chat-toggle .ac-chat-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 12px;
    height: 12px;
    background: #ff5b5b;
    border: 2px solid #fff;
    border-radius: 50%;
}

#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;
    }
}
