/* ========================================
   LIVE CHAT WIDGET - PINK PURPLE THEME
======================================== */

/* Chat Bubble (Floating Button) */
.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #E8A0E8 0%, #C77DFF 100%);
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 20px rgba(199, 125, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: all 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(199, 125, 255, 0.6);
}

.chat-bubble i {
    font-size: 1.5rem;
    color: #FFFFFF;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF6B9D;
    color: #FFFFFF;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid #FFFFFF;
}

/* Chat Widget Container */
.live-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(199, 125, 255, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transition: all 0.3s ease;
}

.live-chat-widget.active {
    display: flex;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #E8A0E8 0%, #C77DFF 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #FFFFFF;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar i {
    font-size: 1.2rem;
    color: #FFFFFF;
}

.chat-header h6 {
    color: #FFFFFF !important;
    margin: 0;
    font-weight: 700;
}

.chat-header small {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.75rem;
}

.chat-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chat-toggle i {
    color: #FFFFFF;
    font-size: 1rem;
}

/* Chat Body */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F8F0FF;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Chat Message */
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: #FFFFFF;
    color: #2C3E50;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(199, 125, 255, 0.1);
}

.user-message .message-content {
    background: linear-gradient(135deg, #E8A0E8 0%, #C77DFF 100%);
    color: #FFFFFF;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(199, 125, 255, 0.2);
}

.message-time {
    font-size: 0.7rem;
    color: #8B95A5;
    margin-top: 4px;
    padding: 0 4px;
}

.bot-message .message-time {
    align-self: flex-start;
}

.user-message .message-time {
    align-self: flex-end;
}

/* Chat Footer */
.chat-footer {
    padding: 15px;
    background: #FFFFFF;
    border-top: 1px solid #E8D5F5;
}

.chat-footer .input-group {
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E8D5F5;
    border-radius: 25px;
    font-size: 0.9rem;
    color: #2C3E50;
    transition: all 0.3s ease;
}

.chat-footer input:focus {
    outline: none;
    border-color: #C77DFF;
    box-shadow: 0 0 0 4px rgba(199, 125, 255, 0.1);
}

.chat-footer input::placeholder {
    color: #B8A0C8;
}

.chat-footer button {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #E8A0E8 0%, #C77DFF 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(199, 125, 255, 0.3);
}

.chat-footer button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(199, 125, 255, 0.4);
}

.chat-footer button i {
    color: #FFFFFF;
    font-size: 1rem;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #E8A0E8 0%, #C77DFF 100%);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9997;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(199, 125, 255, 0.3);
}

.scroll-top.show {
    display: flex;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(199, 125, 255, 0.4);
}

.scroll-top i {
    color: #FFFFFF;
    font-size: 1.2rem;
}

/* Scrollbar Styling for Chat Body */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #F0D5FF;
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #C77DFF;
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #B067EE;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #FFFFFF;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(199, 125, 255, 0.1);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #C77DFF;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .live-chat-widget {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 10px;
        right: 10px;
    }

    .chat-bubble {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .scroll-top {
        bottom: 90px;
        right: 20px;
    }
}

/* Animation for chat widget */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.live-chat-widget.active {
    animation: slideInUp 0.3s ease-out;
}

/* Pulse animation for chat bubble */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(199, 125, 255, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(199, 125, 255, 0.6);
    }

    100% {
        box-shadow: 0 4px 20px rgba(199, 125, 255, 0.4);
    }
}

.chat-bubble {
    animation: pulse 2s infinite;
}