/* =========================================
   AKANG AI
   Asisten Katalog & Arsip New Generation AI
   SLiMS Bulian 9.4.2
========================================= */

#akang-ai-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99990;
    width: 160px;
    height: 160px;
    min-width: 160px;
    min-height: 160px;
    border: none;
    border-radius: 20px;
    padding: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
    cursor: pointer;
    box-shadow: none;
    transition: all .2s ease;
    background-image: url('template/default/assets/images/akang-chat.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

#akang-ai-button:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.akang-ai-icon {
    display: none;
}

/* =========================
   CHAT WINDOW
========================= */

#akang-ai-window {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 360px;
    max-width: calc(100vw - 30px);
    height: 520px;
    max-height: calc(100vh - 110px);
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    z-index: 99991;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    flex-direction: column;
}

/* =========================
   HEADER
========================= */

.akang-ai-header {
    background: #198754;
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.akang-ai-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.akang-ai-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.akang-ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.akang-ai-name {
    font-size: 16px;
    font-weight: 700;
}

.akang-ai-subtitle {
    font-size: 10px;
    opacity: .85;
}

#akang-ai-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
}

/* =========================
   MESSAGE AREA
========================= */

#akang-ai-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f6f7f9;
}

.akang-ai-message {
    margin-bottom: 12px;
    max-width: 90%;
}

.akang-ai-message.bot {
    margin-right: auto;
}

.akang-ai-message.user {
    margin-left: auto;
}

.akang-ai-bubble {
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.bot .akang-ai-bubble {
    background: #ffffff;
    color: #333333;
    border: 1px solid #eeeeee;
}

.user .akang-ai-bubble {
    background: #198754;
    color: #ffffff;
}

/* =========================
   MENU BUTTON
========================= */

#akang-ai-menu {
    padding: 10px 16px;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
}

.akang-ai-menu-button {
    display: block;
    width: 100%;
    margin-bottom: 7px;
    padding: 9px 12px;
    border: 1px solid #198754;
    border-radius: 10px;
    background: #ffffff;
    color: #198754;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s ease;
}

.akang-ai-menu-button:hover {
    background: #198754;
    color: #ffffff;
}

/* =========================
   INPUT
========================= */

#akang-ai-input-area {
    display: flex;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
}

#akang-ai-input {
    flex: 1;
    border: 1px solid #dddddd;
    border-radius: 20px;
    padding: 9px 13px;
    outline: none;
    font-size: 13px;
}

#akang-ai-send {
    margin-left: 7px;
    width: 40px;
    border: none;
    border-radius: 50%;
    background: #198754;
    color: #ffffff;
    cursor: pointer;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 480px) {

    #akang-ai-button {
        right: 15px;
        bottom: 15px;
        width: 120px;
        height: 120px;
        min-width: 120px;
        min-height: 120px;
    }

    #akang-ai-window {
        right: 10px;
        bottom: 70px;
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
    }

}