/* ==UserStyle==
@name           Venice optimized & customizable for wide screens
@description    Venice website interface is reworked to offer a cleaner and comfortable experience on desktop, with visual adjustments that adapt to your needs.
@version        1.0.4
@author         BreatFR (https://breat.fr)
@namespace      https://breat.fr
@homepageURL    https://usercssjs.breat.fr/v/venice
@updateURL      https://code.breat.fr/v/venice/css/pc.user.css
@supportURL     https://discord.gg/W7FKesJ9aG
@license        AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
@preprocessor	stylus

@var 	text       	separator1              "🌐 WHOLE WEBSITE 🌐"							"_"
@var	text        fontsize    			"Custom font size"								1.2rem
@var	checkbox	hidecrypto				"Hide crypto dashboard"							1
@var 	checkbox   	hidescrollbars			"Hide scrollbars"   							1
@var	checkbox	hideotherchattype		"Hide other chat type"							1
@var	checkbox	hidesupportbot			"Hide support bot"								1
@var    checkbox    widemode    			"Wide mode"         							1

@var 	text       	separator2              "👨 CHARACTER CHAT 👩"							"_"
@var	select		customavatar			"Avatar styles"									{
	"Default": "default",
	"Custom bubble": "bubble",
	"Custom only one": "onlyone",
	"Custom only one full": "onlyonefull"
}
@var	text		customavatarposition	"Custom avatar position (only one style)"		50%
@var	text		customavatarsize		"Custom avatar size (bubble/only one styles)"	512px
@var	text		customavatarurl			"Custom avatar URL"								"URL between quotes"
@var	checkbox	blurcontent				"Blur content"									0
@var	color		aibgcolor				"Bubble background color"						#06090d
@var	color		userbgcolor				"Bubble background color for us"				#ffffff0a
@var	color		fontcolor				"Font color"									rgb(203, 203, 203)
@var	color		namescolor				"Font color in bold"							rgb(146, 136, 126)
@var	color		actionscolor			"Font color in bold + italic"					rgb(126, 136, 146)
@var	color		thoughtscolor			"Font color in italic"							rgb(136, 136, 136)
@var 	checkbox   	hidename				"Hide name (enabled in avatar bubble mode)"		1
@var	checkbox	mediagrid				"Media grid view in chat"						1

==/UserStyle== */

/* === Credits ===
Website         https://breat.fr
Bluesky			https://bsky.app/profile/breatfroff.bsky.social
facebook        https://www.facebook.com/breatfroff
mastodon        https://mastodon.social/@breat_fr
telegram        https://t.me/breatfr
vk              https://vk.com/breatfroff
X (twitter)     https://x.com/breatfroff
=== Credits === */

/* ==Support==
brave Creators  https://publishers.basicattentiontoken.org/c/breatfr
Buy me a coffee https://buymeacoffee.com/breatfr
ko-fi           https://ko-fi.com/breatfr
PayPal          https://paypal.me/breat
==/Support== */

