/* Main Container */
#cuet-ai-root {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: 'Segoe UI', sans-serif;
}

/* FAB Button (User's Design) */
#cuet-fab-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #052963;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    outline: none;
}

#cuet-fab-toggle:hover {
    transform: scale(1.05);
}

.cuet-chatbot-icon {
    position: relative;
    z-index: 2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cuet-chatbot-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.cuet-chatbot-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

/* Waves Animation */
.cuet-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(5, 41, 150, 0.4);
    top: 0;
    left: 0;
    z-index: 1;
    animation: cuetWave 2.5s infinite;
}

.wave2 {
    animation-delay: 1.2s;
}

@keyframes cuetWave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.8);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* Chat Window */
#cuet-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: scale(1);
}

#cuet-chat-window.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    display: none;
    /* simple toggle */
}

/* Header */
.cuet-chat-header {
    background: #052963;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cuet-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    margin-right: 5px;
}

#cuet-chat-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

/* Messages Area */
#cuet-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 100%;
    animation: fadeIn 0.3s ease;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message .message-content {
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.chat-message.bot .message-content {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 2px;
    border: 1px solid #e1e4e8;
}

.chat-message.user .message-content {
    background: #052963;
    color: #fff;
    border-bottom-right-radius: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing Animation */
.typing-indicator span {
    animation: blink 1.4s infinite both;
    font-size: 24px;
    line-height: 10px;
    margin: 0 1px;
    display: inline-block;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

/* Suggestions */
#cuet-chat-suggestions {
    padding: 10px 15px;
    white-space: nowrap;
    overflow-x: auto;
    background: #fff;
    border-top: 1px solid #eee;
}

.suggestion-chip {
    display: inline-block;
    background: #eef2f6;
    color: #052963;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid #dde1e5;
}

.suggestion-chip:hover {
    background: #dbe4ef;
}

/* Input Area */
.cuet-chat-input-area {
    padding: 10px 15px;
    background: #fff;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid #eee;
}

#cuet-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 20px;
    outline: none;
    background: #f9f9f9;
}

#cuet-chat-input:focus {
    border-color: #052963;
    background: #fff;
}

#cuet-chat-send {
    background: #052963;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cuet-chat-send:hover {
    background: #04204d;
}

.cuet-branding {
    text-align: center;
    font-size: 10px;
    color: #aaa;
    padding: 5px;
    background: #fff;
}

/* Mobile Responsive Styles */
@media (max-width: 480px) {
    #cuet-chat-window {
        width: 100vw;
        height: 100dvh;
        bottom: -20px;
        /* Offset parent padding */
        right: -20px;
        /* Offset parent padding */
        border-radius: 0;
        max-width: none;
        max-height: none;
        z-index: 100000;
    }

    #cuet-fab-toggle.hidden {
        display: none !important;
    }
}