/* =========================================================
   GVEK AI ASSISTANT - COMPLETE CSS
   Gajera Vidyabhavan, Katargam
   ========================================================= */


/* =========================================================
   LAUNCHER BUTTON
   ========================================================= */

.gvek-ai-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    min-width: 245px;
    height: 54px;
    padding: 0 18px;

    border: 0;
    border-radius: 28px;

    background: linear-gradient(
        135deg,
        var(--gvek-ai-primary, #2b5082),
        #1b3269
    );

    color: #fff;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.24);

    cursor: pointer;

    z-index: 999999;

    font-size: 15px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;

    font-family: Arial, sans-serif;
}


/* Launcher Hover */

.gvek-ai-launcher:hover {
    transform: translateY(-3px);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.30);
}


/* Launcher Icon */

.gvek-ai-launcher-icon {
    width: 27px;
    height: 27px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        var(--gvek-ai-gold, #f1c40f);

    color: #17223a;

    font-size: 17px;
    font-weight: 900;

    flex-shrink: 0;
}


/* Launcher Text */

.gvek-ai-launcher-text {
    letter-spacing: 0.1px;

    font-size: 13px;

    white-space: nowrap;
}


/* =========================================================
   CHAT WINDOW
   ========================================================= */

.gvek-ai-window {
    position: fixed;

    right: 24px;
    bottom: 92px;

    width: 370px;

    max-width:
        calc(100vw - 30px);

    height: 560px;

    max-height:
        calc(100vh - 120px);

    background: #fff;

    border-radius: 20px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.22);

    z-index: 999998;

    overflow: hidden;

    display: none;

    flex-direction: column;

    font-family:
        Arial,
        sans-serif;
}


/* Open Chat */

.gvek-ai-window.gves-open {
    display: flex;
}


/* =========================================================
   CHAT HEADER
   ========================================================= */

.gvek-ai-head {
    background:
        linear-gradient(
            135deg,
            var(--gvek-ai-primary, #2b5082),
            #162c5a
        );

    color: #fff;

    padding: 17px 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-shrink: 0;
}


/* Brand */

.gvek-ai-brand {
    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 0;
}


/* Avatar */

.gvek-ai-avatar {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.14);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 20px;

    flex-shrink: 0;
}


/* Title */

.gvek-ai-title {
    font-size: 16px;

    font-weight: 700;

    line-height: 1.4;

    color: #fff;
}


/* Status */

.gvek-ai-status {
    font-size: 11px;

    opacity: 0.8;

    margin-top: 2px;

    color: #fff;
}


/* Close Button */

.gvek-ai-close {
    border: 0;

    background: transparent;

    color: #fff;

    font-size: 24px;

    line-height: 1;

    cursor: pointer;

    padding: 3px 5px;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.gvek-ai-close:hover {
    opacity: 0.75;

    transform: rotate(90deg);
}


/* =========================================================
   MESSAGES AREA
   ========================================================= */

.gvek-ai-messages {
    flex: 1;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 16px;

    background: #f6f8fb;

    scroll-behavior: smooth;
}


/* Scrollbar */

.gvek-ai-messages::-webkit-scrollbar {
    width: 6px;
}

.gvek-ai-messages::-webkit-scrollbar-track {
    background: transparent;
}

.gvek-ai-messages::-webkit-scrollbar-thumb {
    background: #cbd3dd;

    border-radius: 10px;
}


/* =========================================================
   MESSAGE ROW
   ========================================================= */

.gvek-ai-msg {
    display: flex;

    margin:
        0 0 12px;
}


/* User Message */

.gvek-ai-msg.user {
    justify-content: flex-end;
}


/* Assistant Message */

.gvek-ai-msg.assistant {
    justify-content: flex-start;
}


/* =========================================================
   MESSAGE BUBBLE
   ========================================================= */

.gvek-ai-bubble {
    max-width: 84%;

    padding:
        11px 13px;

    border-radius: 15px;

    background: #fff;

    color: #20252b;

    font-size: 14px;

    line-height: 1.5;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05);

    word-wrap: break-word;

    overflow-wrap: anywhere;
}


/* User Bubble */