@-moz-document domain("venice.ai") {
/* ================================
	Venice
================================ */
	/* Version */
	:root {
		--themeversion: 'Theme v1.0.4 by BreatFR (https://breat.fr)';
        --install: ' usercssjs.breat.fr/v/venice';
		--help: ' discord.gg/W7FKesJ9aG';
        --support1: ' ko-fi.com/breatfr ';
        --support2: ' paypal.me/breat';
		--customavatarposition: customavatarposition;
		--customavatarpositioninvert: calc(-1 * var(--customavatarposition));
		--fontsize: fontsize;
		--fontsize-final: var(--fontsize);
		--anim-glow-v2: glow-pulse 1.8s ease-in-out infinite;
		--box-shadow-v2: 0 0 10px 2px rgba(144, 205, 244, 0.5),
						 0 0 20px 4px rgba(144, 205, 244, 0.2);

		@media (min-width: 3000px) {
			--fontsize-final: calc(var(--fontsize) + .3rem);
		}
	}

	@keyframes glow-pulse {
		0%,
		100% {
			filter: brightness(1);
		}
		50% {
			filter: brightness(1.4);
		}
	}

    @media (min-width: 900px) {
		.chakra-modal__content:not(:has(.chakra-input)):has(> div > div:nth-of-type(2):last-of-type) .dialog-header-safe-area {
			padding-top: 60px !important;
		}
		.chakra-modal__content:not(:has(.chakra-input)):has(> div > div:nth-of-type(2):last-of-type)::after,
		.chakra-modal__content:not(:has(.chakra-input)):has(> div > div:nth-of-type(2):last-of-type)::before {
            background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
            background-clip: text;
            color: transparent;
			display: block;
            font-family: inherit;
            font-size: 1.2rem;
			line-height: calc(60px / 2);
            pointer-events: none;
            position: absolute;
            text-align: center;
			top: 0;
            width: auto;
			white-space: pre-line;
			z-index: 9999;
		}
		.chakra-modal__content:not(:has(.chakra-input)):has(> div > div:nth-of-type(2):last-of-type)::after {
			content: var(--themeversion) '\A Help: ' url("https://code.breat.fr/share/images/icons/discord.png") var(--help);
			left: 20%;
		}
		.chakra-modal__content:not(:has(.chakra-input)):has(> div > div:nth-of-type(2):last-of-type)::before {
			content: 'Install: ' url("https://code.breat.fr/share/images/icons/breat.fr.png") var(--install) '\ASupport me: ' url("https://code.breat.fr/share/images/icons/ko-fi.png") var(--support1) url("https://code.breat.fr/share/images/icons/paypal.png") var(--support2);
			right: 10%;
		}
	}

	/* Custom font size */
	[data-message-content],
 	textarea {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}

	.codeblock {
		overflow: visible;
	}
	.code-block-header {
		background: #101010;
		position: sticky;
		top: 0;
	}

	/* Delete a chat */
	[data-testid="virtuoso-item-list"] div > button:last-of-type,
	.chakra-collapse:not([href="/character-chat"] ~ .chakra-collapse) > div > div:nth-of-type(2) > div > button:last-of-type {
		color: var(--chakra-colors-text-error);
	}

	/* update character */
	.chakra-modal__content:has(> div > form) {
		height: 90vh;
		overflow: hidden visible;
		margin: 5vh auto;
		max-width: none;
		width: 90vw;
	}
	.chakra-modal__content:has(> div > form) form {
		height: 100% !important;
	}
	.chakra-modal__content:has(> div > form) form * {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}
	.chakra-modal__content:has(> div > form) form > div > div:nth-of-type(1) {
		min-width: 11em;
	}
	.chakra-modal__content:has(> div > form) .chakra-modal__footer {
		bottom: 7%;
		padding: 0 0 0 .5rem;
		position: fixed;
	}
	.chakra-modal__content:has(> div > form) textarea {
		height: 50vh !important;
	}

	/* settings modal */
	.chakra-modal__content:not(:has(button.chakra-input)):has(> div > div:nth-of-type(2):last-of-type) {
		height: 90vh;
		overflow: hidden visible;
		margin: 5vh auto;
		max-width: none;
		width: 90vw;
	}
	.chakra-modal__content:has(> div > div:nth-of-type(2):last-of-type) * {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}
	.chakra-modal__content:has(> div > div:nth-of-type(2):last-of-type) > div > div:nth-of-type(1) {
		max-width: unset;
	}
	.chakra-modal__content:has(> div > div:nth-of-type(2):last-of-type) > div {
		height: 100%;
		max-height: 100%;
	}
	.chakra-modal__content:has(> div > div:nth-of-type(2):last-of-type) > div > div:nth-of-type(2) > div:nth-of-type(2) {
		max-width: 100%;
	}
	/* popover when we click on our name in menu */
	div[data-popper-placement="top"]:has(> div > div > hr:nth-of-type(4):last-of-type) * {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}
	/* Remove background under our avatar in menu and his popover and in settings modal */
	button[aria-haspopup="menu"] .chakra-avatar,
 	div[data-popper-placement="top"]:has(> div > div > hr:nth-of-type(4):last-of-type) .chakra-avatar,
 	.chakra-modal__content:has(> div > div:nth-of-type(2):last-of-type) .chakra-avatar {
		background: transparent !important;
	}

	if blurcontent {
		[data-testid="text-chat-message"] *,
 		[data-testid="user-message"] * {
			color: transparent !important;
		}
		[data-testid="text-chat-message"] > div,
 		[data-testid="user-message"] > div {
			position: relative;
		}
		[data-testid="text-chat-message"] > div::before,
 		[data-testid="user-message"] > div::before {
			color: var(--chakra-colors-text-base) !important;
			content: "Hidden Text";
			font-family: var(--chakra-fonts-body);
			font-size: 2em;
			left: 50%;
			position: absolute;
			top: 50%;
			text-align: center;
			transform: translate(-50%, -50%);
        }
	}

	if hidecrypto {
		[href="/token"] {
			display: none;
		}
	}

	if hideotherchattype {
		.chat-header,
		.minds-chat-container > div:has([href="/chat/classic"]) {
			display: none;
		}
	}

	if hidescrollbars {
		*,
 		:root {
        	scrollbar-width: none !important;
        }
    }

	if hidesupportbot {
		[aria-label*="bot"],
		[aria-label*="Bot"] {
			display: none !important;
		}
	}

	if widemode {
		code {
			white-space: pre-wrap !important;
		}
	}
}

