
/* Modern Chatbot Styles */
#futuracto-chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.chatbot-toggle {
    background: linear-gradient(135deg, #00BCE4 0%, #006f9c 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 188, 228, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 188, 228, 0.4);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 420px;
    height: 650px;
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 188, 228, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 188, 228, 0.1);
    backdrop-filter: blur(20px);
}

#futuracto-chatbot.open .chatbot-window {
    display: flex;
    animation: slideUpScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpScale {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #00BCE4 0%, #006f9c 100%);
    color: white;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="0%" r="100%"><stop offset="0%" stop-color="%23fff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat-x;
    pointer-events: none;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: linear-gradient(145deg, #f8faff 0%, #ffffff 100%);
    scrollbar-width: thin;
    scrollbar-color: #e1e8ed transparent;
}

.message {
    margin-bottom: 20px;
    animation: messageSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.message-content {
    padding: 16px 20px;
    border-radius: 20px;
    max-width: 85%;
    line-height: 1.6;
    font-size: 15px;
    position: relative;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
    color: #2d3748;
    margin-right: auto;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 16px rgba(0, 188, 228, 0.08);
    border-radius: 20px 20px 20px 6px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #00BCE4 0%, #006f9c 100%);
    color: white;
    margin-left: auto;
    box-shadow: 0 4px 16px rgba(0, 188, 228, 0.3);
    border-radius: 20px 20px 6px 20px;
}

.typing .message-content {
    background: #f1f3f4;
    color: #6c757d;
    font-style: italic;
    animation: typingPulse 1.5s infinite;
}

@keyframes typingPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.quick-actions {
    padding: 16px 24px;
    background: white;
    border-top: 1px solid #f0f2f5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-action-btn {
    background: linear-gradient(135deg, #f8faff 0%, #e1e8ed 100%);
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, #00BCE4 0%, #006f9c 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 188, 228, 0.3);
}

.chatbot-input {
    padding: 20px 24px;
    background: white;
    border-top: 1px solid #f0f2f5;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.input-container {
    flex: 1;
    position: relative;
}

.chatbot-input input {
    width: 100%;
    border: 2px solid #e1e8ed;
    border-radius: 20px;
    padding: 14px 20px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8faff;
    resize: none;
    max-height: 100px;
    min-height: 48px;
}

.chatbot-input input:focus {
    border-color: #00BCE4;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 188, 228, 0.1);
}

.send-button {
    background: linear-gradient(135deg, #00BCE4 0%, #006f9c 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    justify-content: center;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 228, 0.4);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Knowledge Indicators */
.knowledge-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 188, 228, 0.1);
    color: #00BCE4;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    #futuracto-chatbot {
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        right: -15px;
        bottom: 80px;
        border-radius: 20px;
    }
    
    .chatbot-toggle span {
        display: none;
    }
    
    .chatbot-toggle {
        width: 64px;
        height: 64px;
        padding: 18px;
        justify-content: center;
    }
    
    .chatbot-messages {
        padding: 16px;
    }
    
    .quick-actions {
        padding: 12px 16px;
    }
    
    .chatbot-input {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .chatbot-window {
        width: 100vw;
        height: 100vh;
        right: 0;
        bottom: 0;
        border-radius: 0;
        position: fixed;
    }
    
    .chatbot-header {
        border-radius: 0;
    }
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e1e8ed 0%, #cbd5e0 100%);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
}

/* Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00BCE4;
    animation: loadingBounce 1.4s infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

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

/* Enhanced Message Styling */
.bot-message .message-content strong {
    color: #00BCE4;
    font-weight: 700;
}

.bot-message .message-content ul,
.bot-message .message-content ol {
    margin: 12px 0;
    padding-left: 20px;
}

.bot-message .message-content li {
    margin: 6px 0;
    line-height: 1.5;
}

/* Status Indicators */
.status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Advanced Hover Effects */
.message-content:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

.bot-message .message-content:hover {
    box-shadow: 0 6px 20px rgba(0, 188, 228, 0.12);
}

/* Enhanced Typography */
.message-content h4 {
    color: #00BCE4;
    font-weight: 700;
    margin: 12px 0 8px 0;
    font-size: 16px;
}

.message-content p {
    margin: 8px 0;
}
