
/* =====================================
   DESIRE INSTITUTE CHATBOT CSS
   ===================================== */

#di-chatbot {
    position: fixed;
    right: 22px;
    top: 510px;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
}

/* =====================================
   FLOATING BUTTON
   ===================================== */

#di-chatbot-toggle {
    width: 50px;

    height: 50px;
    border: none;
    border-radius: 50%;
    background: #0645ad;
    color: #ffffff;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);

    transition: all 0.25s ease;
    position: relative;
}

#di-chatbot-toggle:hover {
    transform: scale(1.08);
}

.di-bot-icon {
    font-size: 30px;
}

/* Notification */

.di-chat-notification {
    position: absolute;
    top: -3px;
    right: -3px;

    width: 21px;
    height: 21px;

    background:#fff;
    color: green;

    border-radius: 50%;

    font-size: 12px;
    font-weight: bold;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #ffffff;
}

/* =====================================
   CHAT WINDOW
   ===================================== */

#di-chat-window {
    position: absolute;

    right: 0;
    bottom: 50px;

    width: 320px;
    max-width: calc(100vw - 30px);

    height: 500px;
    max-height: calc(100vh - 110px);

    background: #ffffff;

    border-radius: 18px;

    overflow: hidden;

    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);

    display: none;

    flex-direction: column;

    border: 1px solid #e5e5e5;
}

#di-chat-window.di-chat-open {
    display: flex;

    animation: diChatOpen 0.25s ease;
}

@keyframes diChatOpen {

    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

/* =====================================
   HEADER
   ===================================== */

.di-chat-header {
    background: linear-gradient(135deg, #003b95, #075dd1);

    color: #ffffff;

    padding: 15px;

    display: flex;

    align-items: center;
    justify-content: space-between;
}

.di-chat-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.di-chat-avatar {
    width: 42px;
    height: 42px;

    background: #ffffff;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
}

.di-chat-title {
    font-size: 16px;
    font-weight: 700;
}

.di-chat-status {
    font-size: 12px;
    margin-top: 3px;
    opacity: 0.9;
}

.di-chat-status span {
    display: inline-block;

    width: 7px;
    height: 7px;

    background: #32cd32;

    border-radius: 50%;

    margin-right: 4px;
}

#di-chat-close {
    width: 32px;
    height: 32px;

    border: none;
    background: transparent;

    color: #ffffff;

    font-size: 28px;

    cursor: pointer;

    line-height: 1;
}

/* =====================================
   MESSAGES AREA
   ===================================== */

#di-chat-messages {
    flex: 1;

    overflow-y: auto;

    padding: 10px;

    background: #f5f7fb;
}

.di-message {
    display: flex;

    margin-bottom: 14px;

    max-width: 90%;
}

.di-bot-message {
    align-items: flex-start;
}

.di-user-message {
    margin-left: auto;

    justify-content: flex-end;
}

.di-message-avatar {
    width: 28px;
    height: 28px;

    flex-shrink: 0;

    background: #075dd1;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;

    margin-right: 7px;
}

.di-message-content {
    max-width: calc(100% - 45px);
}

.di-message-text {
    padding: 10px 13px;

    border-radius: 13px;

    font-size: 14px;

    line-height: 1.5;

    word-wrap: break-word;
}

.di-bot-message .di-message-text {
    background: #ffffff;

    color: #222;

    border-top-left-radius: 4px;

    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.05);
}

.di-user-message .di-message-text {
    background: #075dd1;

    color: #ffffff;

    border-top-right-radius: 4px;
}

/* =====================================
   QUICK BUTTONS
   ===================================== */

.di-quick-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin: 10px 0 15px 35px;
}

.di-quick-buttons button {
    border: 1px solid #075dd1;

    background: #ffffff;

    color: #075dd1;

    border-radius: 20px;

    padding: 7px 11px;

    font-size: 12px;

    cursor: pointer;

    transition: all 0.2s ease;
}

.di-quick-buttons button:hover {
    background: #075dd1;

    color: #ffffff;
}

/* =====================================
   TYPING INDICATOR
   ===================================== */

.di-typing {
    display: none;

    align-items: center;

    gap: 4px;

    padding: 5px 15px 8px;

    background: #f5f7fb;

    color: #777;

    font-size: 11px;
}

.di-typing span {
    width: 6px;
    height: 6px;

    background: #777;

    border-radius: 50%;

    animation: diTyping 1.2s infinite;
}

.di-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.di-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

.di-typing small {
    margin-left: 4px;
}

@keyframes diTyping {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-4px);
    }

}

/* =====================================
   INPUT
   ===================================== */

.di-chat-input-area {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px;

    background: #ffffff;

    border-top: 1px solid #e5e5e5;
}

#di-chat-input {
    flex: 1;

    height: 42px;

    border: 1px solid #d7d7d7;

    border-radius: 22px;

    padding: 0 15px;

    outline: none;

    font-size: 14px;
}

#di-chat-input:focus {
    border-color: #075dd1;
}

#di-chat-send {
    width: 42px;
    height: 42px;

    border: none;

    border-radius: 50%;

    background: #075dd1;

    color: #ffffff;

    font-size: 20px;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;

    transition: 0.2s;
}

#di-chat-send:hover {
    transform: scale(1.05);
}

/* =====================================
   SCROLLBAR
   ===================================== */

#di-chat-messages::-webkit-scrollbar {
    width: 5px;
}

#di-chat-messages::-webkit-scrollbar-thumb {
    background: #c5c5c5;

    border-radius: 10px;
}

/* =====================================
   MOBILE RESPONSIVE
   ===================================== */

@media (max-width: 600px) {

    #di-chatbot {
        right: 14px;
        bottom: 14px;
    }

    #di-chatbot-toggle {
        width: 56px;
        height: 56px;
    }

    .di-bot-icon {
        font-size: 26px;
    }

    #di-chat-window {

        right: 0;
        bottom: 68px;

        width: calc(100vw - 28px);

        max-width: none;

        height: min(600px, calc(100vh - 95px));

        border-radius: 16px;
    }

}

/* Small Mobile */

@media (max-width: 380px) {

    #di-chat-window {
        width: calc(100vw - 20px);

        height: calc(100vh - 85px);
    }

    .di-quick-buttons button {
        font-size: 11px;

        padding: 6px 9px;
    }

}