@-moz-document url-prefix("https://venice.ai/chat/agent/") {
/* ================================
	Venice chat agent
================================ */
    /* Custom font size */
	.assistant-content *,
	[data-testid="minds-chat-input-text-column"],
 	[data-testid="minds-chat-input-text-column"] > div,
 	[data-testid="minds-chat-input-text-column"] > [name="prompt-textarea"] {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}

    if widemode {
		.minds-chat-scroll-root > div,
		.minds-chat-scroll-root > div > div,
 		.minds-chat-scroll-root > div > div > div > div,
		div:has(> [data-testid="minds-chat-dropzone"]) {
			max-width: 100% !important;
		}
		.assistant {
			max-width: 80% !important;
		}

		/* agent and send buttons */
		div:has(> [data-testid="minds-chat-input-actions"]) {
			align-items: center;
		}
		[data-testid="minds-chat-input-actions"] > div:nth-of-type(1) button {
			align-items: center;
			font-size: inherit;
			gap: var(--chakra-space-1);
			height: auto;
			min-height: 0;
			padding: 0;
		}
		[data-testid="minds-chat-input-actions"] > div:nth-of-type(1) button span {
			margin-inline: 0
		}
		[data-testid="minds-chat-input-actions"] > div:nth-of-type(1) button span svg {
			vertical-align: unset;
		}
		[data-testid="minds-chat-input-actions"] > div:nth-of-type(2) {
			gap: var(--chakra-space-4);
		}
		[data-testid="minds-chat-input-actions"] > div:nth-of-type(2) > div > div > svg {
			height: 24px;
			width: 24px;
		}
    }
}

