@import 'mediawiki.skin.variables.less';

.mw-notification-area-overlay {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 100%;
	/* Avoid horizontal scrollbar on fade in and on fade out */
	overflow: hidden;
	pointer-events: none;
	// Create a new stacking context for selected DOM children on body:
	// - 3. Temporary user banner: `( @z-index-top + 2 )`.
	// - 2. `.mw-notification-area-overlay`, the container: `@z-index-top`.
	// - 2.1. `.mw-notification-area` – the actual notification area:
	// 		  Inherited`z-index: 10000`: now `( @z-index-top + 1 )`.
	// - 1. `#teleport-target`: `@z-index-overlay` equal to 450.
	// Refer to T404122.
	// TODO: Consider lowering the `z-index` of `.mw-notification-area` and its children instead.
	// 		 And rely on named Codex `@z-index-*` tokens instead.
	z-index: @z-index-top;
}

.mw-notification-area {
	top: 0;
	right: 0;
	/* Padding on all sides so drop shadows aren't cut by overflow: hidden */
	padding: 1em;
	width: 20em;
	line-height: 1.35;
	// Original value from 13y ago was `10000`. Keep it that way to avoid conflicts.

	z-index: ( @z-index-top + 1 );
}

.mw-notification {
	padding: 0.75em 1.5em;
	margin-bottom: 0.5em;
	border: @border-width-base @border-style-base @border-color-notice;
	background-color: @background-color-base;
	color: @color-emphasized;
	/* Click handler in mediawiki.notification.js */
	cursor: pointer;
	opacity: 0;
	transform: translateX( 35px );
	transition: opacity 0.35s ease-in-out, transform 0.35s ease-in-out;
	pointer-events: auto;
	word-break: break-word;
}

.mw-notification-visible {
	opacity: 1;
	transform: translateX( 0 );
}

.mw-notification-replaced {
	opacity: 0;
	transform: translateY( -35px );
	pointer-events: none;
}

.mw-notification-title {
	font-weight: bold;
}

.mw-notification.mw-notification-type-warn {
	background-color: @background-color-warning-subtle;
	border-color: @border-color-warning;
}

.mw-notification.mw-notification-type-error {
	background-color: @background-color-error-subtle;
	border-color: @border-color-error;
}

.mw-notification.mw-notification-type-success {
	background-color: @background-color-success-subtle;
	border-color: @border-color-success;
}

.mw-notification.mw-notification-type-notice {
	background-color: @background-color-notice-subtle;
	border-color: @border-color-notice;
}
