/* ----------------------------------------------
 * DVIX Floating Chatbot - Premium Design
 * ---------------------------------------------- */

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Chat Button */
.chat-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #001F3F 0%, #002856 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 31, 63, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: float-glow 3s ease-in-out infinite;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.chat-button i {
    font-size: 28px;
    color: #FFD700;
    transition: transform 0.3s;
}

.chat-button:hover i {
    transform: rotate(15deg);
}

@keyframes float-glow {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 4px 20px rgba(0, 31, 63, 0.3);
    }
    50% {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
    }
}

/* Notification Badge */
.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FFD700;
    color: #001F3F;
    font-size: 10px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-badge 1.5s infinite;
    border: 2px solid white;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(255, 215, 0, 0);
    }
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    opacity: 0;
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
    z-index: 10000;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.chat-window.open {
    transform: scale(1);
    opacity: 1;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #001F3F 0%, #002856 100%);
    padding: 15px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

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

.chat-avatar {
    width: 40px;
    height: 40px;
    background: #FFD700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 0 5px rgba(255, 215, 0, 0.2); }
}

.chat-avatar i {
    font-size: 20px;
    color: #001F3F;
}

.chat-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header-text p {
    margin: 0;
    font-size: 11px;
    opacity: 0.8;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

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

.chat-close {
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

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

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    animation: slideInMessage 0.3s ease;
}

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

.message.bot {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot .message-content {
    background: white;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
    color: #1a1f36;
}

.message.user .message-content {
    background: linear-gradient(135deg, #001F3F 0%, #002856 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.6;
    text-align: right;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    border: 1px solid #e9ecef;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Quick Replies */
.quick-replies {
    padding: 12px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-reply-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    color: #001F3F;
}

.quick-reply-btn:hover {
    background: #FFD700;
    border-color: #FFD700;
    transform: translateY(-2px);
}

/* Chat Input */
.chat-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.chat-input:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #001F3F 0%, #002856 100%);
    border: none;
    border-radius: 50%;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.1);
    background: #FFD700;
    color: #001F3F;
}

.send-btn i {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: 20px;
        height: 500px;
    }
    
    .chat-button {
        width: 50px;
        height: 50px;
    }
    
    .chat-button i {
        font-size: 24px;
    }
}