/**
 * Hides Tutor LMS's native "AI Studio" (OpenAI/ChatGPT) UI.
 *
 * Tutor LMS does not publish a stable list of class names for this
 * feature and the markup can change between versions, so this file
 * intentionally casts a wide net using attribute/substring selectors
 * rather than a handful of exact class names. If a native AI element on
 * your install isn't covered, add its selector to the list below —
 * everything here is additive and low-risk (hidden elements simply stop
 * taking up space; nothing else on the page is affected).
 *
 * The companion quiz-builder-gemini.js file also hides matching elements
 * at runtime via JS for anything dynamically rendered after these CSS
 * rules are parsed (e.g. inside a Vue-rendered modal).
 */

/* Generic: any element Tutor tags as AI/ChatGPT related. */
[class*="tutor-ai-"],
[class*="tutor-icon-ai"],
[class*="tutor-icon-magic-ai"],
[class*="tutor-icon-chatgpt"],
[class*="ai-studio"],
[class*="ai_studio"],
[id*="tutor-ai-"],
[id*="ai-studio"],
[data-tutor-modal-target*="ai" i],
[data-tutor-modal-target*="chatgpt" i],
[data-tutor-modal-target*="openai" i],
/* Confirmed, stable attribute used by the current React Quiz Builder's
 * native "Generate quiz using AI" button. Hiding it here too (in addition
 * to the JS-driven hide in quiz-builder-gemini.js) avoids a flash of the
 * native button before JS runs. */
button[data-generate-quiz-button="true"] {
	display: none !important;
}

/* Settings screens: hide the OpenAI/ChatGPT API key field block if Tutor
 * renders it as a labeled settings row with a recognizable wrapper. */
.tutor-option-field-row:has([name*="chatgpt" i]),
.tutor-option-field-row:has([name*="openai" i]),
.tutor-option-field-row:has([id*="chatgpt" i]),
.tutor-option-field-row:has([id*="openai" i]) {
	display: none !important;
}

/* Belt-and-braces: our own injected "Generate with Gemini" button should
 * never itself get caught by the generic [class*="tutor-ai-"] rule above. */
.taiqg-gemini-btn,
.taiqg-gemini-modal,
.taiqg-gemini-modal * {
	display: revert !important;
}
.taiqg-gemini-modal[hidden] {
	display: none !important;
}
