/* EcoShopBot - Modern Chat UI Styles */

/* Chat Toggle Button */
#ecoshop-chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9998;
}

#ecoshop-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

#ecoshop-chat-toggle.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

#ecoshop-chat-toggle::before {
    content: "💬";
    font-size: 28px;
}

#ecoshop-chat-toggle.active::before {
    content: "✕";
    font-size: 24px;
}

/* Chat Window */
#ecoshop-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#ecoshop-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.ecoshop-chat-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.ecoshop-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ecoshop-chat-avatar {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.ecoshop-chat-title-wrapper h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ecoshop-chat-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ecoshop-status-dot {
    width: 8px;
    height: 8px;
    background: #86efac;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.ecoshop-chat-actions {
    display: flex;
    gap: 8px;
}

.ecoshop-chat-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.ecoshop-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ecoshop-chat-close::before { content: "✕"; }
.ecoshop-chat-clear::before { content: "🗑️"; }

/* Messages */
#ecoshop-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9fafb;
}

#ecoshop-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#ecoshop-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 3px;
}

.ecoshop-message {
    display: flex;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ecoshop-message-user {
    justify-content: flex-end;
}

.ecoshop-message-bot {
    justify-content: flex-start;
}

.ecoshop-message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ecoshop-message-user .ecoshop-message-bubble {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.ecoshop-message-bot .ecoshop-message-bubble {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

/* Typing Indicator */
.ecoshop-typing {
    display: flex;
    gap: 4px;
    padding: 16px 20px !important;
}

.ecoshop-typing span {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ecoshop-typing span:nth-child(2) { animation-delay: 0.2s; }
.ecoshop-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Input Area */
.ecoshop-chat-input {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

#ecoshop-user-input {
    flex: 1;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s;
    max-height: 100px;
}

#ecoshop-user-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#ecoshop-send-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    transition: transform 0.2s;
}

#ecoshop-send-btn:hover {
    transform: translateY(-2px);
}

#ecoshop-send-btn::before {
    content: "⬆️";
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #ecoshop-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
