/* InfinityBlockchain Support Chatbot Styles */

/* Chat Button */
.chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
    border: 2px solid #00ffff;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.4);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 255, 255, 0.6);
}

.chatbot-button svg {
    width: 28px;
    height: 28px;
    color: white;
}

.chatbot-button.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    border: 2px solid #00ffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 255, 255, 0.3);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.chatbot-window.active {
    display: flex;
}

/* Chat Header */
.chatbot-header {
    padding: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.3));
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #00ffff;
}

.chatbot-header-logo svg {
    width: 20px;
    height: 20px;
    color: white;
}

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

.chatbot-header-info p {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.chatbot-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.chatbot-close:hover {
    color: #f9fafb;
}

/* Chat Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

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

.chatbot-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-message.bot {
    align-self: flex-start;
    background: rgba(51, 65, 85, 0.8);
    color: #f9fafb;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.chatbot-message.system {
    align-self: center;
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    font-size: 12px;
    text-align: center;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Typing Indicator */
.chatbot-typing {
    display: none;
    align-self: flex-start;
    padding: 12px 16px;
    background: rgba(51, 65, 85, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.chatbot-typing.active {
    display: flex;
    gap: 4px;
    align-items: center;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    background: #00ffff;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Chat Input */
.chatbot-input-container {
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.8);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.chatbot-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 24px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    background: rgba(15, 23, 42, 0.8);
    color: #f9fafb;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.chatbot-input::placeholder {
    color: #64748b;
}

.chatbot-input:focus {
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
    border: 1px solid #00ffff;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

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

/* Escalation Form */
.chatbot-escalation {
    padding: 16px;
    background: rgba(30, 41, 59, 0.8);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    display: none;
}

.chatbot-escalation.active {
    display: block;
}

.chatbot-escalation h5 {
    margin: 0 0 12px;
    color: #f9fafb;
    font-size: 14px;
}

.chatbot-escalation input,
.chatbot-escalation textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    background: rgba(15, 23, 42, 0.8);
    color: #f9fafb;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
    font-family: inherit;
}

.chatbot-escalation input:focus,
.chatbot-escalation textarea:focus {
    border-color: #00ffff;
}

.chatbot-escalation textarea {
    resize: vertical;
    min-height: 60px;
}

.chatbot-escalation-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.chatbot-escalation-buttons button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-escalation-buttons .btn-submit {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid #10b981;
    color: white;
}

.chatbot-escalation-buttons .btn-cancel {
    background: transparent;
    border: 1px solid #64748b;
    color: #94a3b8;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

/* Mobile */
@media (max-width: 480px) {
    .chatbot-window {
        right: 10px;
        bottom: 80px;
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
    }
    
    .chatbot-button {
        right: 10px;
        bottom: 10px;
    }
}

/* Light mode support */
.light .chatbot-window {
    background: rgba(255, 255, 255, 0.98);
    border-color: #8B5CF6;
}

.light .chatbot-message.bot {
    background: rgba(243, 244, 246, 1);
    color: #1f2937;
}

.light .chatbot-input {
    background: rgba(243, 244, 246, 0.8);
    color: #1f2937;
}

.light .chatbot-header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
}