@-moz-document url-prefix("https://venice.ai/chat/classic/") {
/* ================================
	Venice chat classic
================================ */
    /* Custom font size */
	[data-message-content] {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}

	body:has(.character-intro) {
		[data-testid="text-chat-message"] strong,
 		[data-testid="user-message"] strong {
			color: namescolor;
			transition: color .3s ease;
		}
		[data-testid="text-chat-message"] em > strong,
 		[data-testid="user-message"] em > strong {
			color: actionscolor;
			transition: color .3s ease;
		}
		[data-testid="text-chat-message"] em,
 		[data-testid="user-message"] em {
			color: thoughtscolor;
			transition: color .3s ease;
		}
		[data-testid="text-chat-message"] p,
 		[data-testid="user-message"] p {
			color: fontcolor;
			transition: color .3s ease;
		}

		[data-testid="text-chat-message"] {
			background: aibgcolor;
			border-radius: 1.1em;
			margin-left: .5em;
			padding: .8em;
			transition: background .3s ease;
		}
		[data-testid="text-chat-message"]:has(> svg) {
			max-width: fit-content !important;
			min-width: 0 !important;
			width: auto !important;
		}
		[data-testid="user-message"] {
			background: userbgcolor;
			border-radius: 1.1em;
			padding: .8em;
			transition: background .3s ease;
		}

		/* action messages */
		@css {
			[data-message-id] svg:not(:has([d=" M21.149999618530273,-11.737000465393066 C21.149999618530273,-11.737000465393066 15.22599983215332,-17.549999237060547 15.22599983215332,-17.549999237060547 C15.22599983215332,-17.549999237060547 -4.74399995803833,-17.549999237060547 -4.74399995803833,-17.549999237060547 C-4.74399995803833,-17.549999237060547 -21.149999618530273,-1.4529999494552612 -21.149999618530273,-1.4529999494552612 C-21.149999618530273,-1.4529999494552612 -21.149999618530273,1.4529999494552612 -21.149999618530273,1.4529999494552612 C-21.149999618530273,1.4529999494552612 -4.74399995803833,17.549999237060547 -4.74399995803833,17.549999237060547 C-4.74399995803833,17.549999237060547 15.22599983215332,17.549999237060547 15.22599983215332,17.549999237060547 C15.22599983215332,17.549999237060547 21.149999618530273,11.73799991607666 21.149999618530273,11.73799991607666 C21.149999618530273,11.73799991607666 9.187000274658203,0 9.187000274658203,0 C9.187000274658203,0 21.149999618530273,-11.737000465393066 21.149999618530273,-11.737000465393066z M-2.2899999618530273,-11.737000465393066 C-2.2899999618530273,-11.737000465393066 16.961000442504883,-11.737000465393066 16.961000442504883,-11.737000465393066 C16.961000442504883,-11.737000465393066 6.478000164031982,-1.4529999494552612 6.478000164031982,-1.4529999494552612 C6.478000164031982,-1.4529999494552612 -12.772000312805176,-1.4529999494552612 -12.772000312805176,-1.4529999494552612 C-12.772000312805176,-1.4529999494552612 -2.2899999618530273,-11.737000465393066 -2.2899999618530273,-11.737000465393066z M16.961000442504883,11.73799991607666 C16.961000442504883,11.73799991607666 -2.2899999618530273,11.73799991607666 -2.2899999618530273,11.73799991607666 C-2.2899999618530273,11.73799991607666 -12.772000312805176,1.4539999961853027 -12.772000312805176,1.4539999961853027 C-12.772000312805176,1.4539999961853027 6.478000164031982,1.4539999961853027 6.478000164031982,1.4539999961853027 C6.478000164031982,1.4539999961853027 16.961000442504883,11.73799991607666 16.961000442504883,11.73799991607666z"])) {
				height: auto !important;
				width: 1.2em !important;
			}
		}

		/* action for user messages */
		[data-message-id]:has([data-testid="user-message"]) > div > div > div:nth-of-type(1) {
			margin: auto 0;
		}

		/* actions under ai messages */
		[data-role="assistant"] > div > div:nth-of-type(3) {
			margin: 0;
			width: 80%;
		}
		[data-role="assistant"] > div > div:nth-of-type(3) > div {
			justify-content: space-evenly;
		}

		/* actions for images in chat */
		.image-message > div:nth-of-type(2) > div {
			justify-content: space-evenly;
		}

		/* glow animation on textarea zone */
		[role="presentation"]:has(textarea[name="prompt-textarea"]) > div > div {
			border-radius: 32px;
			position: relative;
		}
		[role="presentation"]:has(textarea[name="prompt-textarea"]) > div > div::before {
			animation: var(--anim-glow-v2);
			animation-play-state: paused;
			box-shadow: var(--box-shadow-v2);
			border-radius: 32px;
			content: "";
			display: block;
			inset: 0;
			opacity: 0;
			position: absolute;
			transition: opacity .3s ease;
		}

		/* talk button */
		form:has([name="prompt-textarea"]) > div > div:nth-of-type(1) > div:nth-of-type(3) {
			align-items: center;
			justify-content: center;
			padding: 0;
		}

		/* suggest and send buttons */
		form:has([name="prompt-textarea"]) > div > div:nth-of-type(2) {
			align-items: center;
			justify-content: center;
			padding: 0 var(--chakra-space-3) 0 0;
		}
	}
	body:has(.character-intro):has([name="prompt-textarea"]:focus) [role="presentation"]:has(textarea[name="prompt-textarea"]) > div > div::before {
		animation-play-state: running;
		opacity: 1;
	}

	if (customavatar=="default") {
		[data-message-content]:has([data-testid="text-chat-message"]) .chakra-avatar {
			height: customavatarsize;
			transition: height .3s ease, padding .3s ease, width .3s ease;
			width: customavatarsize;
		}
	}

	if (customavatar=="bubble") {
		[data-message-content]:has([data-testid="text-chat-message"]) .chakra-avatar {
			background: url(customavatarurl) center no-repeat;
			background-size: cover;
			height: 0;
			padding-left: customavatarsize;
			padding-top: customavatarsize;
			transition: height .3s ease, padding .3s ease, width .3s ease;
			width: 0;
		}
	}

	if (customavatar=="onlyone") || (customavatar=="onlyonefull") {
		body:has(.character-intro) {
			.chat-messages-content::before {
				background: url(customavatarurl) center no-repeat;
				background-size: cover;
				border-radius: var(--chakra-radii-xl);
				content: "";
				display: block;
			}
			[data-message-content] .chakra-avatar {
				display: none;
			}
		}
	}

	if (customavatar=="onlyone") {
		body:has(.character-intro) {
			.chat-messages-content::before {
				height: customavatarsize;
				position: absolute;
				left: 1rem;
				top: customavatarposition;
				transform: translateY(var(--customavatarpositioninvert));
				transition: height .3s ease, top .3s ease, width .3s ease;
				width: customavatarsize;
			}
			.chat-messages-content > div {
				padding-left: customavatarsize;
				transition: padding-left .3s ease;
			}
		}
	}

	if (customavatar=="onlyonefull") {
		body:has(.character-intro) {
			.chat-messages-content {
				padding-left: calc(100vh - 2rem) !important;
				transition: padding-left .3s ease;
			}
			.chat-messages-content::before {
				aspect-ratio: 1 / 1;
				bottom: .5rem !important;
				height: calc(100vh - 1rem) !important;
				left: .5rem !important;
				position: fixed !important;
				top: .5rem !important;
				width: auto !important;
			}
			.chat-messages-content > div {
				margin: 0 !important;
			}
			.image-message {
				margin-left: var(--chakra-space-2) !important;
			}

			/* menu */
			div[style="height: 100%;"] > div > div:first-of-type {
				background: var(--chakra-colors-background-surface-base);
				pointer-events: none;
				position: fixed;
				right: calc(3rem + .5rem);
				transition: width .3s ease;
				width: 0;
				z-index: 100;
			}
			div[style="height: 100%;"] > div > div:first-of-type > div {
				padding-right: var(--chakra-space-4);
			}
			/* show/hide menu button */
			div[style="height: 100%;"] > div > div:first-of-type > div > div > div:first-of-type > div:first-of-type > button {
				height: 3rem;
				pointer-events: auto !important;
				position: fixed;
				right: .5rem;
				top: 50%;
				transform: translateY(-50%);
				width: 3rem;
			}

			/* Textarea */
			[role="presentation"] > div:has(> div > form) {
				padding-left: calc(100vh - 1rem);
				transition: padding-left .3s ease;
			}
		}
		@css {
			body:has(.character-intro):has(div[style="height: 100%;"] > div > div:first-of-type > div > div > div:first-of-type > div:first-of-type > button:hover) div[style="height: 100%;"] > div > div:first-of-type,
			body:has(.character-intro):has(div[style="height: 100%;"] > div > div:first-of-type:hover) div[style="height: 100%;"] > div > div:first-of-type {
				pointer-events: auto !important;
				width: 320px;
			}
		}
	}

	if hidename {
		body:has(.character-intro) {
			[data-message-content]:has([data-testid="text-chat-message"]) > div > div:first-of-type {
				display: none;
			}
		}
	}

	if !mediagrid {
		.image-message > div:nth-of-type(1) > div {
			transition: width .3s ease;
			width: 90%;
		}
		@media (min-width: 3000px) {
			.image-message > div:nth-of-type(1) > div {
				width: 100%;
			}
		}
	}
	if mediagrid {
		[data-message-id]:has([data-message-content]:empty) {
			display: none;
		}
		.chat-messages-content {
			flex-flow: row wrap;
			gap: 1em;
			justify-content: space-evenly;
		}
		/* Messages texte : pleine largeur */
		[data-message-id]:not(:has(.image-message)) {
			flex-basis: 100%;
		}
		/* Images : côte à côte */
		[data-message-id]:has(.image-message) {
			flex: 0 0 auto;
			margin: 0;
			padding-left: 0 !important;
		}
		.image-message {
			margin: 0 !important;
		}
		.image-message > div:nth-of-type(1) > div {
			width: 300px;
		}
		@media (min-width: 3000px) {
			.image-message > div:nth-of-type(1) > div {
				width: 100%;
			}
		}
		.image-message > div:nth-of-type(1) > div img {
			transition: opacity .3s ease-in, width .3s ease !important;
		}
	}

    if widemode {
		.chat-messages-content > div,
		[data-message-content],
		[role="presentation"] > div:has(> div > form) {
			max-width: 100% !important;
			width: 100% !important;
		}

		/* chat box */
		div[style="height: 100%;"] > div > div:nth-of-type(4) {
			border-radius: var(--chakra-radii-xl);
			margin: var(--chakra-space-2);
		}

		/* images in chat */
		[data-message-id]:has(.image-message),
		.image-message,
		.image-message > div:nth-of-type(1) {
			width: auto !important;
		}
		.image-message {
			padding: 0 !important;
		}
		.image-message > div:nth-of-type(1) {
			position: relative;
		}
		.image-message > div:nth-of-type(1) > div::before {
			animation: var(--anim-glow-v2);
			animation-play-state: paused;
			box-shadow: var(--box-shadow-v2);
			border-radius: var(--chakra-radii-xl);
			content: "";
			display: block;
			inset: 0;
			opacity: 0;
			position: absolute;
			transition: opacity .3s ease;
		}
		.image-message > div:nth-of-type(1):hover > div::before {
			box-shadow: var(--box-shadow-v2);
			animation-play-state: running;
			opacity: 1;
		}

		/* characters */
		body:has(.character-intro) {
			.chat-messages-content {
				padding: 0;
			}
			[data-testid="user-message"],
			[data-testid="text-chat-message"] {
				max-width: 80% !important;
			}
			.chat-messages-content > div[data-message-id]:nth-child(even) {
				margin-left: auto !important;
			}
			[data-message-content] {
				align-items: center;
			}
			[role="presentation"] > div:has(> div > form) button {
				font-size: var(--fontsize-final) !important;
				line-height: 1.5 !important;
			}
		}
    }
}

