/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 999;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 24px;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-close-icon {
    display: none;
}

.chat-widget.open .chat-open-icon {
    display: none;
}

.chat-widget.open .chat-close-icon {
    display: block;
}

.chat-toggle::after {
    content: '1';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark, #0a0a0f);
}

.chat-widget.open .chat-toggle::after {
    display: none;
}

.chat-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: #13131a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-widget.open .chat-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-info {
    flex: 1;
}

.chat-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.status-online {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-body {
    padding: 20px;
    min-height: 100px;
}

.chat-message.incoming .message-bubble {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 0 14px 14px 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.chat-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.chat-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.chat-platforms {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.chat-platforms span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.chat-platforms a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.chat-platforms a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

@media (max-width: 480px) {
    .chat-popup {
        width: 280px;
        right: -12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-toggle,
    .chat-popup,
    .chat-contact-btn,
    .dot {
        animation: none !important;
        transition: none !important;
    }
}
