/* ==========================================
   CLARA OFFLINE UI FIXES (FINAL)
   ========================================== */

/* 0. FIX CLICKABLE BUTTONS (Z-Index Issue) */
#clara-bg, canvas.particles-js-canvas-el {
    pointer-events: none !important; /* Passthrough clicks */
    z-index: 0 !important;
}

#clara-chat-log {
    position: relative;
    z-index: 10 !important; /* Ensure content is on top */
    /* ... existing styles ... */
    flex: 1; 
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* 2. EXPAND CHAT LOG TO FILL SPACE */
#clara-main-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background: #000; /* Ensure backend is black */
}

#clara-chat-log {
    flex: 1; /* Take all available space */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Start messages from bottom */
    padding: 2rem;
    overflow-y: auto;
    gap: 1rem; /* Space between messages */
    height: auto; /* Allow growth */
    max-height: 100%;
}

/* 3. MESSAGE STYLING */
.clara-message, .ai-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08); /* Subtle glass */
    border-left: 3px solid var(--accent);
    color: #eee;
    padding: 1rem 1.25rem;
    border-radius: 4px 12px 12px 4px;
    max-width: 80%;
    line-height: 1.5;
    animation: slideInLeft 0.3s ease;
}

.user-message {
    align-self: flex-end;
    background: var(--accent);
    color: #000;
    padding: 0.8rem 1.25rem;
    border-radius: 12px 12px 0 12px;
    max-width: 70%;
    font-weight: 600;
    animation: slideInRight 0.3s ease;
}

/* 4. CHOICE BUTTON CONTAINER (Supports V1 & V2) */
.clara-options-wrapper,
.clara-choices-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
    padding-bottom: 2rem; /* Add breathing room at bottom */
}

/* 5. CHOICE BUTTONS */
.clara-choice-btn-v2,
.clara-choice-btn {
    background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 3px solid var(--accent);
    color: #ccc;
    padding: 1rem 1.5rem;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    text-align: right;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    min-width: 250px;
}

.clara-choice-btn-v2:hover,
.clara-choice-btn:hover {
    transform: translateX(-8px);
    background: rgba(255, 183, 0, 0.05);
    border-color: var(--accent);
    color: #fff;
    box-shadow: -5px 0 15px rgba(255, 183, 0, 0.1);
}

/* 6. ANIMATIONS */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
