.floating-chat-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.floating-chat-btn:hover {
    transform: scale(1.05);
}

.floating-chat-btn i {
    color: white;
    font-size: 24px;
}

.chat-tooltip {
    position: absolute;
    right: 70px;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chat-container {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.chat-container.active {
    display: flex;
    animation: slideIn 0.3s ease forwards;
}

.chat-header {
    padding: 1rem;
    background: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-close {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.chat-close:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.user {
    background: #e6f2ff;
    align-self: flex-end;
    margin-left: 20%;
}

.message.bot {
    background: #f5f5f5;
    align-self: flex-start;
    margin-right: 20%;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.chat-input button {
    padding: 0.8rem 1.2rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.chat-input button:hover {
    background: #0052a3;
}

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

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

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .chat-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        z-index: 1001; /* Ensure it's above the floating button */
    }

    .chat-messages {
        padding: 1rem;
    }

    .floating-chat-btn {
        bottom: 1rem;
        right: 1rem;
    }

    /* Hide tooltip on mobile */
    .chat-tooltip {
        display: none;
    }

    /* Hide button when chat is open */
    .chat-container[style*="display: flex"] ~ .floating-chat-btn,
    .chat-container[style*="display: flex"] ~ .floating-chat-btn .chat-tooltip {
        display: none !important;
    }
}
