/* ============================================
   EAST BLUE GYM — NEURAL AI ASSISTANT HUD
   ============================================ */

.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    font-family: 'Barlow', sans-serif;
}

.chatbot-bubble {
    width: 65px;
    height: 65px;
    background: var(--yellow);
    border-radius: 20px; /* Squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(245, 230, 66, 0.4);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    overflow: hidden;
}

.chatbot-bubble::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.chatbot-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(245, 230, 66, 0.6);
}

.chatbot-bubble:hover::after { opacity: 0.2; }

.chatbot-bubble svg {
    width: 30px;
    height: 30px;
    fill: #000;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Pulse Animation */
.neural-pulse {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 20px;
    border: 2px solid var(--yellow);
    animation: neural-pulse 2s infinite;
    pointer-events: none;
}

@keyframes neural-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 400px;
    height: 600px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

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

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

.chatbot-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    color: var(--yellow);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.close-chat {
    cursor: pointer;
    font-size: 24px;
    color: #444;
    transition: all 0.3s;
}

.close-chat:hover { color: #fff; transform: rotate(90deg); }

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

.message {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    animation: msg-slide 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

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

.message.user {
    align-self: flex-end;
    background: var(--yellow);
    color: #000;
    font-weight: 700;
    border-bottom-right-radius: 4px;
}

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

/* Quick Replies */
.quick-replies {
    padding: 0 30px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.reply-chip {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reply-chip:hover {
    background: var(--yellow);
    color: #000;
    border-color: var(--yellow);
    transform: translateY(-2px);
}

/* Chat Input */
.chatbot-input {
    padding: 20px 30px 30px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
}

.chatbot-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 14px 20px;
    color: #fff;
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
}

.chatbot-input input:focus {
    border-color: var(--yellow);
    background: rgba(0, 0, 0, 0.5);
}

.chatbot-input button {
    background: var(--yellow);
    border: none;
    border-radius: 15px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.chatbot-input button:hover {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: 0 5px 15px rgba(245, 230, 66, 0.3);
}

.chatbot-input button svg {
    width: 20px;
    height: 20px;
    fill: #000;
}

.typing {
    font-size: 10px;
    color: var(--yellow);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 30px 10px;
    display: none;
}

@media (max-width: 500px) {
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    .chatbot-window {
        width: calc(100vw - 40px);
        height: 60vh;
        bottom: 80px;
        right: 0;
    }
    .chatbot-header {
        padding: 15px 20px;
    }
    .chatbot-messages {
        padding: 20px;
    }
    .close-chat {
        font-size: 32px; /* Larger for mobile tap */
        padding: 5px;
    }
}

body.support-is-open .chatbot-container {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
