/***********************************************/
/***      RX CHATBOT WIDGET STYLES          ***/
/***********************************************/

/* Chatbot Container */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--primary-font);
}

/* Chat Toggle Button */
.chatbot-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-toggle .chat-icon {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF8F3F 0%, #FF6B35 50%, #E85A25 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    z-index: 2;
}

.chatbot-toggle .chat-icon i {
    font-size: 28px;
    color: #ffffff;
    transition: all 0.3s ease;
}

/* Pulse Animation */
.chatbot-toggle .chat-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.4);
    animation: chatPulse 2s infinite;
    z-index: 1;
}

@keyframes chatPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.chatbot-toggle:hover .chat-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px 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;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

.bot-avatar i {
    font-size: 22px;
    color: #ffffff;
}

.bot-details h4 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.bot-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.chat-close {
    width: 35px;
    height: 35px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-close i {
    color: #ffffff;
    font-size: 18px;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chat Messages */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

.message-avatar i {
    color: #ffffff;
    font-size: 16px;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    color: #ffffff;
}

.bot-message .message-content {
    background: #ffffff;
    color: #1a1a1a;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.message-content p+p {
    margin-top: 8px;
}

/* Quick Replies */
.quick-replies {
    padding: 0 20px 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: #f8f9fa;
}

.quick-reply {
    padding: 8px 16px;
    background: #ffffff;
    border: 1.5px solid #3a3a3a;
    color: #3a3a3a;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply:hover {
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Chat Input */
.chatbot-input {
    padding: 15px 20px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    border: 1.5px solid #e0e0e0;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.chatbot-input input:focus {
    border-color: #3a3a3a;
    box-shadow: 0 0 0 3px rgba(42, 42, 42, 0.1);
}

.chatbot-input button {
    width: 45px;
    height: 45px;
    border: none;
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-input button i {
    color: #ffffff;
    font-size: 16px;
}

.chatbot-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #3a3a3a;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 20px;
        right: 20px;
    }

    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 90px;
        right: -10px;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
    }

    .chatbot-toggle .chat-icon {
        width: 55px;
        height: 55px;
    }

    .chatbot-toggle .chat-icon i {
        font-size: 26px;
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(42, 42, 42, 0.3);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(42, 42, 42, 0.5);
}