/*
 * @futurity/design — classic/jgrowl.css: jGrowl adapter that turns notifications into Fty toasts.
 *
 * WHAT
 *   jGrowl 1.2–1.4 builds `#jGrowl` containing `.jGrowl-notification` items (`.jGrowl-close`, `.jGrowl-header`,
 *   `.jGrowl-message`) and a `.jGrowl-closer` ("[ close all ]"). Orion passes `theme:` to colour them
 *   (success / error / danger / warning / info; default is `ui-state-highlight`). This file paints them like the
 *   Fty toast (classic.css `.fty-c-toast`): white card, 12px radius, panel shadow, 4px accent on the left.
 *   Container positioning (`#jGrowl` and its `.top-right` … `.center` variants) is left to jGrowl.
 *   Loading this file IS the opt-in: it is not scoped to `.fty-classic`.
 *
 * LOAD ORDER (after jquery.jgrowl.css and, if present, the jQuery UI theme that styles `.ui-state-highlight`)
 *   jquery.jgrowl.css → tokens.css (optional) → classic.css → classic/jgrowl.css
 *
 * HOW IT WINS
 *   jGrowl styles `div.jGrowl div.jGrowl-notification` (one class, two elements, 0,1,2) and jQuery UI paints
 *   `.ui-state-highlight` (0,1,0). Every rule here uses the `div.jGrowl div.jGrowl-notification` shape plus the
 *   theme class where needed, so it wins by weight or by load order. No !important.
 *
 * PRINT
 *   The @media print block at the end drops the toast shadow (plain print output).
 */

div.jGrowl div.jGrowl-notification {
	--jg-accent: #0e487e;
	box-sizing: border-box;
	width: auto;
	min-height: 0;
	margin: 0 0 10px;
	padding: 12px 16px;
	font-size: 14px;
	line-height: 1.4;
	color: #030213;
	background: #ffffff;
	background-image: none;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-left: 4px solid var(--jg-accent);
	border-radius: 12px;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	opacity: 1;
	text-shadow: none;
}

div.jGrowl div.jGrowl-notification.ui-state-highlight {
	color: #030213;
	background: #ffffff;
	border-color: rgba(0, 0, 0, 0.08);
	border-left-color: var(--jg-accent);
}

div.jGrowl div.jGrowl-notification.success {
	--jg-accent: #34a853;
}

div.jGrowl div.jGrowl-notification.error,
div.jGrowl div.jGrowl-notification.danger {
	--jg-accent: #d4183d;
}

div.jGrowl div.jGrowl-notification.warning {
	--jg-accent: #ff6f00;
}

div.jGrowl div.jGrowl-notification.info {
	--jg-accent: #005a9c;
}

/* Theme classes win over .ui-state-highlight's own border colour. */
div.jGrowl div.jGrowl-notification.ui-state-highlight.success,
div.jGrowl div.jGrowl-notification.ui-state-highlight.error,
div.jGrowl div.jGrowl-notification.ui-state-highlight.danger,
div.jGrowl div.jGrowl-notification.ui-state-highlight.warning,
div.jGrowl div.jGrowl-notification.ui-state-highlight.info {
	border-left-color: var(--jg-accent);
}

div.jGrowl div.jGrowl-notification .jGrowl-header {
	font-size: 14px;
	font-weight: 600;
	color: #003366;
}

div.jGrowl div.jGrowl-notification .jGrowl-message {
	font-size: 14px;
	color: #030213;
}

div.jGrowl div.jGrowl-notification .jGrowl-close {
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
	color: #717182;
	background: transparent;
	border: 0;
	cursor: pointer;
}

div.jGrowl div.jGrowl-notification .jGrowl-close:hover {
	color: #030213;
}

div.jGrowl div.jGrowl-closer {
	box-sizing: border-box;
	margin: 0 0 10px;
	padding: 4px 12px;
	font-size: 12px;
	line-height: 1.5;
	color: #030213;
	text-align: center;
	background: #ffffff;
	background-image: none;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
}

div.jGrowl div.jGrowl-closer:hover {
	background: #f3f3f5;
	border-color: #005a9c;
}

/* Print: plain output, like the other adapters' print blocks. Toasts are transient, so they print as a flat card. */
@media print {
	div.jGrowl div.jGrowl-notification {
		box-shadow: none;
	}
}
