/* Chat Component */
.floating-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--z-dropdown);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--azure-blue-700) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-medium);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px var(--shadow-medium);
}

.chat-icon, .chat-close {
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.chat-close {
    font-size: 1.8rem;
    font-weight: bold;
}

.chat-widget {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.chat-widget.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-header {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--azure-blue-700) 100%);
    color: white;
    padding: var(--spacing-md);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.chat-info {
    flex: 1;
}

.chat-name {
    font-weight: 600;
    font-size: var(--font-size-base);
    display: block;
}

.chat-status {
    background: #28a745;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.25rem;
}

.chat-message {
    padding: var(--spacing-md);
}

.chat-message p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
    font-size: 0.9rem;
}

.chat-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-btn {
    display: inline-block;
    padding: 0.6rem var(--spacing-md);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
    font-size: 0.85rem;
}

.chat-btn-primary {
    background: var(--accent-primary);
    color: white;
}

.chat-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.chat-btn-secondary {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.chat-btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
}

/* Chat CTA Popup Styles */
.chat-cta-popup {
    position: absolute;
    bottom: 20px;
    right: 80px;
    z-index: var(--z-popover);
    animation: slideInFromLeft 0.5s ease-out;
}

.popup-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: var(--spacing-md) 1.5rem;
    box-shadow: 0 8px 25px var(--shadow-medium);
    border: 1px solid var(--border-color);
    position: relative;
    max-width: 280px;
    min-width: 250px;
    text-align: center;
}

.popup-arrow {
    position: absolute;
    bottom: 20px;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid var(--bg-secondary);
}

.popup-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive chat */
@media screen and (max-width: 768px) {
    .chat-cta-popup {
        bottom: 15px;
        right: 75px;
        max-width: 180px;
        min-width: 160px;
    }

    .popup-content {
        padding: 0.6rem 0.8rem;
        max-width: 180px;
        min-width: 160px;
    }

    .popup-text {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .chat-bubble {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .chat-cta-popup {
        bottom: 10px;
        right: 70px;
        max-width: 160px;
        min-width: 140px;
    }

    .popup-content {
        padding: 0.5rem 0.7rem;
        max-width: 160px;
        min-width: 140px;
    }

    .popup-text {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    .chat-actions {
        justify-content: center;
    }

    .chat-btn {
        min-width: 120px;
    }
}