@-moz-document url-prefix("https://venice.ai/chat/minds") {
/* ================================
	Venice chat minds
================================ */
    /* Custom font size */
	.assistant,
	.assistant-content,
	[data-testid="minds-chat-input-text-column"] > div,
 	[name="prompt-textarea"] {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}

	if widemode {
		div:has([data-chat-turn-anchor]),
		div:has([data-chat-turn-anchor]) > div > div > div,
		div:has(> [data-testid="minds-chat-dropzone"]),
		.minds-chat-container > div:nth-of-type(5) > div > div > div {
			max-width: 100%;
		}

		/* improve icons in textarea zone */
		[data-testid="minds-chat-dropzone"] > form > div {
			align-items: center;
		}

		[data-testid="minds-chat-input-actions"] > div:nth-of-type(2) {
			gap: var(--chakra-space-4);
		}
		[data-testid="minds-chat-input-actions"] > div:nth-of-type(2) > div > div > svg {
			height: 24px;
			width: 24px;
		}

		/* glow animation on textarea zone */
		[data-testid="minds-chat-dropzone"]:has(textarea[name="prompt-textarea"]) {
			border-radius: 32px;
			position: relative;
		}
		[data-testid="minds-chat-dropzone"]:has(textarea[name="prompt-textarea"])::before {
			animation: var(--anim-glow-v2);
			animation-play-state: paused;
			box-shadow: var(--box-shadow-v2);
			border-radius: 32px;
			content: "";
			display: block;
			inset: 0;
			opacity: 0;
			position: absolute;
			transition: opacity .3s ease;
		}
		body:has([name="prompt-textarea"]:focus) [data-testid="minds-chat-dropzone"]:has(textarea[name="prompt-textarea"])::before {
			animation-play-state: running;
			opacity: 1;
		}
	}
}

