/* ========================================
   Live Chat Widget - Modern Design
   ======================================== */
.live-chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;
}

/* RTL Support */
html[dir="rtl"] .live-chat-widget {
    right: auto;
    left: 30px;
}

/* Chat Button */
.chat-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #1EBE57 100%);
    border: none;
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 1.75rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
    animation: pulse 2s infinite;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

.chat-icon {
    transition: transform 0.3s ease;
}

.chat-button:hover .chat-icon {
    transform: scale(1.1);
}

/* Chat Badge */
.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #FF3B30;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid #FFFFFF;
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
}

/* RTL Support */
html[dir="rtl"] .chat-window {
    right: auto;
    left: 0;
}

.chat-window.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #25D366 0%, #1EBE57 100%);
    padding: 1.25rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    background: #FFFFFF;
    border-radius: 50%;
    padding: 8px;
    flex-shrink: 0;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #34C759;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
}

.chat-header-text h4 {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.status-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    margin: 0;
}

.close-chat-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chat Body */
.chat-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.chat-welcome {
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFD500 0%, #FFC400 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.welcome-icon i {
    color: #000;
    font-size: 1.75rem;
}

.chat-welcome h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 0.5rem;
}

.chat-welcome p {
    color: #6B7280;
    font-size: 0.9375rem;
    margin: 0;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    color: #1A1A1A;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: #FFFFFF;
    border-color: #25D366;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.quick-action-btn i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #25D366 0%, #1EBE57 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.quick-action-btn span {
    font-weight: 600;
    font-size: 0.9375rem;
}

/* Chat Footer */
.chat-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E5E7EB;
}

.chat-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #25D366 0%, #1EBE57 100%);
    color: #FFFFFF;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.chat-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    color: #FFFFFF;
}

/* Responsive */
@media (max-width: 576px) {
    .live-chat-widget {
        bottom: 80px;
        right: 20px;
    }

    html[dir="rtl"] .live-chat-widget {
        right: auto;
        left: 20px;
    }

    .chat-button {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }

    .chat-window {
        width: calc(100vw - 40px);
        max-width: 360px;
    }

    .chat-body {
        max-height: 300px;
    }
}