.tox {
	font-family: var(--theme--fonts--sans--font-family);
}

.tox .tox-tbtn {
	block-size: 36px;
	margin: 0;
	color: var(--theme--form--field--input--foreground);
}

.tox .tox-tbtn:focus {
	background: transparent;
}

.tox .tox-listbox__select-chevron svg,
.tox .tox-collection__item-caret svg {
	fill: var(--theme--form--field--input--foreground);
}

.tox .tox-swatches__picker-btn svg {
	fill: var(--theme--form--field--input--foreground);
}

.tox .tox-tbtn svg,
.tox .tox-tbtn:hover svg {
	fill: var(--theme--form--field--input--foreground);
}

.tox-tbtn[aria-label='Bold'] .tox-icon svg {
	display: none;
}

.tox-tbtn[aria-label='Bold'] .tox-icon::after {
	display: inline-block;
	margin-block-start: 4px;
	color: var(--theme--form--field--input--foreground);
	font-size: 24px;
	font-family: 'Material Symbols';
	content: 'format_bold';
	font-feature-settings: 'liga';
}

.tox-tbtn[aria-label='Italic'] .tox-icon svg {
	display: none;
}

.tox-tbtn[aria-label='Italic'] .tox-icon::after {
	display: inline-block;
	margin-block-start: 4px;
	color: var(--theme--form--field--input--foreground);
	font-size: 24px;
	font-family: 'Material Symbols';
	content: 'format_italic';
	font-feature-settings: 'liga';
}

.tox-tbtn[aria-label='Underline'] .tox-icon svg {
	display: none;
}

.tox-tbtn[aria-label='Underline'] .tox-icon::after {
	display: inline-block;
	margin-block-start: 4px;
	color: var(--theme--form--field--input--foreground);
	font-size: 24px;
	font-family: 'Material Symbols';
	content: 'format_underlined';
	font-feature-settings: 'liga';
}

.tox-tbtn[aria-label='Add/Edit Link'] .tox-icon svg {
	display: none;
}

.tox-tbtn[aria-label='Add/Edit Link'] .tox-icon::after {
	display: inline-block;
	margin-block-start: 4px;
	color: var(--theme--form--field--input--foreground);
	font-size: 24px;
	font-family: 'Material Symbols';
	content: 'insert_link';
	font-feature-settings: 'liga';
}

.tox-tbtn--disabled {
	opacity: 0.8;
	pointer-events: none;
}

.tox .tox-edit-area__iframe {
	background-color: var(--theme--form--field--input--background);
}

.tox-tinymce {
	min-block-size: 300px;
	color: var(--theme--form--field--input--foreground);
	border: var(--theme--border-width) solid var(--theme--form--field--input--border-color);
	border-radius: var(--theme--border-radius);
	transition: var(--fast) var(--transition);
	transition-property: color, border-color;
	box-shadow: var(--theme--form--field--input--box-shadow);
}

.wysiwyg:not(.disabled) .tox-tinymce:hover {
	border-color: var(--theme--form--field--input--border-color-hover);
	box-shadow: var(--theme--form--field--input--box-shadow-hover);
}

.wysiwyg:not(.disabled) .tox-tinymce.focus {
	border-color: var(--theme--form--field--input--border-color-focus) !important;
	box-shadow: var(--theme--form--field--input--box-shadow-focus) !important;
}

.tox .tox-toolbar,
.tox .tox-toolbar__primary,
.tox .tox-toolbar__overflow {
	min-block-size: 40px;
	padding: 2px 0;
	background: var(--theme--form--field--input--background-subdued);
	border-block-end: var(--theme--border-width) solid var(--theme--form--field--input--border-color);
}

.tox .tox-pop__dialog .tox-toolbar {
	margin-block-end: -2px;
}

body.dark .tox .tox-toolbar,
body.dark .tox .tox-toolbar__primary,
body.dark .tox .tox-toolbar__overflow {
	background: url("data:image/svg+xml;charset=utf8,%3Csvg height='40px' viewBox='0 0 40 40px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='2' fill='%23455a64'/%3E%3C/svg%3E")
		left 0 top 0 var(--theme--form--field--input--background-subdued);
}

