/*
 * AnalyticsGPT UI Simplification
 *
 * Hides UI elements that have no librechat.yaml or env-var config option.
 * Selectors derived from LibreChat v0.8.2 source code — verify after upgrades.
 *
 * Source files referenced:
 * - Fork.tsx: aria-label from com_ui_fork_open_menu = "Open Fork Menu"
 * - HoverButtons.tsx: id="edit-{messageId}", title from com_ui_edit = "Edit"
 * - Feedback.tsx: title from com_ui_feedback_positive / com_ui_feedback_negative
 */

/* ===== MESSAGE ACTION BUTTONS ===== */

/* Edit button — HoverButtons.tsx: id={`edit-${message.messageId}`} */
button[id^="edit-"] {
  display: none !important;
}

/* Fork button — Fork.tsx: aria-label={localize('com_ui_fork_open_menu')} = "Open Fork Menu" */
button[aria-label="Open Fork Menu"],
button[aria-label*="Fork Menu" i] {
  display: none !important;
}

/* Feedback (thumbs up/down) — Feedback.tsx:
 * title={localize('com_ui_feedback_positive')} and title={localize('com_ui_feedback_negative')} */
button[title*="feedback" i],
button[title*="Feedback" i] {
  display: none !important;
}

/* ===== ATTACH FILES BUTTON (BACKUP) ===== */
/* fileConfig.endpoints.custom.disabled: true should handle this,
 * but as safety net hide the attach/upload button near chat input. */
button[aria-label*="Attach" i],
button[aria-label*="Upload" i],
button[aria-label*="file" i],
button[title*="Attach" i],
button[title*="Upload" i] {
  display: none !important;
}

/* ===== TOOLS DROPDOWN BUTTON ===== */
/* No YAML config exists yet — see GitHub Discussion #9256.
 * This hides the tools popover trigger near the chat input. */
button[aria-label*="Tools" i] {
  display: none !important;
}

/* ===== FOOTER (BACKUP) ===== */
/* CUSTOM_FOOTER= env var should handle this, but as safety net: */
.absolute.bottom-0.left-0.right-0 {
  display: none !important;
}

/* ===== ARTIFACT: PREVIEW-ONLY MODE ===== */
/* Tab switching is handled by artifact-fix.js (MutationObserver).
 * CSS only hides the switcher UI — the JS handles forcing Preview. */

/* Hide Code/Preview tab switcher */
div[role="radiogroup"] {
  display: none !important;
}
