/* Bartaman ICT AI Assistant — WHMCS client-area chat widget */
#bict-ai-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147483000;
    background: var(--bict-accent, #0d6efd);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#bict-ai-launcher:hover {
    filter: brightness(1.05);
}

#bict-ai-box {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147483001;
    width: 370px;
    max-width: calc(100vw - 28px);
    height: 560px;
    max-height: calc(100vh - 40px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#bict-ai-header {
    background: var(--bict-accent, #0d6efd);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 15px;
}

#bict-ai-header .bict-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: .9;
}

#bict-ai-header .bict-close:hover {
    opacity: 1;
}

#bict-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f6f8fb;
}

.bict-msg {
    max-width: 86%;
    padding: 10px 13px;
    border-radius: 14px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.bict-msg.bot {
    background: #fff;
    color: #1f2937;
    border: 1px solid #e6e9ef;
    border-bottom-left-radius: 4px;
}

.bict-msg.user {
    background: var(--bict-accent, #0d6efd);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bict-msg a {
    color: #0b5ed7;
}

.bict-typing span {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 3px;
    border-radius: 50%;
    background: #9aa4b2;
    animation: bict-bounce 1.2s infinite ease-in-out;
}

.bict-typing span:nth-child(2) {
    animation-delay: .15s;
}

.bict-typing span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes bict-bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: .6;
    }

    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

#bict-ai-input-area {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e6e9ef;
    background: #fff;
}

#bict-ai-input {
    flex: 1;
    border: 1px solid #d7dbe2;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

#bict-ai-input:focus {
    border-color: var(--bict-accent, #0d6efd);
}

#bict-ai-send {
    background: var(--bict-accent, #0d6efd);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#bict-ai-send:disabled {
    opacity: .6;
    cursor: default;
}

@media (max-width: 480px) {
    #bict-ai-box {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        height: calc(100vh - 90px);
    }

    #bict-ai-launcher {
        right: 10px;
        bottom: 10px;
    }
}