/* ==========================================
   Aiwin Media AI CHAT
   FINAL MAROON + GRAY VERSION
========================================== */


/* ==========================================
   SMALL CHAT BUTTON
========================================== */

#aiwin-chat-button {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 99998;

    background: #9a2623;
    color: #ffffff;

    padding: 8px 12px;
    border-radius: 20px;

    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.20);

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    line-height: 1;

    transition: all 0.2s ease;
}


#aiwin-chat-button:hover {
    background: #353535;
    color: #ffffff;
}


.aiwin-chat-icon {
    font-size: 14px;
    line-height: 1;
}


.aiwin-chat-text {
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}


/* ==========================================
   CHAT WINDOW
========================================== */

#aiwin-chat-window {
    position: fixed;

    right: 15px;
    bottom: 60px;

    width: 350px;
    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;

    border: 1px solid #dddddd;
}


/* ==========================================
   HEADER
========================================== */

.aiwin-chat-header {
    height: 50px;

    background: #9a2623;

    color: #ffffff;

    padding: 0 7px 0 10px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    box-sizing: border-box;
}


/* ==========================================
   HEADER LEFT
========================================== */

.aiwin-chat-header-left {
    display: flex;

    align-items: center;

    gap: 7px;

    min-width: 0;

    overflow: hidden;
}


/* ==========================================
   AIWIN MEDIA LOGO
========================================== */

.aiwin-chat-logo {
    width: 150px;
    height: 35px;

    display: flex;

    align-items: center;

    overflow: hidden;

    flex-shrink: 0;
}


.aiwin-chat-logo img {
    width: 100%;

    height: auto;

    max-height: 35px;

    object-fit: contain;

    object-position: left center;

    display: block;
}


/* ==========================================
   TITLE
========================================== */

.aiwin-chat-title {
    font-size: 13px;

    font-weight: 700;

    color: #ffffff;

    position: relative;

    top: 3px;
}


/* ==========================================
   ONLINE STATUS
========================================== */

.aiwin-chat-status {
    margin-top: 2px;

    font-size: 8px;

    color: #ffffff;

    white-space: nowrap;
}


/* ==========================================
   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.20) !important;

    border-radius: 50% !important;
}


/* ==========================================
   MESSAGE AREA
========================================== */

#aiwin-chat-messages {
    height: 260px;

    overflow-y: auto;

    padding: 8px;

    background: #f3f3f3;

    box-sizing: border-box;
}


/* ==========================================
   MESSAGES
========================================== */

.aiwin-message {
    display: flex;

    margin-bottom: 7px;
}


.aiwin-bot-message {
    justify-content: flex-start;
}


.aiwin-user-message {
    justify-content: flex-end;
}


/* ==========================================
   MESSAGE CONTENT
========================================== */

.aiwin-message-content {
    max-width: 84%;

    padding: 8px 10px;

    border-radius: 11px;

    font-size: 11px;

    line-height: 1.4;

    word-wrap: break-word;
}


/* ==========================================
   BOT MESSAGE
========================================== */

.aiwin-bot-message .aiwin-message-content {
    background: #ffffff;

    color: #353535;

    border: 1px solid #dddddd;

    border-bottom-left-radius: 3px;
}


/* ==========================================
   USER MESSAGE
========================================== */

.aiwin-user-message .aiwin-message-content {
    background: #9a2623;

    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 #dddddd;

    white-space: nowrap;

    scrollbar-width: thin;

    box-sizing: border-box;
}


/* ==========================================
   QUICK BUTTONS
========================================== */

.aiwin-quick-buttons button {
    flex: 0 0 auto;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #bbbbbb;

    background: #ffffff;

    color: #353535;

    border-radius: 14px;

    padding: 6px 9px;

    min-height: 28px;

    font-family: Arial, sans-serif;

    font-size: 9px;

    line-height: 1;

    cursor: pointer;

    white-space: nowrap;

    transition: all 0.2s ease;
}


.aiwin-quick-buttons button:hover {
    background: #9a2623;

    border-color: #9a2623;

    color: #ffffff;
}


/* ==========================================
   GET A QUOTE QUICK BUTTON
========================================== */

.aiwin-quick-buttons button:last-child {
    background: #9a2623;

    border-color: #9a2623;

    color: #ffffff;

    font-weight: 700;
}


.aiwin-quick-buttons button:last-child:hover {
    background: #353535;

    border-color: #353535;

    color: #ffffff;
}


/* ==========================================
   INPUT AREA
========================================== */

.aiwin-chat-input-area {
    height: 54px;

    background: #ffffff;

    border-top: 1px solid #dddddd;

    padding: 7px;

    display: flex;

    align-items: center;

    gap: 5px;

    box-sizing: border-box;
}


