/* AI Chatbot Styles */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--dark-shade) 0%, var(--dark-accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(1, 94, 234, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    border: none;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(1, 94, 234, 0.6);
}

.chatbot-toggle i {
    font-size: 24px;
    color: white;
}

.chatbot-toggle.active {
    background: var(--main-brand-color);
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

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

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--dark-shade) 0%, var(--dark-accent) 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

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

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--dark-shade);
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

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

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

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

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

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

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

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

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

/* Message Bubbles */
.message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

.message.bot {
    align-items: flex-start;
}

.message.user {
    flex-direction: row-reverse;
    align-items: flex-end;
}

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

.message.bot .message-avatar {
    background: linear-gradient(135deg, var(--dark-shade) 0%, var(--dark-accent) 100%);
    color: white;
}

.message.user .message-avatar {
    background: var(--light-accent);
    color: white;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.message.bot .message-content {
    background: white;
    color: var(--main-brand-color);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.user .message-content {
    background: var(--dark-shade);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-radius: 15px;
    border-bottom-left-radius: 4px;
    max-width: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.typing-indicator.hidden {
    display: none;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--dark-shade);
    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 Actions */
.quick-actions {
    padding: 15px 20px 10px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-action {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--dark-shade);
    color: var(--dark-shade);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-action:hover {
    background: var(--dark-shade);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(1, 94, 234, 0.3);
}

/* Chatbot Input */
.chatbot-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    width: 100%;
    padding: 12px 60px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.char-counter {
    position: absolute;
    right: 16px;
    font-size: 0.75rem;
    color: #888;
    pointer-events: none;
    transition: color 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.chatbot-input:focus {
    border-color: var(--dark-shade);
    box-shadow: 0 0 0 3px rgba(1, 94, 234, 0.1);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    background: var(--dark-shade);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

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

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

.chatbot-send i {
    font-size: 16px;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.welcome-message i {
    font-size: 48px;
    color: var(--dark-shade);
    margin-bottom: 15px;
}

.welcome-message h4 {
    font-size: 1.2rem;
    color: var(--main-brand-color);
    margin-bottom: 10px;
}

.welcome-message p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Desktop - Larger Chatbot */
@media (min-width: 1024px) {
    .chatbot-container {
        width: 500px;
        height: 750px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 90px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        height: 500px;
        max-height: calc(100vh - 110px);
    }

    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .chatbot-toggle i {
        font-size: 22px;
    }

    .message-content {
        max-width: 80%;
        font-size: 0.9rem;
    }

    .quick-action {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Notification Badge */
.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

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