.floweralba-editor-active .wp-editor-tabs,
.floweralba-editor-active .floweralba-editor__native > .quicktags-toolbar,
.floweralba-editor-active .floweralba-editor__native > .mce-tinymce,
.floweralba-editor-active .floweralba-editor__native > .mce-container {
	display: none !important;
}

.floweralba-editor-active .floweralba-editor__native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

.floweralba-editor-active .floweralba-editor__textarea {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.floweralba-editor {
	--floweralba-editor-accent: #ef858a;
	--floweralba-editor-accent-soft: #fff1f2;
	--floweralba-editor-text: #20252d;
	--floweralba-editor-muted: #747b86;
	--floweralba-editor-line: #e5e7eb;
	--floweralba-editor-surface: #fff;
	--floweralba-editor-toolbar: #fafafa;
	position: relative;
	width: 100%;
	margin: 0;
	border: 1px solid var(--floweralba-editor-line);
	border-radius: 12px;
	background: var(--floweralba-editor-surface);
	box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
	overflow: visible;
	box-sizing: border-box;
}

.floweralba-editor__toolbar {
	position: relative;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 52px;
	padding: 8px 10px;
	border-bottom: 1px solid var(--floweralba-editor-line);
	border-radius: 12px 12px 0 0;
	background: var(--floweralba-editor-toolbar);
	box-sizing: border-box;
}

.floweralba-editor__group {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding-right: 7px;
	margin-right: 1px;
	border-right: 1px solid #e2e4e8;
}

.floweralba-editor__group:last-child,
.floweralba-editor__group--history {
	padding-right: 0;
	margin-left: auto;
	margin-right: 0;
	border-right: 0;
}

.floweralba-editor__button,
.floweralba-editor__color {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: #4f5865;
	font-family: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: color .15s ease, background-color .15s ease, transform .15s ease;
	box-shadow: none;
	box-sizing: border-box;
}

.floweralba-editor__button:hover,
.floweralba-editor__button:focus-visible,
.floweralba-editor__color:hover,
.floweralba-editor__color:focus-within {
	background: #eceff2;
	color: #1f2937;
	outline: 0;
}

.floweralba-editor__button:focus-visible,
.floweralba-editor__select:focus-visible,
.floweralba-editor__color:focus-within {
	box-shadow: 0 0 0 2px rgba(239, 133, 138, .28);
}

.floweralba-editor__button.is-active {
	background: var(--floweralba-editor-accent-soft);
	color: #d95862;
}

.floweralba-editor__button:disabled {
	opacity: .32;
	cursor: not-allowed;
}

.floweralba-editor__button svg {
	width: 19px;
	height: 19px;
	fill: currentColor;
}

.floweralba-editor__button .is-underline {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.floweralba-editor__button .is-strike {
	text-decoration: line-through;
}

.floweralba-editor__select {
	width: auto;
	min-width: 106px;
	height: 34px;
	margin: 0;
	padding: 0 30px 0 10px;
	border: 1px solid #dde1e6;
	border-radius: 7px;
	background-color: #fff;
	color: #343b45;
	font-family: inherit;
	font-size: 13px;
	line-height: 32px;
	box-shadow: none;
	box-sizing: border-box;
}

.floweralba-editor__select--font-size {
	min-width: 92px;
}

.floweralba-editor__color {
	position: relative;
	font-weight: 700;
	overflow: hidden;
}

.floweralba-editor__color::after {
	content: '';
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 5px;
	height: 3px;
	border-radius: 2px;
	background: var(--floweralba-editor-current-color, var(--floweralba-editor-accent));
}

.floweralba-editor__color input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.floweralba-editor__background-color span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 20px;
	padding: 0 3px;
	border-radius: 3px;
	background: var(--floweralba-editor-current-background, #fff1a8);
	font-size: 11px;
	font-weight: 750;
	line-height: 1;
	box-sizing: border-box;
}

.floweralba-editor__background-color::after {
	display: none;
}

.floweralba-editor__color.is-disabled {
	opacity: .32;
	cursor: not-allowed;
}

.floweralba-editor__button--background-clear {
	margin-left: -2px;
}

.floweralba-editor__button--background-clear svg {
	width: 17px;
	height: 17px;
}

.floweralba-editor__content {
	position: relative;
	background: #fff;
	box-sizing: border-box;
}

.floweralba-editor .floweralba-editor__source {
	display: none !important;
	width: 100%;
	min-height: var(--floweralba-editor-height, 360px);
	max-height: min(70vh, 720px);
	margin: 0;
	padding: 20px 22px;
	overflow: auto;
	resize: vertical;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: #252a32;
	font-family: Consolas, Monaco, 'Courier New', monospace;
	font-size: 13px;
	line-height: 1.65;
	outline: 0;
	box-shadow: none;
	box-sizing: border-box;
}

.floweralba-editor.is-source-mode .floweralba-editor__content {
	display: none;
}

.floweralba-editor.is-source-mode .floweralba-editor__source {
	display: block !important;
}

.floweralba-editor__prosemirror {
	min-height: var(--floweralba-editor-height, 360px);
	max-height: min(70vh, 720px);
	padding: 24px 26px;
	overflow-y: auto;
	color: var(--floweralba-editor-text);
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.75;
	letter-spacing: -.01em;
	white-space: pre-wrap;
	word-break: break-word;
	outline: none;
	box-sizing: border-box;
}

.floweralba-editor__prosemirror > :first-child {
	margin-top: 0;
}

.floweralba-editor__prosemirror > :last-child {
	margin-bottom: 0;
}

.floweralba-editor__prosemirror p {
	margin: 0 0 1em;
}

.floweralba-editor__prosemirror h2,
.floweralba-editor__prosemirror h3 {
	margin: 1.25em 0 .55em;
	color: #171b22;
	font-weight: 750;
	line-height: 1.35;
}

.floweralba-editor__prosemirror h2 {
	font-size: 1.45em;
}

.floweralba-editor__prosemirror h3 {
	font-size: 1.2em;
}

.floweralba-editor__prosemirror ul,
.floweralba-editor__prosemirror ol {
	margin: .8em 0 1em;
	padding-left: 1.6em;
}

.floweralba-editor__prosemirror blockquote {
	margin: 1em 0;
	padding: 12px 16px;
	border-left: 4px solid var(--floweralba-editor-accent);
	border-radius: 0 8px 8px 0;
	background: #fff7f7;
	color: #545b65;
}

.floweralba-editor__prosemirror a {
	color: #df626a;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.floweralba-editor__prosemirror img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 16px auto;
	border-radius: 8px;
}

.floweralba-editor__prosemirror hr {
	margin: 24px 0;
	border: 0;
	border-top: 1px solid var(--floweralba-editor-line);
}

.floweralba-editor__prosemirror .tableWrapper {
	margin: 18px 0;
	overflow-x: auto;
}

.floweralba-editor__prosemirror table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	table-layout: fixed;
}

.floweralba-editor__prosemirror th,
.floweralba-editor__prosemirror td {
	position: relative;
	min-width: 80px;
	padding: 9px 10px;
	border: 1px solid #d9dde3;
	vertical-align: top;
	box-sizing: border-box;
}

.floweralba-editor__prosemirror th {
	background: #f6f7f8;
	font-weight: 700;
}

.floweralba-editor__prosemirror .selectedCell::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: rgba(239, 133, 138, .14);
}

