/* Widget Container */
.gemini-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 380px;
    height: 70vh;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.gemini-widget.closed {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.gemini-widget span {
    font-size: 16px;
}

/* Header */
.gemini-header {
    background: linear-gradient(90deg, var(--header-bg), var(--text-color));
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.gemini-header button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Chat History */
.gemini-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9faff;
}

.ai-message,
.user-message {
    margin-bottom: 15px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 14px;
}

.ai-message {
    display: flex;
    align-items: flex-start;
    color: #333;
}

.ai-icon {
    font-size: 20px;
    margin-right: 10px;
}

.user-message {
    margin-left: auto;
    background: #eef2f8;
    color: #1f1f1f;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
}

/* Suggestions Chips */
.gemini-suggestions {
    padding: 10px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid #eee;
}

.suggestion-chip {
    background: #f0f4f9;
    border: 1px solid #dde3ea;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #444746;
    transition: 0.2s;
    flex-shrink: 0;
}

.suggestion-chip:hover {
    background: #e1e7ef;
}

/* Input Area */
.gemini-input-area {
    padding: 15px;
    display: flex;
    align-items: center;
    border-top: 1px solid #eee;
    background: #fff;
}

#user-input {
    field-sizing: content;
    min-height: 35px;
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
}

#send-btn {
    background: none;
    border: none;
    color: var(--header-color);
    cursor: pointer;
    width: 24px;
}

#send-btn:disabled {
    color: #ccc;
}

/* Floating Button */
.gemini-float-btn {
    width: 100px;
    height: 40px;
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-image: linear-gradient(90deg, var(--header-bg), var(--text-color));
    background-origin: border-box;
    background-clip: content-box, border-box;
    border-radius: 30px;
    font-weight: normal;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    transition: 0.3s;
    color: #FFFFFF;
    text-align: center;
    font-size: 16px;
    overflow: hidden;
    outline: none;
    border: none;
}

.gemini-float-btn::before {
    content: "";
    position: absolute;
    left: -20%;
    top: -10%;
    width: 0;
    height: 100%;
    transform: rotate(15deg) scale(1, 2);
    box-shadow: 0 0 30px 15px #ffffffb3;
    animation: 3s ease-in-out infinite button-glow;
}

@keyframes button-glow {
    0% {
        left: -50%;
    }

    100%,
    50% {
        left: 150%;
    }
}

.gemini-float-btn:hover {
    transform: scale(1.05);
}

/* Loading Animation */
.typing-indicator::after {
    content: '...';
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0% {
        content: '.'
    }

    50% {
        content: '..'
    }

    100% {
        content: '...'
    }
}