/* Typography aligned with Angular shell (Arabic-friendly sans). */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Tajawal:wght@400;500;700&display=swap');

/* ── Bootstrap 5 toasts (ABP PageAlerts, colored-toast) ── */
.toast {
	background-color: #fff;
}
.toast.colored-toast {
	border: 0 !important;
	backdrop-filter: blur(20px);
}
.toast.colored-toast .btn-close {
	filter: invert(1);
}
.toast.colored-toast .toast-header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Legacy flat helpers (some scripts add only these classes on BS toasts) */
.toast-success {
	background-color: #51A351;
}
.toast-error {
	background-color: #BD362F;
}
.toast-info {
	background-color: #2F96B4;
}
.toast-warning {
	background-color: #F89406;
}

/* ── ABP MVC Page alerts (Bootstrap); do not mix with ngx `#toast-container` rules ── */
#AbpPageAlerts.toast-container {
	z-index: 10800;
	pointer-events: none;
	font-family: 'IBM Plex Sans Arabic', 'Tajawal', 'Segoe UI', Tahoma, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

#AbpPageAlerts .abp-page-toast {
	pointer-events: auto;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
	border: 0;
}

#AbpPageAlerts .abp-page-toast .toast-header {
	padding: 10px 14px;
	min-height: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.45;
	color: #fff !important;
}

#AbpPageAlerts .abp-page-toast .toast-header strong {
	color: #fff !important;
}

#AbpPageAlerts .abp-page-toast .toast-body {
	font-size: 1rem;
	line-height: 1.55;
	font-weight: 600;
	color: #fff !important;
}

#AbpPageAlerts .abp-page-toast.bg-danger .toast-body,
#AbpPageAlerts .abp-page-toast.bg-danger .toast-header {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

/* Override stray Bootstrap text utilities inside colored alerts */
#AbpPageAlerts .abp-page-toast .text-muted,
#AbpPageAlerts .abp-page-toast .text-dark,
#AbpPageAlerts .abp-page-toast .text-body {
	color: #fff !important;
}

#AbpPageAlerts .abp-page-toast .toast-body.abp-page-toast__body--solo {
	padding-top: 1rem !important;
	padding-bottom: 1rem !important;
	padding-inline-start: 1rem !important;
	padding-inline-end: 2.75rem !important;
}

/* ── ngx-toastr / jQuery toastr (`#toast-container` only — avoids styling `#AbpPageAlerts`) ── */
#toast-container {
	position: fixed;
	z-index: 999999;
	pointer-events: none;
	font-family: 'IBM Plex Sans Arabic', 'Tajawal', 'Segoe UI', Tahoma, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

#toast-container > div,
#toast-container .ngx-toastr {
	position: relative;
	pointer-events: auto;
	overflow: hidden;
	box-sizing: border-box;
	margin: 0 0 12px;
	width: min(22rem, calc(100vw - 1.5rem));
	min-height: 3.25rem;
	padding: 16px 40px 16px 52px;
	border: none;
	border-radius: 10px;
	background-repeat: no-repeat;
	background-size: 22px 22px;
	background-position: 14px center;
	color: #fff !important;
	opacity: 1 !important;
	box-shadow:
		0 4px 6px rgba(0, 0, 0, 0.07),
		0 12px 28px rgba(0, 0, 0, 0.16) !important;
	line-height: 1.55;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.015em;
}

#toast-container > div:hover,
#toast-container .ngx-toastr:hover {
	box-shadow:
		0 6px 8px rgba(0, 0, 0, 0.08),
		0 16px 36px rgba(0, 0, 0, 0.2) !important;
	cursor: default;
}

#toast-container > div.rtl,
#toast-container .ngx-toastr.rtl {
	direction: rtl;
	padding: 16px 52px 16px 40px;
	background-position: right 14px center;
}

.abp-toast.ngx-toastr {
	font-family: inherit;
}

#toast-container .toast-title:empty {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
}

#toast-container .toast-title:not(:empty) {
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 6px;
	color: #fff !important;
	letter-spacing: 0.02em;
}

#toast-container .toast-message {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.55;
	word-break: break-word;
	overflow-wrap: anywhere;
	color: #fff !important;
	-ms-word-wrap: break-word;
	word-wrap: break-word;
}

#toast-container .toast-message a,
#toast-container .toast-message label {
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 2px;
}

#toast-container .toast-message a:hover {
	color: #fff !important;
	opacity: 0.92;
	text-decoration: none;
}

#toast-container .toast-close-button {
	position: absolute;
	top: 12px;
	right: 12px;
	float: none;
	width: 1.75rem;
	height: 1.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1;
	color: #fff !important;
	text-shadow: none !important;
	background: rgba(0, 0, 0, 0.14);
	border: 0;
	border-radius: 6px;
	opacity: 1 !important;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus {
	color: #fff !important;
	background: rgba(0, 0, 0, 0.22);
	text-decoration: none;
	opacity: 1 !important;
}

