.chatbot-container {
    position: fixed;
    bottom: 68px;
    right: 24px;
    z-index: 9999;
    font-family: var(--font-body);
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    cursor: var(--cursor-pointer);
    box-shadow: 0 4px 20px rgba(138, 154, 91, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(138, 154, 91, 0.4);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.chatbot-toggle .icon-close {
    position: absolute;
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.chatbot-container.open .chatbot-toggle .icon-chat {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.chatbot-container.open .chatbot-toggle .icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.chatbot-window {
    position: absolute;
    bottom: 124px;
    right: 0;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.chatbot-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-info svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.chatbot-header-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 2px 0;
    letter-spacing: 0.5px;
}

.chatbot-header-info .status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-header-info .status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: var(--cursor-pointer);
    transition: all 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chatbot-close svg {
    width: 20px;
    height: 20px;
    color: white;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--color-offwhite);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(138, 154, 91, 0.3);
    border-radius: 3px;
}

.chatbot-message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar svg {
    width: 18px;
    height: 18px;
    color: white;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

.chatbot-message.bot .message-content {
    background: white;
    color: var(--color-text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chatbot-message.user .message-content {
    background: var(--color-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid var(--color-border);
}

.chatbot-input-area input {
    flex: 1;
    border: 1.5px solid var(--color-border);
    border-radius: 24px;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.chatbot-input-area input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.1);
}

.chatbot-input-area button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    border: none;
    cursor: var(--cursor-pointer);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-input-area button:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

.chatbot-input-area button svg {
    width: 20px;
    height: 20px;
    color: white;
}

.chatbot-quick-actions {
    display: flex;
    gap: 8px;
    padding: 0 20px 16px;
    background: white;
    flex-wrap: wrap;
}

.quick-action {
    padding: 8px 14px;
    background: var(--color-sand-light);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 12px;
    cursor: var(--cursor-pointer);
    transition: all 0.2s;
    font-family: var(--font-body);
    color: var(--color-text);
}

.quick-action:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 60px;
        right: 16px;
    }
    
    .chatbot-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        max-height: 600px;
    }
    
    .chatbot-toggle {
        width: 56px;
        height: 56px;
    }
    
    .chatbot-toggle svg {
        width: 26px;
        height: 26px;
    }
}
