/* AI Chatbot Widget Styles - Modern Design */

/* Floating button - bottom right - NEW DESIGN */
.chatbot-toggle {
    position: fixed !important;
    bottom: 90px !important;
    right: 30px !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important;
    background: #10b981 !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25) !important;
    z-index: 9998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: white !important;
    font-size: 22px !important;
}

.chatbot-toggle:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35);
    background: #059669;
}

.chatbot-toggle.active {
    background: #047857;
    transform: rotate(45deg);
}

.chatbot-toggle.active:hover {
    background: #065f46;
}

/* Chat widget container */
.chatbot-widget {
    position: fixed;
    bottom: 162px;
    right: 30px;
    width: 420px;
    max-width: calc(100vw - 48px);
    height: 680px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.chatbot-widget.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chat header */
.chatbot-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: none;
    position: relative;
}

.chatbot-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header h3::before {
    content: '💬';
    font-size: 20px;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 300;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Messages container */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fafbfc;
}

/* Scrollbar styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Message bubbles */
.chatbot-message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    animation: fadeIn 0.4s ease;
}

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

.chatbot-message.user {
    align-self: flex-end;
    align-items: flex-end;
}

.chatbot-message.ai {
    align-self: flex-start;
    align-items: flex-start;
}

.chatbot-message-content {
    padding: 16px 20px;
    border-radius: 20px;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 15px;
    font-weight: 400;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chatbot-message.user .chatbot-message-content {
    background: #10b981;
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.chatbot-message.ai .chatbot-message-content {
    background: #ffffff;
    color: #111827;
    border-bottom-left-radius: 6px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.chatbot-message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
    padding: 0 8px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Typing indicator */
.chatbot-typing {
    display: flex;
    gap: 6px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 20px;
    border-bottom-left-radius: 6px;
    max-width: 80px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    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.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input area */
.chatbot-input-area {
    padding: 20px 24px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
    background: #f9fafb;
    color: #111827;
    font-weight: 400;
}

.chatbot-input:focus {
    border-color: #10b981;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

.chatbot-input::placeholder {
    color: #9ca3af;
}

.chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: #10b981;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.chatbot-send:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.chatbot-send:active:not(:disabled) {
    transform: translateY(0);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chatbot-send svg {
    width: 18px;
    height: 18px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .chatbot-widget {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 154px;
        height: calc(100vh - 120px);
        border-radius: 20px;
    }

    .chatbot-toggle {
        bottom: 82px;
        right: 20px;
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .chatbot-message {
        max-width: 82%;
    }

    .chatbot-header {
        padding: 18px 20px;
    }

    .chatbot-messages {
        padding: 20px;
    }

    .chatbot-input-area {
        padding: 16px 20px;
    }
}

/* Error message styling */
.chatbot-message.error .chatbot-message-content {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

