
/* Comprehensive Lovable branding removal */
div[data-lovable-branding],
.lovable-branding,
[class*="lovable"]:not([class*="lovable-uploads"]),
[data-testid*="lovable"],
a[href*="lovable"],
div[style*="color: red"],
div[style*="color:#red"],
div[style*="color: #ff0000"],
div[style*="color:#ff0000"],
.text-red-500,
.text-red-600,
.text-red-700,
[class*="edit-by-lovable"],
[class*="powered-by-lovable"],
[title*="Edit with"],
[title*="Lovable"],
[aria-label*="Edit with"],
[aria-label*="Lovable"],
*[class*="edit-with"],
*[id*="lovable"],
*[id*="edit-with"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  z-index: -9999 !important;
}

/* Hide elements containing specific text patterns */
*:contains("Edit with"),
*:contains("Lovable"),
*:contains("edit with"),
*:contains("lovable"),
*:contains("Edit by Lovable"),
*:contains("edit by lovable") {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Target common button and link patterns */
button[title*="Edit"],
a[title*="Edit"],
button[aria-label*="Edit"],
a[aria-label*="Edit"],
[role="button"][title*="Edit"],
[role="link"][title*="Edit"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Hide elements with red color styling */
[style*="color: red" i],
[style*="color:#red" i],
[style*="color: #ff0000" i],
[style*="color:#ff0000" i] {
  display: none !important;
}

/* Additional fallback - hide any floating edit buttons and bottom positioned elements */
div[style*="position: fixed"],
div[style*="position: absolute"],
div[style*="bottom:"],
div[style*="bottom "],
*[style*="position: fixed; bottom:"],
*[style*="position: absolute; bottom:"] {
  display: none !important;
}

/* Hide any elements at the bottom of the page that might be branding */
body > div:last-child:not(#root),
body > *:last-child:not(#root):not(script) {
  display: none !important;
}

/* Target any iframe or embed that might contain branding */
iframe[src*="lovable"],
embed[src*="lovable"] {
  display: none !important;
}

/* Re-enable necessary elements */
#root,
#root *,
.automation-*,
#elevenlabs-widget-container,
#elevenlabs-widget-container *,
elevenlabs-convai {
  display: revert !important;
  visibility: revert !important;
  opacity: revert !important;
  position: revert !important;
}

/* Ensure our widget stays visible */
#elevenlabs-widget-container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
