/* Wennabot - Modern Chatbot UI */
:root {
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f093fb;
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wennabot Chat Container */
.wennabot-chat-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Position Classes */
.wennabot-chat-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.wennabot-chat-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

.wennabot-chat-container.top-right {
    top: 20px;
    right: 20px;
}

.wennabot-chat-container.top-left {
    top: 20px;
    left: 20px;
}

/* Chat Button */
.wennabot-button {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wennabot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
}

.wennabot-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.wennabot-button-text {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.wennabot-button:hover .wennabot-button-text {
    opacity: 1;
    transform: translateX(0);
}

.wennabot-button-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Chat Window */
.wennabot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.wennabot-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Position adjustments for chat window */
.wennabot-chat-container.bottom-left .wennabot-window {
    right: auto;
    left: 0;
}

.wennabot-chat-container.top-right .wennabot-window {
    bottom: auto;
    top: 80px;
}

.wennabot-chat-container.top-left .wennabot-window {
    bottom: auto;
    top: 80px;
    right: auto;
    left: 0;
}

/* Header */
.wennabot-header {
    background: var(--primary-gradient);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.wennabot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wennabot-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wennabot-header-text {
    display: flex;
    flex-direction: column;
}

.wennabot-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.wennabot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--success-color);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.wennabot-header-actions {
    display: flex;
    gap: 8px;
}

.wennabot-btn-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.wennabot-btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Messages */
.wennabot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
}

.wennabot-messages::-webkit-scrollbar {
    width: 4px;
}

.wennabot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.wennabot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.wennabot-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wennabot-message.user {
    flex-direction: row-reverse;
}

.wennabot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wennabot-message.bot .wennabot-message-avatar {
    background: var(--primary-gradient);
    color: white;
}

.wennabot-message.user .wennabot-message-avatar {
    background: #e2e8f0;
    color: #64748b;
}

.wennabot-message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.wennabot-message-text {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.wennabot-message.bot .wennabot-message-text {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.wennabot-message.user .wennabot-message-text {
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 4px;
}

.wennabot-message-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    align-self: flex-end;
}

.wennabot-message.user .wennabot-message-time {
    align-self: flex-start;
}

/* Typing indicator */
.wennabot-typing {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: messageSlideIn 0.3s ease;
}

.wennabot-typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}

.wennabot-typing-dot {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.wennabot-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.wennabot-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input */
.wennabot-input-container {
    padding: 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.wennabot-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.wennabot-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 22px;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.wennabot-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wennabot-send-btn {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wennabot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wennabot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Options */
.wennabot-options {
    display: flex;
    gap: 8px;
}

.wennabot-option-btn {
    flex: 1;
    padding: 8px 12px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.wennabot-option-btn:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 480px) {
    .wennabot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: 20px;
        left: 20px;
    }
    
    .wennabot-chat-container.bottom-left .wennabot-window {
        left: 20px;
        right: 20px;
    }
    
    .wennabot-chat-container.top-right .wennabot-window {
        top: 80px;
        bottom: 20px;
    }
    
    .wennabot-chat-container.top-left .wennabot-window {
        top: 80px;
        bottom: 20px;
    }
    
    .wennabot-button {
        width: 56px;
        height: 56px;
    }
    
    .wennabot-button-text {
        display: none;
    }
}

/* Hide on mobile if disabled */
@media (max-width: 768px) {
    .wennabot-chat-container.mobile-hidden {
        display: none !important;
    }
}

/* Animation for chat window */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --border-color: #374151;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
.wennabot-button:focus,
.wennabot-btn-icon:focus,
.wennabot-send-btn:focus,
.wennabot-input:focus,
.wennabot-option-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

