/* Wicte Support Chatbot Styles */

.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

/* Chat Button */
.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b0a4 0%, #51b5a3 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 176, 164, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    transition: all 0.3s ease;
    transform-origin: center;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 176, 164, 0.4);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background-color: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), 
                opacity 0.3s ease,
                visibility 0s linear 0.4s;
    visibility: hidden;
}

.chatbot-window.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), 
                opacity 0.3s ease,
                visibility 0s;
}

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

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

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #00b0a4 0%, #51b5a3 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    padding: 2px;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

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

.chatbot-status i {
    font-size: 8px;
    color: #4ade80;
}

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

.chatbot-header-actions button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.chatbot-header-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f6f6f9;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

/* Message Styles */
.chatbot-message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
    align-items: flex-start;
}

.chatbot-message.animate-in {
    animation: messageSlide 0.3s ease;
}

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

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

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

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-avatar i {
    font-size: 16px;
    color: #666;
}

.message-content-container {
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-message.bot .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chatbot-message.user .message-bubble {
    background: linear-gradient(135deg, #00b0a4 0%, #51b5a3 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-timestamp {
    font-size: 11px;
    color: #999;
    padding: 0 8px;
}

.chatbot-message.user .message-timestamp {
    text-align: right;
}

/* Message Actions */
.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.message-action-btn {
    padding: 6px 12px;
    border: 1px solid #00b0a4;
    background: white;
    color: #00b0a4;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.message-action-btn:hover {
    background: #00b0a4;
    color: white;
}

/* Message Attachments */
.message-attachments {
    margin-top: 8px;
}

.message-attachment img {
    max-width: 100%;
    border-radius: 8px;
    cursor: pointer;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
}

.attachment-link:hover {
    background: #e0e0e0;
}

/* Quick Actions */
.chatbot-quick-actions {
    padding: 12px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-action {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-action:hover {
    border-color: #00b0a4;
    color: #00b0a4;
    background: #f0fffe;
}

.quick-action i {
    font-size: 14px;
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    border-top: 1px solid #eee;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.typing-text {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Input Area */
.chatbot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #eee;
}

.chatbot-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f6f6f9;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
}

.chatbot-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    padding: 8px 0;
}

.chatbot-attach,
.chatbot-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-attach:hover {
    background: #eee;
}

.chatbot-send {
    background: #00b0a4;
    color: white;
}

.chatbot-send:hover:not(:disabled) {
    background: #008f85;
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
.chatbot-footer {
    padding: 12px 20px;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.chatbot-end-chat {
    padding: 4px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-end-chat:hover {
    border-color: #dc3545;
    color: #dc3545;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .chatbot-button {
        bottom: 20px;
        right: 20px;
    }

    .chatbot-container {
        bottom: 0;
        right: 0;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Special message styles */
.chatbot-message.error .message-bubble {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.chatbot-message.warning .message-bubble {
    background: #ffeaa7;
    color: #856404;
}

/* Code formatting in messages */
.message-bubble code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

.chatbot-message.user .message-bubble code {
    background: rgba(255, 255, 255, 0.2);
}

/* Links in messages */
.message-bubble a {
    color: #00b0a4;
    text-decoration: underline;
}

.chatbot-message.user .message-bubble a {
    color: white;
}

/* Strong text */
.message-bubble strong {
    font-weight: 600;
}