/* Chatbot Container */
#ccb-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
}

/* Chatbot Button */
.ccb-chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: ccb-float 3s ease-in-out infinite;
}

.ccb-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.5);
}

.ccb-chatbot-button svg {
    width: 28px;
    height: 28px;
}

@keyframes ccb-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Chatbot Window */
.ccb-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ccb-chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

@media (max-width: 480px) {
    .ccb-chatbot-window {
        width: calc(100vw - 40px);
        right: -10px;
        bottom: 90px;
    }
}

/* Chat Header */
.ccb-chat-header {
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ccb-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ccb-college-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
}

.ccb-bot-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.ccb-bot-status {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ccb-bot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: ccb-pulse 2s infinite;
}

@keyframes ccb-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Chat Messages */
.ccb-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.ccb-chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.ccb-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Message Styles */
.ccb-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: ccb-message-slide 0.3s ease;
}

@keyframes ccb-message-slide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ccb-message-user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.ccb-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ccb-message-content {
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 18px;
    border-top-left-radius: 4px;
}

.ccb-message-user .ccb-message-content {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-top-left-radius: 18px;
    border-top-right-radius: 4px;
}

.ccb-message-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ccb-message-time {
    display: block;
    font-size: 0.75rem;
    margin-top: 6px;
    opacity: 0.7;
}

/* Typing Indicator */
.ccb-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.ccb-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    animation: ccb-typing 1.4s infinite;
}

.ccb-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.ccb-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ccb-typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Fallback Form */
.ccb-fallback-form {
    margin-top: 12px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.ccb-fallback-form h4 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    color: #1e293b;
}

.ccb-fallback-form input,
.ccb-fallback-form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.ccb-fallback-form textarea {
    min-height: 80px;
    resize: vertical;
}

.ccb-fallback-form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ccb-fallback-form button:hover {
    opacity: 0.9;
}

/* Chat Input */
.ccb-chat-input {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

#ccb-chat-form {
    display: flex;
    gap: 10px;
}

#ccb-chat-input-field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#ccb-chat-input-field:focus {
    border-color: #4f46e5;
}

#ccb-chat-form button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#ccb-chat-form button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

#ccb-chat-form button svg {
    width: 20px;
    height: 20px;
}
