/* Bartaman ICT AI Assistant — WHMCS client-area chat widget (Main Site Synced) */
#bict-ai-launcher {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 999999;
    background: #0066cc;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: sans-serif;
}

#bict-ai-launcher:hover {
    filter: brightness(1.05);
}

#bict-ai-box {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 999999;
    width: 330px;
    max-width: calc(100vw - 20px);
    height: 430px;
    max-height: calc(100vh - 30px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: sans-serif;
}

#bict-ai-header {
    background: #0066cc;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 14px;
}

#bict-ai-header .bict-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

#bict-ai-header .bict-close {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

#bict-ai-header .bict-clear {
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}

#bict-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.bict-msg {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.4;
    word-break: break-word;
    white-space: pre-line;
}

.bict-msg.bot {
    background: #e5e7eb;
    color: #1f2937;
    align-self: flex-start;
}

.bict-msg.user {
    background: #0066cc;
    color: #ffffff;
    align-self: flex-end;
}

.bict-msg a {
    color: #0066cc;
    text-decoration: underline;
}

.bict-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px !important;
}

.bict-typing span {
    width: 6px;
    height: 6px;
    background-color: #6b7280;
    border-radius: 50%;
    display: inline-block;
    animation: bict-bounce 1.4s infinite ease-in-out both;
}

.bict-typing span:nth-child(1) { animation-delay: -0.32s; }
.bict-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bict-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

#bict-ai-input-area {
    display: flex;
    border-top: 1px solid #e5e7eb;
    padding: 8px;
    background: #ffffff;
}

#bict-ai-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
}

#bict-ai-send {
    background: #0066cc;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    margin-left: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
}

#bict-ai-send:disabled {
    opacity: 0.6;
    cursor: default;
}

@media (max-width: 480px) {
    #bict-ai-box {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        height: calc(100vh - 90px);
    }
}