.chat-float-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 520px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 10001;
}

.chat-float-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #07C160 0%, #05a350 100%);
    flex-shrink: 0;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.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.25rem;
    color: #fff;
}

.chat-header-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
}

.chat-header-info p {
    margin: 2px 0 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.chat-header-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.chat-message {
    display: flex;
    gap: 8px;
    max-width: 85%;
    animation: chatMsgIn 0.3s ease;
}

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

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #fff;
}

.chat-message.bot .chat-message-avatar {
    background: #07C160;
}

.chat-message.user .chat-message-avatar {
    background: #333;
}

.chat-message-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-message.bot .chat-message-bubble {
    background: #0d0d0d;
    color: #e0e0e0;
    border-top-left-radius: 4px;
}

.chat-message.user .chat-message-bubble {
    background: #07C160;
    color: #fff;
    border-top-right-radius: 4px;
}

.chat-message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-message-time {
    font-size: 0.65rem;
    color: #666;
    text-align: center;
    padding: 2px 0;
}

.chat-message.bot .chat-message-time {
    text-align: left;
    padding-left: 4px;
}

.chat-message.user .chat-message-time {
    text-align: right;
    padding-right: 4px;
}

.chat-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
}

.chat-quick-btn {
    padding: 8px 14px;
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    color: #ccc;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-quick-btn:hover {
    background: rgba(7, 193, 96, 0.1);
    border-color: #07C160;
    color: #07C160;
}

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #2a2a2a;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
}

.chat-input:focus {
    border-color: #07C160;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: #07C160;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 1rem;
}

.chat-send-btn:hover {
    background: #06ad51;
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    background: #333;
    cursor: not-allowed;
    transform: none;
}

.chat-minimized-bar {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    padding: 10px 16px;
    background: #07C160;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.3);
    z-index: 10000;
    align-items: center;
    gap: 8px;
    animation: chatBarBounce 0.5s ease;
}

@keyframes chatBarBounce {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.chat-minimized-bar .unread-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: dotPulse 1.5s infinite;
}

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

.chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
}

.chat-typing-dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

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

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

@media (max-width: 768px) {
    .chat-float-window {
        width: 100%;
        height: 75vh;
        bottom: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .chat-float-window.active {
        transform: translateY(0);
    }

    .chat-minimized-bar {
        bottom: 80px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .chat-float-window {
        height: 85vh;
    }

    .chat-float-window {
        right: 0;
    }
}
