/* Modern Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
}

/* Chatbot Button */
.chatbot-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff5e15 0%, #e54d0a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 94, 21, 0.4);
    transition: all 0.3s ease;
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(255, 94, 21, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(255, 94, 21, 0.6);
    }
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(255, 94, 21, 0.6);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #002052;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #fff;
    animation: bounce 1s infinite, pulse-navy 2s infinite;
    box-shadow: 0 0 0 0 rgba(0, 32, 82, 0.7);
}

@keyframes pulse-navy {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 32, 82, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 32, 82, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 32, 82, 0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px) rotate(-10deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px) rotate(10deg);
    }
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 360px;
    max-height: 550px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

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

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #002052 0%, #003875 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

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

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

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

.chatbot-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 5px;
}

.chatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

/* Chatbot Body */
.chatbot-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    background: #f8f9fa;
}

/* Messages */
.chatbot-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff5e15 0%, #e54d0a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.message-content {
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 80%;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Quick Replies */
.chatbot-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.quick-reply {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.quick-reply i {
    font-size: 18px;
    color: #ff5e15;
}

.quick-reply:hover {
    background: #ff5e15;
    border-color: #ff5e15;
    color: #fff;
    transform: translateX(5px);
}

.quick-reply:hover i {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 20px;
        left: 20px;
    }
    
    #scrollUp {
        right: 20px;
        bottom: 20px;
        height: 55px;
        width: 55px;
        line-height: 55px;
        font-size: 18px;
    }
    
    .chatbot-window {
        width: calc(100vw - 40px);
        max-width: 360px;
        max-height: 450px;
    }
    
    .chatbot-button {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 15px;
        left: 15px;
    }
    
    .chatbot-window {
        position: fixed;
        bottom: 85px;
        left: 15px;
        width: calc(100vw - 30px);
        max-width: 340px;
        max-height: 480px;
        transform: none;
    }
    
    #scrollUp {
        right: 15px;
        bottom: 15px;
        height: 50px;
        width: 50px;
        line-height: 50px;
        font-size: 16px;
    }
    
    .chatbot-window.active {
        transform: none;
    }
    
    .chatbot-body {
        padding: 15px;
        max-height: 350px;
        overflow-y: auto;
    }
    
    .chatbot-header {
        padding: 15px;
    }
    
    .chatbot-avatar {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .chatbot-title h4 {
        font-size: 15px;
    }
    
    .quick-reply {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}
