/* ==========================================
   Aiwin Media FREE CHAT
========================================== */


/* ==========================================
   SMALL CHAT BUTTON
========================================== */

#aiwin-chat-button {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 99998;

    background: #f7b418;
    color: #111827;

    padding: 5px 9px;
    border-radius: 18px;

    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 3px 10px rgba(0,0,0,0.18);

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    line-height: 1;
}

.aiwin-chat-icon {
    font-size: 13px;
    line-height: 1;
}

.aiwin-chat-text {
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}


/* ==========================================
   CHAT WINDOW
========================================== */

#aiwin-chat-window {
    position: fixed;

    right: 15px;
    bottom: 55px;

    width: 320px;
    max-width: calc(100% - 20px);

    height: 400px;

    background: #ffffff;

    border-radius: 12px;

    overflow: hidden;

    z-index: 99999;

    box-shadow: 0 8px 30px rgba(0,0,0,0.25);

    display: none;

    font-family: Arial, Helvetica, sans-serif;
}


/* ==========================================
   HEADER
========================================== */

.aiwin-chat-header {
    height: 50px;

    background: #111827;

    color: #ffffff;

    padding: 0 7px 0 10px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


/* Header Left */

.aiwin-chat-header-left {
    display: flex;

    align-items: center;

    gap: 7px;
}


/* Logo */

.aiwin-chat-logo {
    width: 30px;
    height: 30px;

    border-radius: 50%;

    background: #f7b418;

    color: #111827;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 10px;

    font-weight: 800;
}


/* Title */

.aiwin-chat-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    position: relative;
    top: 15px;
}

/* Status */

.aiwin-chat-status {
    margin-top: 3px;

    font-size: 8px;

    color: #f7b418;
}


/* ==========================================
   CLOSE X BUTTON
========================================== */

.aiwin-chat-close {
    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    width: 30px !important;
    height: 30px !important;

    padding: 0 !important;

    margin: 0 !important;

    border: 0 !important;

    outline: none !important;

    background: transparent !important;

    color: #ffffff !important;

    font-family: Arial, sans-serif !important;

    font-size: 27px !important;

    font-weight: 400 !important;

    line-height: 30px !important;

    cursor: pointer !important;

    opacity: 1 !important;

    visibility: visible !important;

    flex-shrink: 0 !important;
}

.aiwin-chat-close:hover {
    background: rgba(255,255,255,0.18) !important;

    border-radius: 50% !important;
}


/* ==========================================
   MESSAGE AREA
========================================== */

#aiwin-chat-messages {
    height: 260px;

    overflow-y: auto;

    padding: 8px;

    background: #f5f7fa;
}


/* Messages */

.aiwin-message {
    display: flex;

    margin-bottom: 7px;
}

.aiwin-bot-message {
    justify-content: flex-start;
}

.aiwin-user-message {
    justify-content: flex-end;
}


/* Message */

.aiwin-message-content {
    max-width: 84%;

    padding: 7px 9px;

    border-radius: 11px;

    font-size: 11px;

    line-height: 1.4;

    word-wrap: break-word;
}


/* Bot */

.aiwin-bot-message .aiwin-message-content {
    background: #ffffff;

    color: #333333;

    border: 1px solid #e5e7eb;

    border-bottom-left-radius: 3px;
}


/* User */

.aiwin-user-message .aiwin-message-content {
    background: #111827;

    color: #ffffff;

    border-bottom-right-radius: 3px;
}


/* ==========================================
   QUICK BUTTONS
========================================== */

.aiwin-quick-buttons {
    display: flex;

    gap: 5px;

    padding: 6px;

    overflow-x: auto;

    overflow-y: hidden;

    background: #ffffff;

    border-top: 1px solid #eeeeee;

    white-space: nowrap;

    scrollbar-width: thin;
}


/* Quick buttons */

.aiwin-quick-buttons button {
    flex: 0 0 auto;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #d8d8d8;

    background: #ffffff;

    color: #333333;

    border-radius: 14px;

    padding: 5px 8px;

    min-height: 27px;

    font-family: Arial, sans-serif;

    font-size: 9px;

    line-height: 1;

    cursor: pointer;

    white-space: nowrap;
}


/* Get Quote */

.aiwin-quick-buttons button:last-child {
    background: #f7b418;

    border-color: #f7b418;

    color: #111827;

    font-weight: 700;
}


/* ==========================================
   INPUT AREA
========================================== */

.aiwin-chat-input-area {
    height: 54px;

    background: #ffffff;

    border-top: 1px solid #eeeeee;

    padding: 7px;

    display: flex;

    align-items: center;

    gap: 5px;
}


/* Input */

#aiwin-chat-input {
    flex: 1;

    height: 34px;

    min-width: 0;

    border: 1px solid #dddddd;

    border-radius: 18px;

    padding: 0 10px;

    outline: none;

    font-size: 11px;

    color: #333333;

    background: #ffffff;
}

#aiwin-chat-input:focus {
    border-color: #f7b418;
}


/* Send */

#aiwin-chat-send {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    border: none;

    border-radius: 50%;

    background: #f7b418;

    color: #111827;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* ==========================================
   TYPING
========================================== */

.aiwin-typing {
    display: inline-flex;

    align-items: center;

    gap: 3px;
}

.aiwin-typing span {
    width: 5px;
    height: 5px;

    background: #999999;

    border-radius: 50%;

    animation: aiwinTyping 1.2s infinite;
}

.aiwin-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.aiwin-typing span:nth-child(3) {
    animation-delay: 0.4s;
}


@keyframes aiwinTyping {

    0% {
        opacity: 0.3;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px);
    }

    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 767px) {

    #aiwin-chat-button {
        right: 10px;
        bottom: 10px;

        padding: 5px 8px;

        font-size: 9px;
    }

    .aiwin-chat-icon {
        font-size: 12px;
    }

    .aiwin-chat-text {
        font-size: 9px;
    }


    #aiwin-chat-window {

        right: 7px;

        bottom: 48px;

        width: calc(100% - 14px);

        height: 380px;

        max-width: none;

        border-radius: 11px;
    }


    .aiwin-chat-header {
        height: 48px;

        padding: 0 6px 0 9px;
    }


    .aiwin-chat-logo {
        width: 28px;
        height: 28px;

        font-size: 9px;
    }


    .aiwin-chat-title {
        font-size: 12px;
    }


    .aiwin-chat-status {
        font-size: 8px;
    }


    .aiwin-chat-close {
        width: 30px !important;
        height: 30px !important;

        font-size: 26px !important;
    }


    #aiwin-chat-messages {
        height: 240px;

        padding: 7px;
    }


    .aiwin-message-content {
        font-size: 11px;

        max-width: 88%;
    }


    .aiwin-quick-buttons {
        padding: 5px;
    }


    .aiwin-quick-buttons button {
        font-size: 9px;

        padding: 5px 7px;

        min-height: 25px;
    }


    .aiwin-chat-input-area {
        height: 52px;

        padding: 6px;
    }

}