/* ===== CHATBOT WIDGET ===== */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(13, 148, 136, 0.6);
}

.chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: rgba(15, 23, 42, 0.85); /* Deep Charcoal Glass */
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    pointer-events: none;
}

.chatbot-window.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.chatbot-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-status {
    width: 12px;
    height: 12px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
}

.bot-name {
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
    font-family: var(--font-display);
}

.chatbot-close {
    background: transparent;
    border: none;
    color: var(--gray-600);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.chatbot-close:hover {
    color: var(--white);
}

.chatbot-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    animation: messagePop 0.3s ease-out;
}

@keyframes messagePop {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.bot-message {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
}

.voice-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.voice-btn.recording {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    animation: pulse 1.5s infinite;
}

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

.chatbot-input-area input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 15px;
    outline: none;
}

.chatbot-input-area input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--light-blue);
    border: none;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.2s;
}

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

/* Mobile adjustments for chatbot */
@media (max-width: 768px) {
    .chatbot-window {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 85vh;
        border-radius: 24px 24px 0 0;
        transform-origin: bottom center;
        z-index: 99999;
    }
}
