/* Chatbot Modal Styles */
.chatbot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chatbot-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.chatbot-container {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(131, 9, 213, 0.4);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.chatbot-overlay.active .chatbot-container {
    transform: scale(1);
}

.chatbot-header {
    background: linear-gradient(135deg, #8309D5, #09C1D5);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(131, 9, 213, 0.3);
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.chatbot-title i {
    font-size: 1.5rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% { 
        opacity: 0.8; 
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
}

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

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

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(15, 15, 30, 0.3);
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(15, 15, 30, 0.5);
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8309D5, #09C1D5);
    border-radius: 4px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: slideIn 0.3s ease;
}

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

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

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

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

.message.user .message-avatar {
    background: linear-gradient(135deg, #09C1D5, #8309D5);
    color: white;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #8309D5, #09C1D5);
    color: white;
    animation: bot-pulse 2s ease-in-out infinite;
}

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

.message-content {
    background: rgba(26, 26, 46, 0.8);
    padding: 15px 18px;
    border-radius: 18px;
    color: white;
    line-height: 1.5;
    font-size: 0.95rem;
    border: 1px solid rgba(131, 9, 213, 0.2);
    backdrop-filter: blur(10px);
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(131, 9, 213, 0.3), rgba(9, 193, 213, 0.3));
    border-color: rgba(9, 193, 213, 0.4);
}

.message.bot .message-content {
    background: rgba(26, 26, 46, 0.9);
    border-color: rgba(131, 9, 213, 0.3);
}

.chatbot-input-area {
    padding: 20px;
    background: rgba(26, 26, 46, 0.8);
    border-top: 2px solid rgba(131, 9, 213, 0.3);
}

.chatbot-input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    background: rgba(15, 15, 30, 0.8);
    border: 2px solid rgba(131, 9, 213, 0.4);
    border-radius: 12px;
    padding: 15px 18px;
    color: white;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    resize: none;
    min-height: 20px;
    max-height: 120px;
    transition: all 0.3s ease;
}

.chatbot-input:focus {
    outline: none;
    border-color: #8309D5;
    background: rgba(15, 15, 30, 0.9);
    box-shadow: 0 0 0 3px rgba(131, 9, 213, 0.2);
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chatbot-send {
    background: linear-gradient(135deg, #8309D5, #09C1D5);
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.chatbot-send:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(131, 9, 213, 0.4);
}

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

.chatbot-send.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 18px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    border: 1px solid rgba(131, 9, 213, 0.2);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #09C1D5;
    border-radius: 50%;
    animation: typing 1.4s ease-in-out 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.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.welcome-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin: 20px 0;
    padding: 20px;
    background: rgba(131, 9, 213, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(131, 9, 213, 0.2);
}

.suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.suggested-question {
    background: rgba(131, 9, 213, 0.2);
    border: 1px solid rgba(131, 9, 213, 0.4);
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggested-question:hover {
    background: rgba(131, 9, 213, 0.4);
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .chatbot-container {
        width: 95%;
        height: 90vh;
        border-radius: 15px;
    }
    
    .chatbot-header {
        padding: 15px;
    }
    
    .chatbot-title {
        font-size: 1.1rem;
    }
    
    .chatbot-messages {
        padding: 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .message-content {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .chatbot-input-area {
        padding: 15px;
    }
    
    .chatbot-input {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .chatbot-send {
        padding: 12px 16px;
        font-size: 1rem;
    }
}