/* ==========================================
   INPUT
========================================== */

#aiwin-chat-input {
    flex: 1;

    height: 34px;

    min-width: 0;

    border: 1px solid #cccccc;

    border-radius: 18px;

    padding: 0 10px;

    outline: none;

    font-size: 11px;

    color: #353535;

    background: #ffffff;

    box-sizing: border-box;
}


#aiwin-chat-input:focus {
    border-color: #9a2623;
}


/* ==========================================
   SEND BUTTON
========================================== */

#aiwin-chat-send {
    width: 34px;

    height: 34px;

    flex: 0 0 34px;

    border: none;

    border-radius: 50%;

    background: #9a2623;

    color: #ffffff;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: all 0.2s ease;
}


#aiwin-chat-send:hover {
    background: #353535;
}


/* ==========================================
   TYPING INDICATOR
========================================== */

.aiwin-typing {
    display: inline-flex;

    align-items: center;

    gap: 3px;
}


.aiwin-typing span {
    width: 5px;

    height: 5px;

    background: #353535;

    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;
}


/* ==========================================
   TYPING ANIMATION
========================================== */

@keyframes aiwinTyping {

    0% {
        opacity: 0.3;

        transform: translateY(0);
    }

    50% {
        opacity: 1;

        transform: translateY(-3px);
    }

    100% {
        opacity: 0.3;

        transform: translateY(0);
    }

}


/* ==========================================
   GET A QUOTE BUTTON
========================================== */

.aiwin-chat-quote-button {
    display: inline-block;

    max-width: 100%;
    box-sizing: border-box;

    margin-top: 10px;

    padding: 8px 14px;

    background: #9a2623;

    color: #ffffff !important;

    text-decoration: none !important;

    font-size: 13px;

    font-weight: 600;

    border-radius: 5px;

    cursor: pointer;

    transition: all 0.2s ease;
}


.aiwin-chat-quote-button:hover {
    background: #353535;

    color: #ffffff !important;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 767px) {

    /* --------------------------------------
       SMALL CHAT BUTTON
    -------------------------------------- */

    #aiwin-chat-button {
        right: 10px;

        bottom: 10px;

        padding: 7px 10px;

        font-size: 9px;
    }


    .aiwin-chat-icon {
        font-size: 12px;
    }


    .aiwin-chat-text {
        font-size: 9px;
    }


    /* --------------------------------------
       CHAT WINDOW
    -------------------------------------- */

    #aiwin-chat-window {

        right: 7px;

        bottom: 48px;

        width: calc(100% - 14px);

        height: 380px;

        max-width: none;

        border-radius: 11px;
    }


    /* --------------------------------------
       HEADER
    -------------------------------------- */

    .aiwin-chat-header {

        height: 48px;

        padding: 0 6px 0 9px;
    }


    /* --------------------------------------
       MOBILE LOGO
    -------------------------------------- */

    .aiwin-chat-logo {

        width: 125px;

        height: 30px;
    }


    .aiwin-chat-logo img {

        max-height: 30px;
    }


    /* --------------------------------------
       TITLE
    -------------------------------------- */

    .aiwin-chat-title {

        font-size: 12px;
    }


    /* --------------------------------------
       ONLINE STATUS
    -------------------------------------- */

    .aiwin-chat-status {

        font-size: 8px;
    }


    /* --------------------------------------
       CLOSE BUTTON
    -------------------------------------- */

    .aiwin-chat-close {

        width: 30px !important;

        height: 30px !important;

        font-size: 26px !important;
    }


    /* --------------------------------------
       MESSAGE AREA
    -------------------------------------- */

    #aiwin-chat-messages {

        height: 240px;

        padding: 7px;
    }


    /* --------------------------------------
       MESSAGE
    -------------------------------------- */

    .aiwin-message-content {

        font-size: 11px;

        max-width: 88%;
    }


    /* --------------------------------------
       QUICK BUTTONS
    -------------------------------------- */

    .aiwin-quick-buttons {

        padding: 5px;

        gap: 4px;
    }


    .aiwin-quick-buttons button {

        font-size: 8px;

        padding: 5px 6px;

        min-height: 25px;
    }


    /* --------------------------------------
       INPUT AREA
    -------------------------------------- */

    .aiwin-chat-input-area {

        height: 52px;

        padding: 6px;
    }


    /* --------------------------------------
       INPUT
    -------------------------------------- */

    #aiwin-chat-input {

        height: 34px;

        font-size: 11px;
    }


    /* --------------------------------------
       SEND BUTTON
    -------------------------------------- */

    #aiwin-chat-send {

        width: 34px;

        height: 34px;

        flex: 0 0 34px;
    }

}