/* ============================================
   CHATBOT STYLES - Modern & Professional
   ============================================ */

.chatbot-toggle {
    position: fixed;
    bottom: 2rem;
    right: 8rem;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    color: var(--bg-white);
    border: 3px solid var(--accent-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.chatbot-toggle::after {
    content: 'DDM+';
    position: absolute;
    bottom: -28px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: rgba(14, 165, 233, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chatbot-toggle:hover::after {
    opacity: 1;
}

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

.chatbot-toggle:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 30px rgba(66, 153, 225, 0.6);
}

.chatbot-toggle.hidden {
    display: none;
}

.chatbot-widget {
    position: fixed;
    bottom: 90px;
    right: 2rem;
    width: 420px;
    height: 650px;
    background: var(--bg-white);
    border-radius: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 999;
    border: 1px solid var(--border-color);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.chatbot-widget.hidden {
    display: none;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: var(--bg-white);
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
}

.chatbot-header-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--bg-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

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

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: var(--bg-white);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-light) transparent;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--accent-light);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.chatbot-message {
    display: flex;
    animation: messageSlide 0.3s ease;
}

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

.chatbot-message p {
    margin: 0;
    padding: 0.9rem 1.1rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    max-width: 85%;
}

.user-message {
    justify-content: flex-end;
}

.user-message p {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: var(--bg-white);
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.2);
}

.bot-message {
    justify-content: flex-start;
}

.bot-message p {
    background: var(--bg-light);
    color: var(--primary-color);
    border-bottom-left-radius: 0.25rem;
    border: 1px solid var(--border-color);
}

.bot-message.welcome p {
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(14, 165, 233, 0.1) 100%);
    border: 2px solid var(--accent-color);
    color: var(--primary-color);
    font-weight: 500;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.9rem 1.1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-light);
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

.chatbot-input-area {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem;
    border-top: 2px solid var(--border-color);
    background: var(--bg-white);
}

.chatbot-input {
    flex: 1;
    border: 1.5px solid var(--border-color);
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-light);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-light);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.chatbot-input::placeholder {
    color: var(--text-light);
}

.chatbot-send {
    background: var(--accent-color);
    color: var(--bg-white);
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-send:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

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

/* Suggestion Pills */
.chatbot-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0 1.5rem;
}

.suggestion-btn {
    background: transparent;
    border: 1.5px solid var(--accent-light);
    color: var(--accent-color);
    padding: 0.65rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.suggestion-btn:hover {
    background: var(--accent-light);
    color: var(--bg-white);
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        width: calc(100vw - 2rem);
        height: 550px;
        bottom: 80px;
        right: 1rem;
    }

    .chatbot-message p {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        width: calc(100vw - 1rem);
        height: 500px;
        bottom: 70px;
        right: 0.5rem;
    }

    .chatbot-toggle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        bottom: 1.5rem;
        right: 1rem;
    }

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

    .chatbot-message p {
        font-size: 0.9rem;
        padding: 0.8rem 0.9rem;
    }
}

/* Mobile responsive chatbot button */
@media (max-width: 768px) {
    .chatbot-toggle {
        width: 60px;
        height: 60px;
        bottom: 1.5rem;
        right: 6.5rem; /* Adjusted to not overlap WhatsApp */
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 5.5rem; /* Adjusted for smaller screen */
        font-size: 1.2rem;
    }
}

