/*!
 * Clarity Console overrides for Froala 5.2 + Filerobot image editor.
 * Load after imageFileRobot.min.css (see dsp_froala_assets.cfm).
 * Froala ships #filerobotContainer at z-index: 10, which sits under console chrome.
 */

#filerobotContainer {
	z-index: 2147483645 !important;
}

#filerobotContainer.active {
	display: block !important;
}

#filerobotContainer #filerobot-editor {
	z-index: 2147483646 !important;
}

#filerobotContainer #filerobot-editor .FIE_topbar,
#filerobotContainer #filerobot-editor .FIE_topbar-main {
	z-index: 2147483647 !important;
	position: relative !important;
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	min-height: 48px !important;
	flex-shrink: 0 !important;
}

/* Filerobot 4.x+ uses .FIE_topbar-save; older Froala CSS references -save-button */
#filerobotContainer .FIE_topbar-save,
#filerobotContainer .FIE_topbar-save-button,
#filerobotContainer .FIE_topbar-close-button,
#filerobotContainer .FIE_topbar-back-button {
	display: inline-flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

#filerobotContainer .FIE_topbar-save,
#filerobotContainer .FIE_topbar-save-button,
#filerobotContainer [class*="topbar-save"] {
	background-color: #4caf50 !important;
	cursor: pointer !important;
}

#filerobotContainer .FIE_topbar-save:hover,
#filerobotContainer .FIE_topbar-save-button:hover {
	background-color: #45a049 !important;
}

#filerobotContainer .FIE_topbar-close-button:hover,
#filerobotContainer .FIE_topbar-back-button:hover {
	background-color: rgba(255, 255, 255, 0.15) !important;
}

#filerobotContainer [class*="Modal"],
#filerobotContainer [class*="modal"] {
	z-index: 2147483647 !important;
}

/*
 * Filerobot tool menus (+ Add watermark, upload image, save-as, etc.) render in a
 * body portal (#SfxPopper) at z-index ~1300. #filerobotContainer is ~2147483645,
 * so those menus sit behind the full-screen overlay and look broken / unclickable.
 */
body.fr-prevent-scroll #SfxPopper,
body.Menu-open #SfxPopper,
body.fr-prevent-scroll [class*="SfxPopper"],
body.Menu-open [class*="SfxPopper"],
body.fr-prevent-scroll [class*="SfxMenu"],
body.Menu-open [class*="SfxMenu"] {
	z-index: 2147483648 !important;
	pointer-events: auto !important;
}

body.fr-prevent-scroll #SfxPopper [class*="SfxMenu-root"],
body.Menu-open #SfxPopper [class*="SfxMenu-root"],
body.fr-prevent-scroll #SfxPopper [class*="SfxPopper-Popper"],
body.Menu-open #SfxPopper [class*="SfxPopper-Popper"] {
	z-index: 2147483648 !important;
	pointer-events: auto !important;
}

/*
 * Annotate color picker (and other Filerobot modals) render in SfxModal on body at
 * z-index ~1200–1301 — below #filerobotContainer, so the dialog never appears.
 */
body.fr-prevent-scroll [class*="SfxModal-Wrapper"],
body.Menu-open [class*="SfxModal-Wrapper"],
body.fr-prevent-scroll [class*="SfxModal-Container"],
body.Menu-open [class*="SfxModal-Container"],
body.fr-prevent-scroll [class*="SfxColorPicker"],
body.Menu-open [class*="SfxColorPicker"],
body.fr-prevent-scroll [class*="Popup-root"],
body.Menu-open [class*="Popup-root"] {
	z-index: 2147483648 !important;
	pointer-events: auto !important;
}

body.fr-prevent-scroll [class*="SfxModal-Overlay"],
body.Menu-open [class*="SfxModal-Overlay"] {
	pointer-events: auto !important;
}

#filerobotContainer #filerobot-editor .FIE_color-picker-triggerer {
	pointer-events: auto !important;
	cursor: pointer !important;
}

/*
 * Annotate toolbar: Filerobot's tools bar uses overflow:hidden + max-height:170px,
 * which clips font-family dropdown labels and the bottom of portaled menu lists.
 */
#filerobotContainer #filerobot-editor .FIE_tools-bar-wrapper,
#filerobotContainer #filerobot-editor .FIE_tools-bar {
	overflow: visible !important;
	max-height: none !important;
}

#filerobotContainer #filerobot-editor .FIE_annotations-options,
#filerobotContainer #filerobot-editor .FIE_text-tool-options {
	overflow: visible !important;
}

/* Annotate > Text: font family select and font size input must share the same height */
#filerobotContainer #filerobot-editor .FIE_text-tool-options {
	display: flex !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
}

#filerobotContainer #filerobot-editor .FIE_text-font-family-option,
#filerobotContainer #filerobot-editor .FIE_text-size-option,
#filerobotContainer #filerobot-editor .FIE_text-font-family-option [class*="SfxSelect-Container"] {
	overflow: visible !important;
}

#filerobotContainer #filerobot-editor .FIE_text-font-family-option [class*="SfxSelect-Container"],
#filerobotContainer #filerobot-editor .FIE_text-font-family-option [class*="SfxSelect-root"],
#filerobotContainer #filerobot-editor .FIE_text-size-option [class*="SfxInput-root"] {
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	height: 32px !important;
	min-height: 32px !important;
	max-height: 32px !important;
	padding: 0 8px !important;
	line-height: normal !important;
}

#filerobotContainer #filerobot-editor .FIE_text-font-family-option [class*="SfxSelect-Icon"] {
	display: inline-flex !important;
	align-items: center !important;
	flex-shrink: 0 !important;
	align-self: center !important;
	padding: 0 0 0 4px !important;
}

#filerobotContainer #filerobot-editor .FIE_text-font-family-option [class*="SfxSelect-Label"],
#filerobotContainer #filerobot-editor .FIE_text-font-family-option [class*="SfxSelect-Placeholder"] {
	display: inline-flex !important;
	align-items: center !important;
	align-self: center !important;
	flex: 1 1 auto !important;
	min-width: 0 !important;
	min-height: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 14px !important;
	line-height: normal !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

#filerobotContainer #filerobot-editor .FIE_text-size-option [class*="SfxInput-Base"] {
	display: flex !important;
	align-items: center !important;
	align-self: center !important;
	min-width: 0 !important;
	min-height: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 14px !important;
	line-height: normal !important;
	text-align: center !important;
}

/* Portaled font/menu lists (Annotate font picker, etc.) */
body.fr-prevent-scroll #SfxPopper [class*="SfxMenu-root"],
body.Menu-open #SfxPopper [class*="SfxMenu-root"] {
	max-height: 350px !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	padding-bottom: 4px !important;
}

body.fr-prevent-scroll #SfxPopper [class*="SfxMenuItem-root"],
body.Menu-open #SfxPopper [class*="SfxMenuItem-root"] {
	line-height: 1.35 !important;
	min-height: 32px !important;
	display: flex !important;
	align-items: center !important;
}
