/* Integrated Chatbot Styles */
.chatbot-integrated {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    font-family: 'Roboto', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    background: linear-gradient(135deg, #0398c9 0%, #6fb8ca 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-weight: 600;
}

.chatbot-title i {
    font-size: 18px;
}

.chatbot-status {
    font-size: 11px;
    opacity: 0.8;
}

.chatbot-controls {
    display: flex;
    gap: 5px;
}

.chatbot-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-btn:hover {
    background: rgba(255,255,255,0.3);
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chatbot-message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
    gap: 10px;
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.chatbot-message.bot .chatbot-message-avatar {
    background: #0398c9;
}

.chatbot-message.user .chatbot-message-avatar {
    background: #6c757d;
}

.chatbot-message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.chatbot-message.bot .chatbot-message-content {
    background: white;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

.chatbot-message.user .chatbot-message-content {
    background: #0398c9;
    color: white;
    border-bottom-right-radius: 5px;
}

.chatbot-message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
}

.chatbot-quick-actions {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-action-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.quick-action-btn:hover {
    background: #0398c9;
    color: white;
    border-color: #0398c9;
}

.chatbot-captcha-area {
    padding: 15px 20px;
    background: #fff3cd;
    border-top: 2px solid #ffc107;
    border-left: 4px solid #ffc107;
    display: block;
    visibility: visible;
    opacity: 1;
}

.chatbot-captcha-area.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.chatbot-captcha-area.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.captcha-input-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.captcha-label {
    font-size: 12px;
    font-weight: 600;
    color: #856404;
    margin: 0;
}

.captcha-image-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.captcha-image-container img {
    border: 1px solid #ddd;
    border-radius: 4px;
}

#captcha-input {
    flex: 1;
    max-width: 120px;
}

.chatbot-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.chatbot-input-area .input-group {
    display: flex;
}

.chatbot-input-area .form-control {
    border: 1px solid #ddd;
    border-radius: 25px 0 0 25px;
    padding: 10px 15px;
    font-size: 14px;
    border-right: none;
}

.chatbot-input-area .form-control:focus {
    border-color: #0398c9;
    box-shadow: none;
}

.chatbot-input-area .btn {
    border-radius: 0 25px 25px 0;
    border: 1px solid #0398c9;
    background: #0398c9;
    color: white;
    padding: 10px 15px;
    border-left: none;
}

.chatbot-input-area .btn:hover {
    background: #0288b8;
}

/* Loading animation */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
}

.chatbot-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0398c9;
    animation: chatbot-typing 1.4s infinite ease-in-out;
}

.chatbot-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.chatbot-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes chatbot-typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-integrated {
        width: 90%;
        height: 70vh;
        bottom: 10px;
        right: 5%;
    }
}
