/* Chatbot Styles */
.chatbot-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: hsl(152, 65%, 35%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    background: hsl(152, 65%, 28%);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chatbot-button i {
    width: 28px;
    height: 28px;
}

.chatbot-button-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-button.badge::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: hsl(0, 84%, 60%);
    border-radius: 50%;
    border: 2px solid white;
}

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 2rem;
    width: 380px;
    max-width: calc(100vw - 4rem);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
}

.chatbot-window.open {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: hsl(152, 65%, 35%);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 1rem 1rem 0 0;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-header button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.chatbot-header button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: hsl(210, 25%, 96%);
}

.chatbot-message {
    display: flex;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chatbot-message.bot .chatbot-message-avatar {
    background: transparent;
    color: white;
    padding: 0;
}

.chatbot-bot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-message.user .chatbot-message-avatar {
    background: hsl(214, 85%, 45%);
    color: white;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
}

.chatbot-message.bot .chatbot-message-content {
    background: white;
    color: hsl(210, 20%, 15%);
    border-bottom-left-radius: 0.25rem;
}

.chatbot-message.user .chatbot-message-content {
    background: hsl(152, 65%, 35%);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chatbot-message-content p {
    margin: 0;
    line-height: 1.5;
}

.chatbot-message.loading .chatbot-message-content {
    background: white;
    padding: 0.75rem 1rem;
}

.chatbot-typing {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    background: hsl(210, 20%, 15%);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chatbot-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid hsl(210, 20%, 88%);
    display: flex;
    gap: 0.5rem;
}

.chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(210, 20%, 88%);
    border-radius: 1.5rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: hsl(152, 65%, 35%);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: hsl(152, 65%, 35%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send:hover:not(:disabled) {
    background: hsl(152, 65%, 28%);
    transform: scale(1.05);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-send i {
    width: 18px;
    height: 18px;
}

/* Mobile */
@media (max-width: 768px) {
    .chatbot-button {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
    }
    
    .chatbot-window {
        bottom: 80px;
        right: 1rem;
        left: 1rem;
        width: auto;
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
    }
}
