@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

#gw-chatbot-widget {
    position: fixed;
    bottom: 90px; 
    right: 25px; /* Increased this from 15px to 25px to pull the whole window away from the right edge */
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- TOGGLE BUTTON --- */
#gw-chat-toggle {
    
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: #03a98f; 
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 10;
}
#gw-chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
#gw-chat-toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px; 
}

/* --- CHAT WINDOW --- */
#gw-chat-window {
    position: absolute;
    bottom: 50px; /* Adds a clean 15px gap between the circular button and the bottom of the chat window */
    right: 0;     /* Aligns the right edge of the chat window with the right edge of the circular button */
    width: 360px;
    height: 550px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
    z-index: 5;
}
#gw-chat-window.gw-hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

/* --- HEADER --- */
#gw-chatbox-header {
    background-color: #6F3B96;
    color: #ffffff;
    padding: 18px 20px;
    font-weight: 700;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#gw-chat-title {
    font-size: 16px;
    margin: 0;
}
#gw-chat-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}
#gw-chat-close:hover {
    opacity: 1;
}

/* --- BODY & MESSAGES --- */
#gw-chatbox-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    color: #333333;
    background-color: #fcfcfc;
}
.gw-welcome-message {
    text-align: left;
    margin-bottom: 20px;
}
.gw-welcome-message h3 {
    font-size: 18px;
    color: #6F3B96;
    margin: 0 0 10px 0;
    font-weight: 700;
}
.gw-welcome-message p {
    font-size: 14px;
    color: #555;
    margin: 0 0 20px 0;
    line-height: 1.5;
}
.gw-home-screen {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gw-platform-btn {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: left;
}
.gw-platform-btn:hover {
    border-color: #03a98f;
    background: #f0fdfb;
    color: #03a98f;
}
.gw-platform-btn svg {
    width: 20px;
    height: 20px;
    stroke: #6F3B96;
    fill: none;
    flex-shrink: 0;
}
.gw-platform-btn:hover svg {
    stroke: #03a98f;
}

/* --- CHAT BUBBLES --- */
.gw-message {
    margin-bottom: 15px;
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    word-wrap: break-word;
    font-size: 14px;
    clear: both;
}
.gw-user-message {
    background-color: #6F3B96;
    color: #ffffff;
    float: right;
    border-bottom-right-radius: 4px;
}
.gw-bot-message {
    background-color: #ffffff;
    color: #333333;
    float: left;
    border-bottom-left-radius: 4px;
    border: 1px solid #e0e0e0;
}
.gw-bot-message p { margin-top: 0; margin-bottom: 10px; }
.gw-bot-message p:last-child { margin-bottom: 0; }
.gw-bot-message ul, .gw-bot-message ol { margin-top: 5px; margin-bottom: 10px; padding-left: 20px; }

/* --- TYPING INDICATOR --- */
.gw-typing-indicator { display: flex; align-items: center; height: 20px; }
.gw-typing-indicator span {
    height: 6px; width: 6px; background-color: #03a98f; border-radius: 50%;
    display: inline-block; margin: 0 2px; opacity: 0.6; animation: gw-bounce 1s infinite;
}
.gw-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.gw-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes gw-bounce { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(-4px); opacity: 1; } }

/* --- FOOTER & INPUT --- */
#gw-chatbox-footer {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    background-color: #ffffff;
}
#gw-user-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    margin-right: 10px;
    outline: none;
    background-color: #f8f9fa;
    color: #333333;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
#gw-user-input:focus {
    border-color: #03a98f;
    background-color: #ffffff;
}
#gw-user-input:disabled { background-color: #e9ecef; cursor: not-allowed; }
#gw-send-btn {
    background-color: #03a98f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
#gw-send-btn:hover { background-color: #028d77; }
#gw-send-btn:disabled { background-color: #a0a0a0; cursor: not-allowed; }

/* --- SCROLLBAR --- */
#gw-chatbox-body::-webkit-scrollbar { width: 6px; }
#gw-chatbox-body::-webkit-scrollbar-track { background: transparent; }
#gw-chatbox-body::-webkit-scrollbar-thumb { background-color: #d0d0d0; border-radius: 10px; }