/* Inner nodes may pick up theme utilities (e.g. `.text-dark`) — keep copy white on red/green/blue panels */
#toast-container .ngx-toastr .toast-message,
#toast-container .ngx-toastr .toast-title:not(:empty) {
	color: #fff !important;
}

#toast-container .ngx-toastr.toast-error .toast-message,
#toast-container .ngx-toastr.toast-error .toast-title:not(:empty) {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

#toast-container .abp-toast.ngx-toastr .abp-toast-content {
	color: #fff !important;
}

.rtl #toast-container .toast-close-button,
#toast-container > div.rtl .toast-close-button,
#toast-container .ngx-toastr.rtl .toast-close-button {
	left: 12px;
	right: auto;
	float: none;
}

#toast-container button.toast-close-button {
	-webkit-appearance: none;
	appearance: none;
}

/* Severity colors (ngx `#toast-container` + legacy class hooks) */
#toast-container > .toast-success,
#toast-container .ngx-toastr.toast-success,
.toast-success {
	background-color: #0f766e !important;
	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
}

#toast-container > .toast-error,
#toast-container .ngx-toastr.toast-error,
.toast-error {
	background-color: #b91c1c !important;
	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJK5+mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
	color: #fff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

#toast-container > .toast-info,
#toast-container .ngx-toastr.toast-info,
.toast-info {
	background-color: #2e37a4 !important;
	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzv+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
}

#toast-container > .toast-warning,
#toast-container .ngx-toastr.toast-warning,
.toast-warning {
	background-color: #c2410c !important;
	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65y87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGaJ3H3lW0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFjJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3yict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
}

#toast-container .toast-progress {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	background-color: rgba(0, 0, 0, 0.25);
	opacity: 1;
	border-radius: 0 0 10px 10px;
}

/* Positions */
.toast-center-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}
.toast-top-center {
	top: 0;
	right: 0;
	width: 100%;
}
.toast-bottom-center {
	bottom: 0;
	right: 0;
	width: 100%;
}
.toast-top-full-width {
	top: 0;
	right: 0;
	width: 100%;
}
.toast-bottom-full-width {
	bottom: 0;
	right: 0;
	width: 100%;
}
.toast-top-left {
	top: 12px;
	left: 12px;
}
.toast-top-right {
	top: 12px;
	right: 12px;
}
.toast-bottom-right {
	right: 12px;
	bottom: 12px;
}
.toast-bottom-left {
	bottom: 12px;
	left: 12px;
}

#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div,
#toast-container.toast-top-center > .ngx-toastr,
#toast-container.toast-bottom-center > .ngx-toastr {
	width: min(22rem, calc(100vw - 1.5rem));
	margin-left: auto;
	margin-right: auto;
}

#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div,
#toast-container.toast-top-full-width > .ngx-toastr,
#toast-container.toast-bottom-full-width > .ngx-toastr {
	width: min(96%, 40rem);
	margin-left: auto;
	margin-right: auto;
}

/* ABP toaster: space for dismiss + RTL (matches Angular `styles.scss`) */
.abp-toast .abp-toast-content {
	padding-inline-end: 2.25rem;
}

.abp-toast .abp-toast-content .abp-toast-close-button {
	z-index: 2;
	pointer-events: auto;
	cursor: pointer;
}

html[dir='rtl'] .abp-toast .abp-toast-content .abp-toast-close-button {
	right: auto;
	left: 0;
	padding: 0 0 0 5px;
}

/* Hide empty title row (ABP / ngx often emit an empty `.toast-title`) */
.abp-toast .toast-title:empty,
.abp-toast .abp-toast-title:empty {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

/* Responsive (ngx only) */
@media all and (max-width: 240px) {
	#toast-container > div,
	#toast-container .ngx-toastr {
		padding: 12px 36px 12px 44px;
		width: min(11em, calc(100vw - 1rem));
		min-height: 2.75rem;
		font-size: 0.9375rem;
	}
	#toast-container > div.rtl,
	#toast-container .ngx-toastr.rtl {
		padding: 12px 44px 12px 36px;
	}
	#toast-container .toast-close-button {
		right: 8px;
		top: 8px;
	}
	#toast-container .rtl .toast-close-button {
		left: 8px;
		right: auto;
	}
}

@media all and (min-width: 241px) and (max-width: 480px) {
	#toast-container > div,
	#toast-container .ngx-toastr {
		padding: 14px 38px 14px 48px;
		width: min(18em, calc(100vw - 1.25rem));
		min-height: 3rem;
		font-size: 0.96875rem;
	}
	#toast-container > div.rtl,
	#toast-container .ngx-toastr.rtl {
		padding: 14px 48px 14px 38px;
	}
}

@media all and (min-width: 481px) and (max-width: 768px) {
	#toast-container > div,
	#toast-container .ngx-toastr {
		padding: 15px 40px 15px 50px;
		width: min(25em, calc(100vw - 1.5rem));
		min-height: 3.125rem;
	}
	#toast-container > div.rtl,
	#toast-container .ngx-toastr.rtl {
		padding: 15px 50px 15px 40px;
	}
}
