/**
 * Gemini AI Chatbot Styles
 * Modern, responsive chat widget
 */

.gemini-chatbot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toggle Button */
.gemini-chatbot-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: all 0.3s ease;
    padding: 0;
    overflow: visible;
}

.gemini-chatbot-toggle:hover {
    transform: scale(1.1);
}

.gemini-chatbot-toggle .toggle-icon {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: 0;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.gemini-chatbot-toggle .close-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Chat Window */
.gemini-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 500px;
    max-height: calc(100vh - 150px);
    background: #0f172a;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: geminiSlideUp 0.3s ease;
}

@keyframes geminiSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.gemini-chatbot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: white;
}

.gemini-chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gemini-chatbot-avatar .avatar-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gemini-chatbot-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gemini-chatbot-name {
    font-weight: 600;
    font-size: 16px;
}

.gemini-chatbot-status {
    font-size: 12px;
    opacity: 0.9;
}

/* Clear Chat Button (Dustbin) */
.gemini-clear-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
    padding: 6px;
}

.gemini-clear-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.gemini-clear-btn .btn-icon {
    width: 18px;
    height: 18px;
    filter: invert(1);
}

/* Button Icon Styles */
.btn-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Messages Area */
.gemini-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gemini-chat-message {
    display: flex;
    max-width: 85%;
}

.gemini-chat-message.user {
    align-self: flex-end;
}

.gemini-chat-message.bot {
    align-self: flex-start;
}

.gemini-message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.gemini-chat-message.user .gemini-message-content {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-bottom-right-radius: 4px;
}

.gemini-chat-message.bot .gemini-message-content {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

/* Typing Indicator */
.gemini-chat-message.bot.typing .gemini-message-content {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
}

.gemini-typing-dot {
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
    animation: geminiTypingBounce 1.4s infinite ease-in-out;
}

.gemini-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.gemini-typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes geminiTypingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Input Area */
.gemini-chatbot-input-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #1e293b;
}

#gemini-chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: #0f172a;
    color: white;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#gemini-chatbot-input:focus {
    border-color: #6366f1;
}

#gemini-chatbot-input::placeholder {
    color: #64748b;
}

#gemini-chatbot-send {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    padding: 8px;
}

#gemini-chatbot-send:hover {
    transform: scale(1.05);
}

#gemini-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#gemini-chatbot-send .btn-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

/* Microphone Button */
#gemini-chatbot-mic {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 8px;
}

#gemini-chatbot-mic .btn-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

#gemini-chatbot-mic:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#gemini-chatbot-mic.listening {
    background: #ef4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Input Row Layout */
.gemini-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

/* Clear Button */
.gemini-clear-btn {
    font-size: 16px;
    color: white;
}

/* Scrollbar Styling */
.gemini-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.gemini-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.gemini-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.gemini-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Footer Branding */
.gemini-chatbot-footer {
    width: 100%;
    text-align: center;
    padding: 8px 0 2px;
    margin-top: 4px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.3px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .gemini-chatbot-container {
        bottom: 16px;
        right: 16px;
    }

    .gemini-chatbot-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        bottom: 70px;
        right: -8px;
    }
}