/* ===================================
   Vibea Premium Chatbot
   Theme: Dark Glassmorphism
   Author: SiteSmith Studio
   =================================== */

/* === Floating Trigger === */
.vibea-chat-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(15, 15, 20, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.trigger-icon-layer {
    font-size: 1.5rem;
    color: #fff;
    z-index: 2;
    transition: transform 0.4s ease;
}

.trigger-icon-layer i {
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
}

.trigger-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.4), transparent 70%);
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.vibea-chat-trigger:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(15, 15, 20, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 0 2px rgba(139, 92, 246, 0.2);
}

.vibea-chat-trigger:hover .trigger-glow {
    opacity: 1;
    animation: pulseGlow 2s infinite;
}

.vibea-chat-trigger:hover .trigger-icon-layer {
    transform: rotate(15deg) scale(1.1);
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.4;
    }
}

/* === Main Chat Container === */
.vibea-chatbot-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: rgba(18, 18, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;

    /* Animation States */
    transform-origin: bottom right;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.vibea-chatbot-container.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.vibea-chat-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vibea-chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vibea-avatar-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.vibea-meta {
    display: flex;
    flex-direction: column;
}

.vibea-name {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.vibea-status {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vibea-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.vibea-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.vibea-close-btn:hover {
    color: white;
}

/* Body */
.vibea-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: transparent;
}

.vibea-messages-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Message Bubbles */
.vibea-message {
    max-width: 85%;
    animation: fadeUp 0.3s ease-out;
}

.vibea-msg-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
}

/* Bot Message */
.vibea-message.bot .vibea-msg-content {
    background: rgba(255, 255, 255, 0.05);
    /* Slight white for bot */
    color: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 4px;
    /* Distinct shape */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* User Message */
.vibea-message.user {
    align-self: flex-end;
}

.vibea-message.user .vibea-msg-content {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Area */
.vibea-input-wrapper {
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 10px;
    align-items: center;
}

.vibea-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.vibea-chat-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
}

.vibea-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.vibea-send-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.3);
}

/* === Mobile Response === */
@media (max-width: 480px) {
    .vibea-chatbot-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        background: #0f0f13;
        /* Solid background for performance/readability on mobile */
    }

    .vibea-chat-trigger {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
    }
}