/* Mini Chatbot Styling */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 90px;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.6);
}

.chatbot-toggle img {
    width: 28px;
    height: 28px;
    pointer-events: none;
}

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

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

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        bottom: 60px;
    }
    to {
        opacity: 1;
        bottom: 80px;
    }
}

@keyframes slideUpMobile {
    from {
        opacity: 0;
        bottom: 55px;
    }
    to {
        opacity: 1;
        bottom: 75px;
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

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

.chatbot-status {
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

.chatbot-message.bot .message-content {
    background: white;
    color: #333;
    border-radius: 12px 12px 12px 4px;
}

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

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border-radius: 12px 12px 4px 12px;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ff6b35;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.chatbot-message.user .message-avatar {
    background: #6c757d;
}

.message-content {
    padding: 10px 14px;
    max-width: 70%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 14px;
}

.chatbot-quick-actions {
    padding: 12px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-action-btn {
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #495057;
}

.quick-action-btn:hover {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.chatbot-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.chatbot-input:focus {
    border-color: #ff6b35;
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
}

.chatbot-send-btn img {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.scroll-to-top img {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        right: 70px;
        bottom: 15px;
    }

    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }

    .chatbot-toggle img {
        width: 24px;
        height: 24px;
    }

    .chatbot-window {
        position: fixed !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        height: calc(100vh - 100px) !important;
        bottom: 75px !important;
        left: 10px !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        animation: none !important;
    }

    .chatbot-window.active {
        display: flex !important;
        position: fixed !important;
        left: 10px !important;
        right: auto !important;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }

    .scroll-to-top img {
        width: 20px;
        height: 20px;
    }

    .message-content {
        max-width: 80%;
        font-size: 13px;
    }

    .chatbot-header {
        padding: 12px 16px;
    }

    .chatbot-title {
        font-size: 14px;
    }

    .chatbot-status {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        right: 60px;
    }

    .chatbot-toggle {
        width: 45px;
        height: 45px;
    }

    .chatbot-toggle img {
        width: 20px;
        height: 20px;
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
    }
}
