/* Infivio Bot - Chatbot Styles */

.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    display: block !important;
    visibility: visible !important;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow: visible;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: #000000;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    visibility: visible !important;
    opacity: 1 !important;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.chatbot-icon {
    color: #ffffff;
    transition: all 0.3s ease;
}

.chatbot-toggle:hover .chatbot-icon {
    color: #ffffff;
}

.chatbot-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    animation: chatbot-pulse 2s infinite;
}

@keyframes chatbot-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    background: #000000;
    border: 2px solid #ffffff;
    border-radius: 15px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
    animation: chatbot-slide-up 0.3s ease;
}

@keyframes chatbot-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot Header */
.chatbot-header {
    background: #111111;
    padding: 15px 20px;
    border-bottom: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
}

.chatbot-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
}

.chatbot-info p {
    margin: 0;
    font-size: 12px;
    color: #cccccc;
}

.chatbot-close {
    background: none;
    border: none;
    color: #cccccc;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.chatbot-close:hover {
    background: #333333;
    color: #ffffff;
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Hide scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.chatbot-messages::-webkit-scrollbar {
    display: none;
}

.chatbot-message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: #ffffff;
    color: #000000;
}

.user-message .message-avatar {
    background: #333333;
    color: #ffffff;
}

.message-content {
    background: #111111;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid #333333;
}

.user-message .message-content {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #ffffff;
}

.user-message .message-content p {
    color: #000000;
}

.message-time {
    font-size: 11px;
    color: #888888;
    margin-top: 5px;
}

.user-message .message-time {
    color: #666666;
}

/* Quick Actions */
.chatbot-quick-actions {
    padding: 15px 20px;
    border-top: 1px solid #333333;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-action-btn {
    background: #111111;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.quick-action-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Chatbot Input */
.chatbot-input-container {
    padding: 15px 20px;
    border-top: 1px solid #333333;
    background: #111111;
}

.chatbot-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    background: #000000;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.chatbot-input:focus {
    border-color: #ffffff;
}

.chatbot-input::placeholder {
    color: #888888;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-send:hover {
    background: #cccccc;
    transform: scale(1.05);
}

.chatbot-send:disabled {
    background: #333333;
    color: #666666;
    cursor: not-allowed;
    transform: none;
}

/* Contact Form Styles */
.contact-form {
    padding: 20px;
    background: #111111;
    border-top: 1px solid #333333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #cccccc;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #000000;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #ffffff;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
}

.btn-primary:hover {
    background: #cccccc;
}

.btn-secondary {
    background: #333333;
    color: #ffffff;
    border: 1px solid #555555;
}

.btn-secondary:hover {
    background: #444444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 20px;
        right: 20px;
        left: auto;
        max-width: calc(100vw - 40px);
    }
    
    .chatbot-window {
        width: calc(100vw - 40px);
        max-width: 350px;
        height: calc(100vh - 120px);
        max-height: 500px;
        bottom: 80px;
        right: 20px;
        left: auto;
        margin: 0;
        position: fixed;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        position: relative;
        z-index: 10000;
    }
    
    .chatbot-icon {
        width: 20px;
        height: 20px;
    }
    
    .chatbot-messages {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
        /* Hide scrollbar for mobile */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer 10+ */
    }
    
    .chatbot-messages::-webkit-scrollbar {
        display: none;
    }
    
    .chatbot-input-container {
        padding: 10px 15px;
    }
    
    .chatbot-form {
        gap: 8px;
    }
    
    .chatbot-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 14px;
    }
    
    .chatbot-send {
        width: 36px;
        height: 36px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 15px;
        right: 15px;
        max-width: calc(100vw - 30px);
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: 15px;
    }
    
    .chatbot-toggle {
        width: 45px;
        height: 45px;
    }
    
    .chatbot-icon {
        width: 18px;
        height: 18px;
    }
}

/* Loading Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #111111;
    border-radius: 18px;
    border: 1px solid #333333;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #888888;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
