/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Jost', sans-serif;
}

.chatbot-bubble {
    width: 60px;
    height: 60px;
    background: #3554d1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(53, 84, 209, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-bubble:hover {
    transform: scale(1.1);
    background: #2a44a8;
}

.chatbot-bubble i {
    transition: transform 0.3s ease;
}

.chatbot-container.active .chatbot-bubble i {
    transform: rotate(90deg);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    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);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.chat-header {
    background: #3554d1;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.chat-header .info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header .info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8faff;
}

.msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

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

.msg.ai {
    background: white;
    color: #051036;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.msg.user {
    background: #3554d1;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.chat-option {
    background: white;
    border: 1px solid #3554d1;
    color: #3554d1;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-option:hover {
    background: #3554d1;
    color: white;
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input-area input:focus {
    border-color: #3554d1;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: #3554d1;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.chat-send-btn:hover {
    background: #2a44a8;
}

/* Scrollbar Style */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Admin live reply messages */
.msg.ai.admin-reply {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-left: 3px solid #16a34a;
}

.msg.ai.admin-reply .admin-status {
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    margin-bottom: 4px;
}

.msg.ai.admin-reply .message-content {
    color: #051036;
    font-size: 14px;
}

@media (max-width: 450px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: -10px;
        height: 60vh;
    }
}
