.ne-dialog-open,
.ne-dialog-open body {
	overflow: hidden;
}

.ne-dialog-host[hidden] {
	display: none !important;
}

.ne-dialog-overlay {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(0, 0, 0, .58);
	backdrop-filter: blur(5px);
	animation: neDialogOverlayIn .16s ease-out both;
}

.ne-dialog {
	width: min(420px, 100%);
	max-height: min(720px, calc(100vh - 48px));
	overflow: auto;
	color: #ddd;
	background: #202020;
	border: 1px solid #3d3d3d;
	border-radius: 12px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .46);
	animation: neDialogIn .2s cubic-bezier(.2, .8, .2, 1) both;
}

.ne-dialog__header,
.ne-dialog__body,
.ne-dialog__actions {
	padding: 14px 16px;
}

.ne-dialog__header {
	padding-bottom: 6px;
	background: transparent;
}

.ne-dialog__title {
	margin: 0;
	color: #ccc;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 400;
}

.ne-dialog__body {
	display: grid;
	gap: 10px;
	padding-top: 6px;
	padding-bottom: 16px;
}

.ne-dialog__message {
	color: #bdbdbd;
	font-size: 13px;
	line-height: 1.45;
	white-space: pre-wrap;
}

.ne-dialog__field {
	display: grid;
	gap: 7px;
}

.ne-dialog__label {
	color: #d6d6d6;
	font-size: 12px;
	font-weight: 600;
}

.ne-dialog .ne-dialog__input {
	box-sizing: border-box;
	width: 100%;
}

textarea.ne-dialog__input {
	resize: vertical;
}

.ne-dialog__error {
	display: grid;
}

.ne-dialog__error[hidden] {
	display: none !important;
}

.ne-dialog__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
	padding-top: 0;
	padding-bottom: 16px;
}

.ne-dialog__button,
.ne-toast__close {
	font: inherit;
	cursor: pointer;
}

.ne-dialog .ne-dialog__button {
	min-height: 34px;
}

@keyframes neDialogOverlayIn {
	from { opacity: 0; }
}

@keyframes neDialogIn {
	from {
		opacity: 0;
		transform: translateY(8px) scale(.98);
	}
}

.ne-dialog__button:focus-visible,
.ne-toast__close:focus-visible {
	outline: 2px solid #f0b65d;
	outline-offset: 2px;
}

.ne-dialog.is-loading .ne-dialog__button,
.ne-dialog.is-loading .ne-dialog__input {
	cursor: wait;
	opacity: .65;
}

.ne-toast-region {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 10070;
	display: grid;
	width: min(380px, calc(100vw - 40px));
	gap: 10px;
	pointer-events: none;
}

.ne-toast {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: start;
	gap: 12px;
	padding: 12px 13px;
	color: #ddd;
	background: #242424;
	border: 1px solid #444;
	border-left: 4px solid #777;
	border-radius: 2px;
	box-shadow: 0 12px 35px rgba(0, 0, 0, .36);
	pointer-events: auto;
	animation: neToastIn .18s ease-out;
}

.ne-toast.tone-success {
	border-left-color: #59a96f;
}

.ne-toast.tone-warning {
	border-left-color: #e1a343;
}

.ne-toast.tone-error {
	border-left-color: #d45a5a;
}

.ne-toast.is-leaving {
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease;
}

.ne-toast__message {
	font-size: 13px;
	line-height: 1.45;
	white-space: pre-wrap;
}

.ne-toast__close {
	padding: 0;
	color: #aaa;
	background: none;
	border: 0;
	font-size: 19px;
	line-height: 1;
}

.ne-inline-alert {
	display: grid;
	gap: 4px;
}

.ne-inline-alert__title {
	color: inherit;
}

.ne-inline-alert__message {
	line-height: 1.45;
}

@keyframes neToastIn {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

@media (max-width: 600px) {
	.ne-dialog-overlay {
		align-items: end;
		padding: 12px;
	}

	.ne-dialog {
		max-height: calc(100vh - 24px);
	}

	.ne-dialog__actions {
		flex-direction: column-reverse;
	}

	.ne-dialog__button {
		width: 100%;
	}

	.ne-toast-region {
		top: 12px;
		right: 12px;
		width: calc(100vw - 24px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ne-dialog-overlay,
	.ne-dialog,
	.ne-toast,
	.ne-toast.is-leaving {
		animation: none;
		transition: none;
	}
}
