.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4AA7B5;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
}

.chat-button:hover {
    transform: scale(1.1);
    background: #3d8a96;
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.chat-window.hidden {
    display: none;
}

.chat-header {
    padding: 15px 20px;
    background: #4AA7B5;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header .close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.message.user {
    background: #E3F2FD;
    color: #1B3B41;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message.ai {
    background: #F5F5F5;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

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

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input input:focus {
    border-color: #4AA7B5;
}

.chat-input button {
    background: #4AA7B5;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat-input button:hover {
    background: #3d8a96;
}

.chat-input button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
    background: #F5F5F5;
    border-radius: 15px;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

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

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

/* Mobile Chat Styles */
@media (max-width: 768px) {
    .chat-button {
        width: 56px;
        height: 56px;
        bottom: 16px;
        right: 16px;
        font-size: 22px;
    }

    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        transform: translateY(100%);
    }

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

    .chat-header {
        padding: 1rem 1.25rem;
        border-radius: 0;
        position: sticky;
        top: 0;
        z-index: 1;
    }

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

    .chat-messages {
        padding: 1rem;
        padding-bottom: 80px; /* Space for input area */
    }

    .message {
        max-width: 85%;
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .message.user {
        border-bottom-right-radius: 8px;
    }

    .message.bot {
        border-bottom-left-radius: 8px;
    }

    .chat-input {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem;
        background: white;
        border-top: 1px solid #e2e8f0;
        display: flex;
        gap: 0.75rem;
        align-items: center;
    }

    .chat-input input {
        flex: 1;
        padding: 0.875rem 1rem;
        border: 1.5px solid #e2e8f0;
        border-radius: 24px;
        font-size: 0.95rem;
        background: #f8fafc;
    }

    .chat-input input:focus {
        outline: none;
        border-color: #4AA7B5;
        background: white;
    }

    .chat-input button {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #4AA7B5;
        color: white;
        border: none;
        font-size: 1.25rem;
        transition: all 0.2s ease;
    }

    .chat-input button:hover {
        background: #3d8a96;
        transform: scale(1.05);
    }

    .chat-input button:active {
        transform: scale(0.95);
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .chat-button {
        width: 52px;
        height: 52px;
        bottom: 12px;
        right: 12px;
        font-size: 20px;
    }

    .chat-header {
        padding: 0.875rem 1rem;
    }

    .chat-header h3 {
        font-size: 1rem;
    }

    .chat-messages {
        padding: 0.875rem;
        padding-bottom: 70px;
    }

    .message {
        max-width: 90%;
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .chat-input {
        padding: 0.875rem;
    }

    .chat-input input {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .chat-input button {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
} 