/* Chatbot Widget Styles */
.gc-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gc-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gc-primary-color, #007cba);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.gc-chatbot-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.gc-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.gc-chatbot-window.active {
    display: flex;
}

/* Modern Theme */
.gc-theme-modern .gc-chatbot-window {
    border: 1px solid #e0e0e0;
}

.gc-theme-modern .gc-chatbot-header {
    background: linear-gradient(135deg, var(--gc-primary-color, #007cba), var(--gc-secondary-color, #005a8b));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Classic Theme */
.gc-theme-classic .gc-chatbot-window {
    border: 2px solid var(--gc-primary-color, #007cba);
    border-radius: 8px;
}

.gc-theme-classic .gc-chatbot-header {
    background: var(--gc-primary-color, #007cba);
    color: white;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Minimal Theme */
.gc-theme-minimal .gc-chatbot-window {
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gc-theme-minimal .gc-chatbot-header {
    background: #f5f5f5;
    color: #333;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

/* Common Styles */
.gc-chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.gc-chatbot-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.gc-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gc-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.gc-message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gc-message.user {
    flex-direction: row-reverse;
}

.gc-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.gc-message.user .gc-message-avatar {
    background: var(--gc-primary-color, #007cba);
    color: white;
}

.gc-message.bot .gc-message-avatar {
    background: #667eea;
    color: white;
}

.gc-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: #333;
}

.gc-message.user .gc-message-content {
    background: var(--gc-primary-color, #007cba);
    color: white;
}

.gc-message.bot .gc-message-content {
    background: white;
    color: #333;
    border: 1px solid #e5e7eb;
}

.gc-message-content.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.gc-message-content.qa {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.gc-message-content.irrelevant {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.gc-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.gc-message.user .gc-message-time {
    color: rgba(255, 255, 255, 0.8);
}

.gc-token-warning {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin: 10px 20px;
    border: 1px solid #ffeeba;
}

.gc-chatbot-input {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.gc-input-wrapper {
    display: flex;
    gap: 10px;
}

.gc-message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.gc-message-input:focus {
    border-color: var(--gc-primary-color, #007cba);
}

.gc-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gc-primary-color, #007cba);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.gc-send-btn:hover {
    transform: scale(1.05);
}

.gc-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gc-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    width: fit-content;
    border: 1px solid #e5e7eb;
}

.gc-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite;
}

.gc-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.gc-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .gc-chatbot-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .gc-chatbot-toggle {
        bottom: 10px;
        right: 10px;
    }
}