/* Convocare AI Chatbot Styles */
:root {
    --chat-primary: #20B2AA;
    --chat-secondary: #40E0D0;
    --chat-bg: rgba(255, 255, 255, 0.95);
    --chat-text: #2C3E50;
    --chat-text-muted: #5D6D7E;
    --chat-bubble-user: linear-gradient(135deg, #20B2AA, #40E0D0);
    --chat-bubble-ai: #F8F9FA;
    --chat-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'DM Sans', sans-serif;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.4);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
}

.chatbot-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(32, 178, 170, 0.6);
}

.chatbot-button svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--chat-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.chatbot-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
}

.chatbot-header-info p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--chat-primary) transparent;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--chat-primary);
    border-radius: 10px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: messageIn 0.3s ease forwards;
}

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

.message-ai {
    align-self: flex-start;
    background: var(--chat-bubble-ai);
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
}

.message-user {
    align-self: flex-end;
    background: var(--chat-bubble-user);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    background: white;
}

.chatbot-input-area input {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 18px;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input-area input:focus {
    border-color: var(--chat-primary);
}

.chatbot-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--chat-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--chat-bubble-ai);
    border-radius: 18px;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--chat-text-muted);
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

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