.floweralba-editor__prosemirror p.is-editor-empty:first-child::before {
	content: attr(data-placeholder);
	float: left;
	height: 0;
	color: #a1a7b0;
	pointer-events: none;
}

.floweralba-editor__status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 35px;
	padding: 7px 12px;
	border-top: 1px solid #f0f1f3;
	border-radius: 0 0 12px 12px;
	background: #fcfcfd;
	color: var(--floweralba-editor-muted);
	font-size: 11px;
	line-height: 1.45;
	box-sizing: border-box;
}

.floweralba-editor__counter {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.floweralba-editor__counter.is-near-limit {
	color: #d95862;
	font-weight: 700;
}

.floweralba-editor__counter.is-below-minimum {
	color: #b7791f;
}

.floweralba-editor__link-panel {
	position: absolute;
	z-index: 10020;
	top: calc(100% + 8px);
	right: 0;
	width: min(360px, calc(100vw - 32px));
	padding: 14px;
	border: 1px solid #dde1e6;
	border-radius: 11px;
	background: #fff;
	box-shadow: 0 16px 42px rgba(17, 24, 39, .16);
	box-sizing: border-box;
}

.floweralba-editor__link-panel[hidden] {
	display: none !important;
}

.floweralba-editor__link-panel label {
	display: block;
	margin: 0 0 10px;
	color: #343b45;
	font-size: 12px;
	font-weight: 700;
}

.floweralba-editor__link-panel input {
	display: block;
	width: 100%;
	height: 40px;
	margin: 6px 0 0;
	padding: 0 11px;
	border: 1px solid #d6dae0;
	border-radius: 7px;
	font-size: 14px;
	box-shadow: none;
	box-sizing: border-box;
}

.floweralba-editor__link-panel input:focus {
	border-color: #ef969b;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(239, 133, 138, .12);
}

.floweralba-editor__link-panel > div {
	display: flex;
	gap: 6px;
}

.floweralba-editor__link-panel button {
	height: 34px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #dfe2e6;
	border-radius: 7px;
	background: #fff;
	color: #454c57;
	font-size: 12px;
	font-weight: 650;
	cursor: pointer;
	box-shadow: none;
}

.floweralba-editor__link-panel button[type='submit'] {
	border-color: var(--floweralba-editor-accent);
	background: var(--floweralba-editor-accent);
	color: #fff;
}

.floweralba-editor__link-panel small {
	display: block;
	margin-top: 10px;
	color: #868d97;
	font-size: 10px;
	line-height: 1.5;
}

@media (max-width: 767px) {
	.floweralba-editor {
		border-radius: 10px;
	}

	.floweralba-editor__toolbar {
		flex-wrap: nowrap;
		gap: 5px;
		min-height: 50px;
		padding: 7px 8px;
		border-radius: 10px 10px 0 0;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
	}

	.floweralba-editor.has-link-panel .floweralba-editor__toolbar {
		overflow: visible;
	}

	.floweralba-editor__group {
		flex: 0 0 auto;
	}

	.floweralba-editor__group--history {
		margin-left: 0;
	}

	.floweralba-editor__button,
	.floweralba-editor__color {
		flex-basis: 36px;
		width: 36px;
		height: 36px;
	}

	.floweralba-editor__select {
		height: 36px;
	}

	.floweralba-editor__prosemirror {
		min-height: max(260px, min(var(--floweralba-editor-height, 340px), 52vh));
		max-height: 62vh;
		padding: 18px 16px;
		font-size: 15px;
		line-height: 1.72;
	}

	.floweralba-editor__source {
		min-height: max(260px, min(var(--floweralba-editor-height, 340px), 52vh));
		max-height: 62vh;
		padding: 16px;
		font-size: 12px;
	}

	.floweralba-editor__status {
		padding: 7px 10px;
	}

	.floweralba-editor__link-panel {
		position: fixed;
		top: auto;
		right: 12px;
		bottom: max(16px, env(safe-area-inset-bottom));
		left: 12px;
		width: auto;
	}
}

/*
 * The WordPress listing editor lives on a long, scrollable admin page. Let its
 * visual canvas grow with the content instead of creating a second scroll
 * area and retaining the old TinyMCE iframe height below short content.
 */
body.wp-admin.post-type-job_listing .floweralba-editor__prosemirror {
	min-height: 220px;
	max-height: none;
	overflow-y: visible;
}

@media (prefers-reduced-motion: reduce) {
	.floweralba-editor,
	.floweralba-editor__button {
		transition: none;
	}
}
