/* Gemini-inspired Clean UI */
.ag-606be11e-wrapper {
    position: fixed;
    bottom: 24px;
    left: 24px; /* Positioned on Left */
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Trigger Area */
.ag-606be11e-trigger-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Changed layout to row-reverse to put the text on the opposite side (right) of the trigger photo */
.ag-606be11e-trigger-wrapper {
    flex-direction: row-reverse; 
}

.ag-606be11e-need-help {
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 14px;
    color: #202124;
}

.ag-606be11e-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
    display: flex;
    align-items: flex-end;
}

.ag-606be11e-trigger:hover {
    transform: scale(1.05);
}

.ag-606be11e-trigger-img {
    width: 100px;
    height: auto;
    object-fit: contain;
    /* Removed border-radius so the photo is visible outside any circle */
}

.ag-606be11e-trigger-fallback {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-606be11e-trigger-fallback svg {
    color: #4285f4; 
}


/* Container holding Window + Sidebar */
.ag-606be11e-container {
    display: none;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
}

/* Chat Window */
.ag-606be11e-window {
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 300px); /* Adjust based on sidebar */
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #f8f9fa;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Sidebar for Suggestions */
.ag-606be11e-sidebar {
    width: 250px;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    /* Hidden by default, shown via JS after first interaction */
}

@media (max-width: 768px) {
    .ag-606be11e-container {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
    .ag-606be11e-window {
        max-width: calc(100vw - 48px);
    }
    .ag-606be11e-sidebar {
        width: calc(100vw - 48px);
    }
}


/* Header */
.ag-606be11e-header {
    background: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ag-606be11e-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.ag-606be11e-title {
    flex-grow: 1;
    font-weight: 600;
    font-size: 16px;
    color: #202124;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ag-606be11e-status {
    font-size: 12px;
    color: #188038;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ag-606be11e-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #188038;
    border-radius: 50%;
    display: inline-block;
}

.ag-606be11e-close {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    padding: 4px;
    display: flex;
    border-radius: 50%;
    transition: background 0.2s;
}
.ag-606be11e-close:hover {
    background: rgba(0,0,0,0.05);
}

/* Body (Messages area) */
.ag-606be11e-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.ag-606be11e-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #202124;
    word-break: break-word;
}

.ai-msg {
    background: #ffffff;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.user-msg {
    background: #e8eaed;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Footer / Input area */
.ag-606be11e-footer {
    background: #ffffff;
    padding: 16px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
}


/* Sidebar Suggestions */
.ag-606be11e-suggestions-title {
    font-size: 14px;
    color: #202124;
    margin-bottom: 12px;
    font-weight: 600;
}

.ag-606be11e-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ag-606be11e-qbtn {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.ag-606be11e-qbtn:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    color: #4285f4;
}

/* Input Area */
.ag-606be11e-input-area {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 24px;
    padding: 4px 16px 4px 16px;
}

.ag-606be11e-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #202124;
    padding: 8px 0;
}
.ag-606be11e-input::placeholder {
    color: #5f6368;
}

.ag-606be11e-send {
    background: transparent;
    color: #000000;
    border: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.ag-606be11e-send:hover {
    background: rgba(0,0,0,0.05);
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
    align-items: center;
    height: 20px;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: #9aa0a6;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}