const OBS_BROWSER_DEFAULT_CSS = "body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden; }";

function obsBrowserSourceCss(value) {
  const custom = String(value || "").trim();
  if (!custom) return OBS_BROWSER_DEFAULT_CSS;
  if (custom.includes(OBS_BROWSER_DEFAULT_CSS)) return custom.slice(0, 12000);
  return `${OBS_BROWSER_DEFAULT_CSS}\n\n${custom}`.slice(0, 12000);
}

module.exports = {
  OBS_BROWSER_DEFAULT_CSS,
  obsBrowserSourceCss
};
