/* Floating Chat Button */
.chat-main .chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #e30613;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.4);
    z-index: 9999;
    transition: 0.3s;
}

.chat-main .chat-toggle:hover {
    transform: scale(1.1);
    background: #ff1a1a;
}

/* Chat Widget */
.chat-main .chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 340px;
    height: 480px;
    background: #001a31;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 19999;

    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.25s ease;
}

/* Active State */
.chat-main .chat-widget.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.chat-main .chat-header {
    padding: 14px;
    color: #fff;
    font-weight: 600;
    background: #001a31;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

/* Close Button */
.chat-main .chat-close {
    position: absolute;
    right: 12px;
    top: 10px;
    font-size: 16px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: 0.2s;
}

.chat-main .chat-close:hover {
    color: #fff;
    transform: scale(1.1);
}

/* Messages */
.chat-main #chat-box {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

/* Message Styles */
.chat-main .msg {
    margin: 6px 0;
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 75%;
    font-size: 14px;
    animation: fadeIn 0.2s ease;
}

.chat-main .user {
    background: #e30613;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.chat-main .bot {
    background: #112b44;
    color: #e6edf3;
    margin-right: auto;
    border-bottom-left-radius: 6px;
}

/* Input */
.chat-main .input-area {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-main #msg {
    flex: 1;
    padding: 12px;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
}

.chat-main button {
    background: #e30613;
    border: none;
    color: white;
    padding: 0 18px;
    cursor: pointer;
}

.chat-main button:hover {
    background: #ff1a1a;
}

/* Badge */
.chat-main #badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff1a1a;
    color: white;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 50%;
    display: none;
}

/* Online Dot */
.chat-main .online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    margin-left: 8px;
    box-shadow: 0 0 6px #00ff88;
}

/* Mobile Responsive */
@media (max-width: 587px) {

    .chat-main .chat-widget {
        width: 100%;
        height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .chat-main .chat-toggle {
        bottom: 75px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================================================= */
/* Mobile Responsive */
@media (max-width: 1024px) {
    jdiv.chat-main>jdiv {
        bottom: 55px !important;
        right: 0 !important;
    }
}