/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--gradient-green);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.chatbot-toggle:hover::before {
    width: 100px;
    height: 100px;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(45, 80, 22, 0.5);
}

.chatbot-toggle svg {
    width: 32px;
    height: 32px;
    fill: white;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.chatbot-toggle:hover svg {
    transform: scale(1.1);
}

.chatbot-toggle.active svg {
    transform: rotate(180deg);
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(107, 142, 35, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chatbot Header */
.chatbot-header {
    background: var(--gradient-green);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 25px 25px 0 0;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chatbot-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.chatbot-info p {
    margin: 3px 0 0;
    font-size: 13px;
    opacity: 0.9;
}

/* Chat Messages */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(180deg, #FAF8F3 0%, #FFFFFF 100%);
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--light-green);
    border-radius: 10px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    flex-direction: row;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #8FBC3F 0%, #6B8E23 100%);
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
}

.message.bot .message-content {
    background: white;
    color: var(--text-dark);
    border: 1px solid rgba(107, 142, 35, 0.15);
    border-radius: 18px 18px 18px 4px;
}

.message.user .message-content {
    background: var(--gradient-green);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 0 20px;
}

.quick-reply {
    padding: 10px 16px;
    background: white;
    border: 2px solid var(--light-green);
    border-radius: 20px;
    color: var(--light-green);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-reply:hover {
    background: var(--light-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    border: 1px solid rgba(107, 142, 35, 0.15);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--light-green);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input */
.chatbot-input {
    padding: 20px;
    background: white;
    border-top: 1px solid rgba(107, 142, 35, 0.15);
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid rgba(107, 142, 35, 0.2);
    border-radius: 25px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    border-color: var(--light-green);
    box-shadow: 0 0 0 3px rgba(107, 142, 35, 0.1);
}

.chatbot-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-green);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
}

.chatbot-input button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }

    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        max-height: 600px;
    }

    .chatbot-toggle {
        width: 60px;
        height: 60px;
    }

    .chatbot-toggle svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .chatbot-window {
        bottom: 75px;
        width: calc(100vw - 30px);
        right: -5px;
    }
}