@-moz-document url-prefix("https://venice.ai/feed") {
/* ================================
	Venice feed
================================ */
	if widemode {
		div:has(> div > .chakra-avatar) {
			max-width: calc(100% - 1rem)
		}
	}
}

@-moz-document url-prefix("https://venice.ai/character-chat") {
/* ================================
	Venice character chat
================================ */
	/* Custom font size */
	.chat-messages-content * {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}

	if widemode {
		.chakra-modal__content-container > section {
			margin: auto;
			max-height: 90vh;
			max-width: 90vw!important;
		}
		.chat-messages-content > div > div > div,
 		[data-role="assistant"],
 		[role="presentation"] > div:has(> div > form) {
			max-width: 100% !important;
			min-width: 100% !important;
		}
		[data-role="assistant"] > div {
			max-width: 80% !important;
		}
    }
}

@-moz-document url-prefix("https://venice.ai/c/") {
/* ================================================
	Venice shared character description
================================================ */
	if widemode {
		.chakra-container {
			max-width: 100%;
		}
		.chakra-container > div {
			padding: var(--chakra-space-8) 0;
		}
		.chakra-container > div > div:nth-of-type(1) > div  {
			display: flex;
		}
		/* avatar */
		.chakra-container > div > div:nth-of-type(1) > div > div:nth-of-type(1) {
			aspect-ratio: 1 / 1 !important;
			align-self: center;
			flex: 0 0 35%;
			height: 100% !important;
		}
		.chakra-container > div > div:nth-of-type(1) > div > div:nth-of-type(1) > img {
			aspect-ratio: 1 / 1 !important;
			border-radius: var(--chakra-radii-xl);
			height: auto !important;
			left: 0;
			transition: left 1s ease;
		}
		body:has(.chakra-container > div > div:nth-of-type(1) > div > div:nth-of-type(1):hover) .chakra-container > div > div:nth-of-type(1) > div > div:nth-of-type(1) > img {
			aspect-ratio: auto !important;
			bottom: 0 !important;
			height: 100vh !important;
			left: 50% !important;
			position: fixed !important;
			top: 0 !important;
			transform: translateX(-50%);
			width: auto !important;
			z-index: 9999 !important;
		}

		/* presentation */
		.chakra-container > div > div:nth-of-type(1) > div > div:nth-of-type(2) p,
 		.chakra-container > div > div:nth-of-type(1) > div > div:nth-of-type(2) span {
			font-size: var(--fontsize-final) !important;
			line-height: 1.5 !important;
		}

		/* comments */
		.chakra-container > div > div:nth-of-type(2) button,
		.chakra-container > div > div:nth-of-type(2) p {
			font-size: var(--fontsize-final) !important;
			line-height: 1.5 !important;
		}
	}
}

