/* Beezle Chat Support Widget Styles */

/* Chat Button */
.beezle-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6C44E0 0%, #8B5CF6 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(108, 68, 224, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.beezle-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(108, 68, 224, 0.5);
}

.beezle-chat-button svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.beezle-chat-button .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    border-radius: 50%;
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Chat Window */
.beezle-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.beezle-chat-window.open {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.beezle-chat-header {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3446 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.beezle-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.beezle-chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6C44E0 0%, #8B5CF6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.beezle-chat-header-avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.beezle-chat-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.beezle-chat-header-text p {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: 0.8;
}

.beezle-chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.beezle-chat-close:hover {
    opacity: 1;
}

/* Chat Messages */
.beezle-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fa;
}

.beezle-chat-message {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.beezle-chat-message.user {
    align-items: flex-end;
}

.beezle-chat-message.ai,
.beezle-chat-message.system {
    align-items: flex-start;
}

.beezle-chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.beezle-chat-message.user .beezle-chat-bubble {
    background: linear-gradient(135deg, #6C44E0 0%, #8B5CF6 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.beezle-chat-message.ai .beezle-chat-bubble {
    background: white;
    color: #1a1f2e;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.beezle-chat-message.system .beezle-chat-bubble {
    background: #e9ecef;
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
}

.beezle-chat-time {
    font-size: 11px;
    color: #adb5bd;
    margin-top: 4px;
    padding: 0 8px;
}

/* Typing Indicator */
.beezle-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: fit-content;
}

.beezle-typing-dot {
    width: 8px;
    height: 8px;
    background: #adb5bd;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.beezle-typing-dot:nth-child(1) { animation-delay: 0s; }
.beezle-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.beezle-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Chat Input */
.beezle-chat-input-area {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: center;
}

.beezle-chat-input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.beezle-chat-input:focus {
    border-color: #6C44E0;
}

.beezle-chat-input::placeholder {
    color: #adb5bd;
}

.beezle-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6C44E0 0%, #8B5CF6 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.beezle-chat-send:hover {
    transform: scale(1.1);
}

.beezle-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.beezle-chat-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Escalate Button */
.beezle-escalate-btn {
    width: 100%;
    padding: 10px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: background 0.2s;
}

.beezle-escalate-btn:hover {
    background: #128C7E;
}

.beezle-escalate-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Quick Actions */
.beezle-quick-actions {
    padding: 8px 16px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.beezle-quick-action {
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    font-size: 12px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
}

.beezle-quick-action:hover {
    background: #6C44E0;
    color: white;
    border-color: #6C44E0;
}

/* Responsive */
@media (max-width: 480px) {
    .beezle-chat-window {
        width: calc(100% - 20px);
        height: calc(100% - 100px);
        right: 10px;
        bottom: 80px;
        border-radius: 12px;
    }
    
    .beezle-chat-button {
        width: 56px;
        height: 56px;
        right: 16px;
        bottom: 16px;
    }
}