.gvek-ai-msg.user .gvek-ai-bubble {
    background:
        var(--gvek-ai-primary, #2b5082);

    color: #fff;

    border-bottom-right-radius: 4px;
}


/* Assistant Bubble */

.gvek-ai-msg.assistant .gvek-ai-bubble {
    border-bottom-left-radius: 4px;
}


/* Bold Text */

.gvek-ai-bubble strong {
    font-weight: 700;
}


/* Paragraph Spacing */

.gvek-ai-bubble br {
    line-height: 1.5;
}


/* =========================================================
   BULLET LIST
   ========================================================= */

.gvek-ai-list-item {
    margin: 4px 0;

    line-height: 1.5;
}


/* =========================================================
   TYPING MESSAGE
   ========================================================= */

.gvek-ai-typing {
    opacity: 0.65;

    font-style: italic;
}


/* =========================================================
   SUGGESTION BUTTONS
   ========================================================= */

.gvek-ai-suggestions {
    padding:
        0 12px 8px;

    background:
        #f6f8fb;

    display: flex;

    gap: 7px;

    overflow-x: auto;

    overflow-y: hidden;

    flex-shrink: 0;
}


/* Suggestion Scrollbar */

.gvek-ai-suggestions::-webkit-scrollbar {
    height: 4px;
}

.gvek-ai-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.gvek-ai-suggestions::-webkit-scrollbar-thumb {
    background: #cbd3dd;

    border-radius: 10px;
}


/* Suggestion Button */

.gvek-ai-suggestion {
    white-space: nowrap;

    border:
        1px solid #dbe2ea;

    background: #fff;

    color: #20252b;

    border-radius: 20px;

    padding:
        7px 10px;

    font-size: 12px;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}


/* Suggestion Hover */

.gvek-ai-suggestion:hover {
    border-color:
        var(--gvek-ai-gold, #f1c40f);

    background:
        #fffdf5;
}


/* =========================================================
   INPUT FORM
   ========================================================= */

.gvek-ai-form {
    display: flex;

    gap: 8px;

    padding: 11px;

    border-top:
        1px solid #e5e9ef;

    background: #fff;

    flex-shrink: 0;
}


/* Input */

.gvek-ai-input {
    flex: 1;

    min-width: 0;

    height: 44px;

    border:
        1px solid #d6dde6;

    border-radius: 24px;

    padding:
        11px 14px;

    outline: none;

    font-size: 14px;

    color: #20252b;

    background: #fff;

    font-family: Arial, sans-serif;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* Input Focus */

.gvek-ai-input:focus {
    border-color:
        var(--gvek-ai-primary, #2b5082);

    box-shadow:
        0 0 0 2px rgba(43, 80, 130, 0.08);
}


/* Input Placeholder */

.gvek-ai-input::placeholder {
    color: #9299a3;
}


/* Send Button */

.gvek-ai-send {
    width: 44px;
    height: 44px;

    flex-shrink: 0;

    border: 0;

    border-radius: 50%;

    background:
        var(--gvek-ai-gold, #f1c40f);

    color: #17223a;

    font-size: 17px;

    font-weight: 700;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Send Hover */

.gvek-ai-send:hover {
    transform: scale(1.06);

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   FOOTER NOTE
   ========================================================= */

.gvek-ai-note {
    text-align: center;

    font-size: 9px;

    line-height: 1.4;

    color: #9299a3;

    padding:
        0 10px 8px;

    background: #fff;

    flex-shrink: 0;
}


/* =========================================================
   GOOGLE MAPS BUTTON
   ========================================================= */

.gvek-ai-map-button {
    display: inline-block;

    margin-top: 8px;

    padding:
        10px 16px;

    background:
        #2b5082;

    color:
        #ffffff !important;

    text-decoration:
        none !important;

    border-radius:
        8px;

    font-weight:
        600;

    font-size:
        14px;

    line-height:
        1.3;

    cursor:
        pointer;

    transition:
        all 0.2s ease;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.12);
}


/* Google Maps Button Hover */

.gvek-ai-map-button:hover {
    background:
        #f1c40f;

    color:
        #222222 !important;

    transform:
        translateY(-1px);

    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.16);
}


/* Google Maps Button Active */

.gvek-ai-map-button:active {
    transform:
        translateY(0);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    /* Launcher */

    .gvek-ai-launcher {
        right: 15px;

        bottom: 15px;

        min-width: 58px;

        width: 58px;

        height: 58px;

        padding: 0;

        border-radius: 50%;
    }


    /* Hide Launcher Text */

    .gvek-ai-launcher-text {
        display: none;
    }


    /* Bigger Mobile Icon */

    .gvek-ai-launcher-icon {
        width: 30px;

        height: 30px;

        font-size: 18px;
    }


    /* Chat Window */

    .gvek-ai-window {
        right: 10px;

        bottom: 84px;

        width:
            calc(100vw - 20px);

        height:
            min(
                620px,
                calc(100vh - 105px)
            );

        max-height:
            calc(100vh - 105px);

        border-radius: 17px;
    }


    /* Mobile Header */

    .gvek-ai-head {
        padding:
            14px 15px;
    }


    /* Mobile Title */

    .gvek-ai-title {
        font-size: 15px;
    }


    /* Mobile Messages */

    .gvek-ai-messages {
        padding: 13px;
    }


    /* Mobile Bubble */

    .gvek-ai-bubble {
        max-width: 90%;

        font-size: 14px;

        padding:
            10px 12px;
    }


    /* Mobile Input */

    .gvek-ai-input {
        height: 42px;

        font-size: 14px;
    }


    /* Mobile Send */

    .gvek-ai-send {
        width: 42px;

        height: 42px;
    }

}


/* =========================================================
   VERY SMALL MOBILE DEVICES
   ========================================================= */

@media (max-width: 380px) {

    .gvek-ai-window {
        right: 7px;

        width:
            calc(100vw - 14px);

        bottom: 80px;
    }


    .gvek-ai-head {
        padding:
            12px;
    }


    .gvek-ai-avatar {
        width: 36px;

        height: 36px;

        font-size: 18px;
    }


    .gvek-ai-title {
        font-size: 14px;
    }


    .gvek-ai-status {
        font-size: 10px;
    }


    .gvek-ai-close {
        font-size: 22px;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.gvek-ai-launcher:focus-visible,
.gvek-ai-close:focus-visible,
.gvek-ai-suggestion:focus-visible,
.gvek-ai-send:focus-visible,
.gvek-ai-map-button:focus-visible {
    outline:
        2px solid #f1c40f;

    outline-offset:
        2px;
}


/* =========================================================
   PREVENT THEME INTERFERENCE
   ========================================================= */

.gvek-ai-window *,
.gvek-ai-launcher * {
    box-sizing: border-box;
}


/* =========================================================
   END
   ========================================================= */