@-moz-document url-prefix("https://venice.ai/studio/image") {
/* ================================
	Venice studio image
================================ */
    /* Custom font size */
	div:has(> div > div ~ p ~ div) > div:first-child p,
	div:has(> div > div ~ p ~ div) > div:first-child span {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}

	.PhotoView__Photo {
		border-radius: var(--chakra-radii-3xl);
	}

	[data-testid="virtuoso-item-list"] div > button:last-of-type {
		color: var(--chakra-colors-text-error);
	}

	if widemode {
		div:has(> div > div ~ p ~ div),
		div:has(> input[type="file"]),
 		div:has(> input[type="file"]) > div {
			max-width: 100% !important;
		}
		div:has(> div > div ~ p ~ div) {
			padding: 0 var(--chakra-space-4) !important;
		}

		/* prompt box */
		div:has(> div > div ~ p ~ div) > div:first-child {
			width: calc(40% - var(--chakra-space-16));
		}
		div:has(> div > div ~ p ~ div) > div:first-child > div:last-child > span > div > img {
			aspect-ratio: 1 / 1;
			height: 1em;
			width: 1em;
		}
		div:has(> div > div ~ p ~ div) > div:last-child {
			margin: auto;
		}

		/* image referance */
		div:has(> input[type="file"]) > div > div > div > div:nth-of-type(1) {
			width: 15%;
		}

		/* actions when image hover */
		[role="group"]:has(> img) > div:last-child {
			gap: .75rem;
			justify-content: center;
			padding: 1rem;
			top: 50%;
			transform: translateY(-50%);
		}
		[role="group"] > div button {
			height: 2rem;
			width: 2rem;
		}
		[role="group"] > div svg {
			aspect-ratio: 1 / 1;
			height: 1.5rem;
			width: 1.5rem;
		}
		@media (min-width: 3000px) {
			[role="group"] > div button {
				height: 3rem;
				width: 3rem;
			}
			[role="group"] > div svg {
				height: 2rem;
				width: 2rem;
			}
		}
		/* actions when image clicked */
		.PhotoView-Slider__Overlay > div > div button {
			height: 2rem;
			width: 2rem;
		}
		.PhotoView-Slider__Overlay > div > div svg {
			aspect-ratio: 1 / 1;
			height: 1.5rem;
			width: 1.5rem;
		}
		@media (min-width: 3000px) {
			.PhotoView-Slider__Overlay > div > div button {
				height: 3rem;
				width: 3rem;
			}
			.PhotoView-Slider__Overlay > div > div svg {
				height: 2rem;
				width: 2rem;
			}
		}
		[role="group"] > div > span:last-child button,
 		.PhotoView-Slider__Overlay > div > div > span:last-child button {
			color: var(--chakra-colors-text-error);
		}
		[role="group"] > div > span:last-child:hover button,
 		.PhotoView-Slider__Overlay > div > div > span:last-child:hover button {
			background: var(--chakra-colors-background-button-secondary-hover);
		}

		/* sharing modal */
		.chakra-modal__content:not(:has(.chakra-input)) {
			margin: auto;
			max-height: 90vh !important;
			max-width: 90vw !important;
			overflow: hidden visible !important;
		}
		div:has(> .chakra-image) {
			max-width: 100%;
			width: auto;
		}
		.chakra-image {
			height: 100%;
			width: auto;
		}
	}
}