@media (prefers-color-scheme: dark) {
	body.auto .tox .tox-toolbar,
	body.auto .tox .tox-toolbar__primary,
	body.auto .tox .tox-toolbar__overflow {
		background: url("data:image/svg+xml;charset=utf8,%3Csvg height='40px' viewBox='0 0 40 40px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='2' fill='%23455a64'/%3E%3C/svg%3E")
			left 0 top 0 var(--theme--form--field--input--background-subdued);
	}
}

.tox .tox-swatches__picker-btn,
.tox .tox-swatches__picker-btn:hover,
.tox .tox-swatches__picker-btn:active,
.tox .tox-split-button:hover {
	box-shadow: unset;
}

.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover,
.tox .tox-split-button:hover,
.tox .tox-tbtn:hover,
.tox .tox-split-button:focus {
	color: var(--theme--form--field--input--foreground);
	background: var(--theme--form--field--input--border-color);
}

.tox .tox-tbtn--bespoke {
	background: inherit;
}

.tox .tox-tbtn + .tox .tox-tbtn {
	margin-inline-start: 2px;
}

.tox .tox-swatches__picker-btn:hover {
	background: transparent;
	border: none;
}

.tox .tox-swatch:hover,
.tox .tox-swatch:focus {
	transform: scale(1.2);
}

.mce-content-body {
	margin: 20px;
}

/* Modal */

.tox .tox-dialog-wrap__backdrop {
	background-color: var(--overlay-color);
}

.tox.tox-tinymce-aux {
	z-index: 510;
}

.tox.tox-tinymce.tox-fullscreen {
	z-index: 490;
}

.tox .tox-dialog {
	color: var(--theme--form--field--input--foreground);
	background-color: var(--theme--background);
	border: none;
	box-shadow: none;
}

.tox .tox-dialog--width-lg {
	max-inline-size: 800px;
}

.tox .tox-dialog__header {
	padding: 20px;
	color: var(--theme--form--field--input--foreground);
	font-size: 16px;
	background-color: var(--theme--background);
}

.tox .tox-dialog__body {
	color: var(--theme--form--field--input--foreground);
}

.tox .tox-dialog__body-content {
	padding: 24px;
}

.tox .tox-dialog__footer {
	padding: 0 24px 24px;
	color: var(--theme--form--field--input--foreground);
	background-color: var(--theme--background);
	border-block-start: none;
}

.tox .tox-textfield,
.tox .tox-listboxfield .tox-listbox,
.tox .tox-toolbar-textfield,
.tox .tox-selectfield select,
.tox .tox-textarea {
	padding: 12px;
	color: var(--theme--form--field--input--foreground);
	font-weight: 500;
	font-size: 14px;
	font-family: var(--theme--fonts--sans--font-family);
	background-color: var(--theme--background);
	border: var(--theme--border-width) solid var(--theme--form--field--input--border-color);
	border-radius: var(--theme--border-radius);
	transition: var(--fast) var(--transition);
}

.tox .tox-textarea {
	font-family: var(--theme--fonts--monospace--font-family);
}

.tox .tox-textfield:focus,
.tox .tox-listboxfield .tox-listbox:focus,
.tox .tox-toolbar-textfield:focus,
.tox .tox-selectfield select:focus,
.tox .tox-textarea:focus {
	background-color: var(--theme--background);
}

.tox .tox-menu {
	box-sizing: border-box;
	padding: 4px !important;
	color: var(--theme--form--field--input--foreground);
	font-family: var(--theme--fonts--sans--font-family);
	background-color: var(--theme--form--field--input--background-subdued);
	border: var(--theme--border-width) solid var(--theme--form--field--input--border-color);
	border-radius: var(--theme--border-radius);
}

.tox .tox-collection__item {
	border-radius: var(--theme--border-radius);
}

.tox .tox-collection--list .tox-collection__item {
	color: var(--theme--form--field--input--foreground);
}

.tox .tox-collection--list .tox-collection__item--enabled,
.tox .tox-collection--list .tox-collection__item--active {
	color: var(--theme--form--field--input--foreground) !important;
	background-color: var(--theme--background-accent) !important;
}

