﻿/* Chatbot Styles */
.chatbot-container {
    
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-teal));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse 2s infinite;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 107, 53, 0.8);
    }
}

.chatbot-button.open {
    background: var(--secondary-blue);
}

.chatbot-window {
    
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

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

.chatbot-window.open {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--secondary-blue), var(--accent-teal));
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 2.0rem;
}

.chatbot-header-text p {
    margin: 0;
    font-size: 1.5rem;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--light-bg);
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.8rem;
    animation: fadeIn 0.3s ease-out;
}

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

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-message.bot .message-avatar {
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-teal));
    color: var(--white);
}

.chat-message.user .message-avatar {
    background: var(--secondary-blue);
    color: var(--white);
}

.message-content {
    max-width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 15px;
    line-height: 1.5;
   /* word-wrap: break-word;*/
}

.chat-message.bot .message-content {
    background: var(--white);
    color: var(--dark-text);
    border-bottom-left-radius: 5px;
}

.chat-message.user .message-content {
    background: var(--primary-orange);
    color: var(--white);
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.3rem;
}

.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 1rem 1.2rem;
    background: var(--white);
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-orange);
    border-radius: 50%;
    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% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.quick-reply-btn {
    background: var(--light-bg);
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-reply-btn:hover {
    background: var(--primary-orange);
    color: var(--white);
}

.chatbot-input-area {
    padding: 1rem 1.5rem;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    padding: 0.8rem 1.2rem;
    font-size: 2.0rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    border-color: var(--primary-orange);
}

.chatbot-send {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-teal));
    border: none;
    color: var(--white);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.chatbot-send:hover:not(:disabled) {
    transform: scale(1.1);
}

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

.welcome-message {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--light-text);
}

.welcome-message h4 {
    color: var(--secondary-blue);
    margin-bottom: 0.5rem;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: var(--light-bg);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 10px;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .chatbot-window {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    .chatbot-button {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }

    .message-content {
        max-width: 100%;
    }
}

/* Error message styling */
.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    font-style: italic;
}
