/* CHATBOT STYLES */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(106, 13, 173, 0.4);
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 25px rgba(106, 13, 173, 0.6);
}

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

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

/* Chatbot Container */
.ccis-chatbot {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--light-purple);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ccis-chatbot.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.chatbot-title i {
    font-size: 1.3rem;
}

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

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

/* Chatbot Messages Container */
.chatbot-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Message Styles */
.chatbot-message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

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

.user-message {
    background: var(--primary-purple);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background: white;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-content {
    margin-bottom: 0.5rem;
}

/* Quick Questions */
.quick-questions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quick-question {
    background: var(--light-purple);
    color: var(--primary-purple);
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-question:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateX(5px);
}

/* Chatbot Input Area */
.chatbot-input {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chatbot-input input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--light-purple);
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1);
}

.chatbot-input button {
    background: var(--primary-purple);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-input button:hover {
    background: var(--secondary-purple);
    transform: scale(1.1);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 0.8rem 1rem;
    background: white;
    border-radius: 18px;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-purple);
    border-radius: 50%;
    opacity: 0.4;
    animation: typing 1.5s 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); }
    30% { transform: translateY(-5px); opacity: 1; }
}

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

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .ccis-chatbot {
        width: calc(100% - 60px);
        height: 70vh;
        bottom: 90px;
        right: 15px;
        left: 15px;
        margin: 0 auto;
    }
    
    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .ccis-chatbot {
        width: calc(100% - 30px);
        right: 15px;
        left: 15px;
    }
    
    .chatbot-toggle {
        bottom: 15px;
        right: 15px;
    }
}