.tox .tox-collection__item-label {
	line-height: unset;
}

.tox .tox-collection__item-accessory {
	color: var(--theme--form--field--input--foreground);
}

.tox .tox-textfield:focus,
.tox .tox-selectfield select:focus,
.tox .tox-textarea:focus {
	border-color: var(--theme--form--field--input--border-color-focus);
}

.tox .tox-button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 136px;
	block-size: 44px;
	padding: 0 20px 1px;
	color: var(--white);
	font-weight: 500;
	font-size: 16px;
	font-family: var(--theme--fonts--sans--font-family);
	line-height: 19px;
	background-color: var(--theme--primary);
	border: var(--theme--border-width) solid var(--theme--primary);
	border: none;
	border-color: var(--theme--primary);
	border-radius: var(--theme--border-radius);
	cursor: pointer;
	transition: var(--fast) var(--transition);
	transition-property: border-color, background-color, color;
}

.tox .tox-button:hover:not(:disabled) {
	background-color: var(--theme--primary);
	border-color: var(--theme--primary);
}

.tox .tox-button--secondary {
	color: var(--theme--form--field--input--foreground);
	background-color: var(--theme--background-normal);
	border-color: var(--theme--background-normal);
}

.tox .tox-button--secondary:hover:not(:disabled) {
	color: var(--theme--form--field--input--foreground);
	background-color: var(--theme--background-normal);
	border-color: var(--theme--background-normal);
}

.tox .tox-button--naked {
	min-inline-size: auto;
	block-size: auto;
	color: var(--theme--form--field--input--foreground-subdued);
	background-color: transparent;
	border-color: transparent;
}

.tox .tox-button--naked.tox-button--icon:hover:not(:disabled) {
	color: var(--theme--form--field--input--foreground);
	background-color: transparent;
	border-color: transparent;
}

.tox .tox-form__group {
	margin-block-end: 24px;
}

.tox .tox-label,
.tox .tox-toolbar-label {
	margin-block-end: 4px;
	color: var(--theme--form--field--input--foreground);
	font-weight: 500;
	font-size: 16px;
}

.tox .tox-dialog__body-nav-item {
	box-sizing: border-box;
	inline-size: 100%;
	margin-block-end: 4px;
	padding: 12px 16px;
	color: var(--theme--form--field--input--foreground);
	font-weight: 500;
	font-size: 14px;
	border-block-end: none;
	border-radius: var(--theme--border-radius);
	transition: var(--fast) var(--transition);
	transition-property: background-color, color;
}

.tox .tox-dialog__body-nav-item:hover {
	background-color: var(--theme--background-accent);
}

.tox .tox-dialog__body-nav-item--active {
	background-color: var(--theme--background-accent);
}

.tox .tox-dialog__body-nav-item--active:focus {
	background-color: var(--theme--background-accent);
}

.tox .tox-pop__dialog,
.tox:not([dir='rtl']) .tox-toolbar__group:not(:last-of-type),
.tox .tox-collection--list .tox-collection__group {
	border-color: var(--theme--form--field--input--border-color);
}

.tox .tox-insert-table-picker__label {
	color: var(--theme--form--field--input--foreground);
}

.tox .tox-insert-table-picker > div {
	border-color: var(--theme--form--field--input--border-color);
}

.tox .tox-insert-table-picker .tox-insert-table-picker__selected {
	border-color: var(--theme--primary);
	background-color: var(--theme--primary-subdued);
}

.tox .tox-pop.tox-pop--top::after {
	border-block-end-color: var(--theme--form--field--input--background-subdued);
}

.tox .tox-pop.tox-pop--top::before {
	border-block-end-color: var(--theme--form--field--input--border-color);
}

.tox .tox-dialog-wrap__backdrop .tox-rgba-preview {
	visibility: hidden;
}

.tox:not(.tox-tinymce-inline) .tox-editor-header {
	padding: 0;
	box-shadow: none;
}

@media screen and (max-width: 767px) {
	.tox .tox-dialog__body-nav-item {
		text-align: center;
	}
}