@-moz-document url-prefix("https://venice.ai/studio/video") {
/* ================================
	Venice studio video
================================ */
	[data-testid="prompt-base-text"] {
		font-size: var(--fontsize-final) !important;
		line-height: 1.5 !important;
	}
}

@-moz-document url-prefix("https://venice.ai/studio/enhance") {
/* ================================
	Venice studio enhance
================================ */
	if widemode {
		div[style^="bottom: 0px"] > div > div,
		div[style^="bottom: 0px"] > div > div > div:nth-of-type(2) > div {
			max-width: 100% !important;
		}
		[aria-label="Proportions"] {
			max-width: unset !important;
		}
	}
}

@-moz-document url-prefix("https://venice.ai/studio/library") {
/* ================================
	Venice studio library
================================ */
	div[style="height: 100%;"] > div > div:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(3) > button:last-of-type,
	[data-testid="virtuoso-item-list"] div > span > button:last-of-type {
		color: var(--chakra-colors-text-error);
	}
	[data-testid="virtuoso-item-list"] div > button:last-of-type {
		color: var(--chakra-colors-text-subtle);
	}
}

@-moz-document domain("venice.ai") {
/* ==============================================
    Accessibility
============================================== */
	/* High-contrast */
	@media (forced-colors: active) {
		*,
		*::after,
		*::before {
			box-shadow: none !important;
			text-shadow: none !important;
		}
	}

	/* Reduced motion */
	@media (prefers-reduced-motion: reduce) {
		html {
			scroll-behavior: auto;
		}

		*,
		*::after,
		*::before {
			animation-duration: 0.001ms !important;
			animation-iteration-count: 1 !important;
			scroll-behavior: auto !important;
			transition-delay: 0ms !important;
			transition-duration: 0.001ms !important;
			transition-property: none !important;
		}
	}
}

@-moz-document regexp("(chrome|moz)-extension://.+") {
/* ===================================================
    Stylus popup
=================================================== */
    html:has([href*="domain=venice.ai"]):has(label:nth-of-type(21):last-of-type) {
		if !hidescrollbars {
			#stylus-popup * {
				scrollbar-color: scrollbarsthumbcolor scrollbarstrackcolor;
				scrollbar-width: thin !important;
			}
		}
		if hidescrollbars {
			#stylus-popup * {
				scrollbar-width: none !important;
			}
		}

        /* Title */
        #stylus-popup #message-box-title {
            width: 100%;
        }
        /* Input content */
        #stylus-popup #message-box .config-body > label input {
            border-radius: .5em;
            text-align: center;
        }

        /* Range */
        #stylus-popup #message-box .config-body > label span:nth-of-type(2) {
            text-align: right;
        }

        /* Color picker size */
        #stylus-popup #message-box .config-body > label .colorview-swatch,
        #stylus-popup #message-box .config-body > label .colorview-swatch a,
        #stylus-popup #message-box .config-body > label .colorview-swatch::before {
            border-radius: .5em;
        }

        /* Select size */
        #stylus-popup #message-box .config-body > label select {
            border-radius: .5em;
            text-align: center;
        }

        /* Fake spaces to improve presentation */
        /* Whole website */
        #stylus-popup #message-box .config-body > label:nth-of-type(1) input,
        /* CCharacters chat */
        #stylus-popup #message-box .config-body > label:nth-of-type(8) input {
            height: 0;
            max-width: 0;
            min-width: 0;
            opacity: 0;
            padding: 0;
            pointer-events: none;
            width: 0;
        }

        /* Avoid move when click on fake titles */
        #stylus-popup #message-box .config-body > label:nth-of-type(1),
        #stylus-popup #message-box .config-body > label:nth-of-type(8) {
            pointer-events: none;
        }

        /* Bigger lines for fake titles */
        #stylus-popup #message-box .config-body > label:nth-of-type(1) *,
        #stylus-popup #message-box .config-body > label:nth-of-type(8) * {
            line-height: 3;
        }

        /* Center fake titles */
        #stylus-popup #message-box .config-body > label:nth-of-type(1) span,
        #stylus-popup #message-box .config-body > label:nth-of-type(8) span {
            margin-right: 0;
            min-width: 100%;
            text-align: center;
        }
    }
}
