.herd-effect {
	position: fixed;
	z-index: 999990;
	box-sizing: border-box;
	width: min(calc(100vw - 28px), var(--herd-width, 360px));
	max-width: calc(100vw - 28px);
	pointer-events: none;
}

.herd-effect[hidden] {
	display: none;
}

.herd-position-top-left {
	top: 18px;
	left: 18px;
}

.herd-position-top-center {
	top: 18px;
	left: 50%;
	transform: translateX(-50%);
}

.herd-position-top-right {
	top: 18px;
	right: 18px;
}

.herd-position-bottom-left {
	bottom: 18px;
	left: 18px;
}

.herd-position-bottom-center {
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
}

.herd-position-bottom-right {
	right: 18px;
	bottom: 18px;
}

.herd-notification {
	position: relative;
	display: flex;
	width: 100%;
	min-height: 74px;
	align-items: center;
	gap: 13px;
	box-sizing: border-box;
	padding: 14px 40px 14px 14px;
	border: var(--herd-border-width, 1px) solid var(--herd-border, #e5e7eb);
	border-radius: var(--herd-radius, 14px);
	background: var(--herd-bg, #fff);
	box-shadow: 0 14px 38px var(--herd-shadow, rgba(15, 23, 42, 0.22));
	color: var(--herd-text, #1f2937);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: var(--herd-font-size, 14px);
	font-weight: var(--herd-font-weight, 400);
	line-height: 1.45;
	pointer-events: auto;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	overflow-wrap: anywhere;
}

.herd-notification__link {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	color: inherit;
	text-decoration: none;
}

.herd-notification__icon,
.herd-notification__message {
	position: relative;
	z-index: 2;
	pointer-events: none;
}

.herd-notification__icon {
	display: inline-flex;
	width: var(--herd-icon-size, 42px);
	height: var(--herd-icon-size, 42px);
	flex: 0 0 var(--herd-icon-size, 42px);
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 50%;
	background: var(--herd-accent, #16a34a);
	color: var(--herd-icon, #fff);
	font-size: calc(var(--herd-icon-size, 42px) * 0.5);
	line-height: 1;
}

.herd-notification__icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.herd-svg-icon {
	display: block;
	width: 58%;
	height: 58%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.herd-notification__message {
	flex: 1 1 auto;
	min-width: 0;
	white-space: pre-line;
	word-break: normal;
}

.herd-notification__close {
	position: absolute;
	top: 6px;
	right: 7px;
	z-index: 3;
	display: inline-flex;
	width: 28px;
	height: 28px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--herd-close, #6b7280);
	font: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.herd-notification__close:hover {
	background: rgba(127, 127, 127, 0.12);
}

.herd-notification__close:focus-visible,
.herd-notification__link:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: 2px;
}

.herd-is-visible.herd-in-fade {
	animation: herd-fade-in 300ms ease both;
}

.herd-is-visible.herd-in-slide-up {
	animation: herd-slide-up 340ms ease both;
}

.herd-is-visible.herd-in-slide-down {
	animation: herd-slide-down 340ms ease both;
}

.herd-is-visible.herd-in-slide-left {
	animation: herd-slide-left 340ms ease both;
}

.herd-is-visible.herd-in-slide-right {
	animation: herd-slide-right 340ms ease both;
}

.herd-is-visible.herd-in-zoom {
	animation: herd-zoom-in 300ms ease both;
}

.herd-is-hiding.herd-out-fade,
.herd-is-hiding.herd-out-slide-up,
.herd-is-hiding.herd-out-slide-down,
.herd-is-hiding.herd-out-slide-left,
.herd-is-hiding.herd-out-slide-right,
.herd-is-hiding.herd-out-zoom {
	animation: herd-fade-out 300ms ease both;
}

@keyframes herd-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes herd-fade-out {
	from { opacity: 1; }
	to { opacity: 0; }
}

@keyframes herd-slide-up {
	from { opacity: 0; transform: translateY(30px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes herd-slide-down {
	from { opacity: 0; transform: translateY(-30px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes herd-slide-left {
	from { opacity: 0; transform: translateX(34px); }
	to { opacity: 1; transform: translateX(0); }
}

@keyframes herd-slide-right {
	from { opacity: 0; transform: translateX(-34px); }
	to { opacity: 1; transform: translateX(0); }
}

@keyframes herd-zoom-in {
	from { opacity: 0; transform: scale(0.88); }
	to { opacity: 1; transform: scale(1); }
}

@media (max-width: 520px) {
	.herd-effect {
		right: max(12px, env(safe-area-inset-right));
		left: max(12px, env(safe-area-inset-left));
		width: auto;
		max-width: none;
		transform: none;
	}

	.herd-position-top-left,
	.herd-position-top-center,
	.herd-position-top-right {
		top: max(12px, env(safe-area-inset-top));
	}

	.herd-position-bottom-left,
	.herd-position-bottom-center,
	.herd-position-bottom-right {
		bottom: max(12px, env(safe-area-inset-bottom));
	}

	.herd-notification {
		min-height: 66px;
		gap: 10px;
		padding: 11px 44px 11px 11px;
		border-radius: min(var(--herd-radius, 14px), 20px);
		font-size: clamp(12px, 3.7vw, min(var(--herd-font-size, 14px), 15px));
		line-height: 1.4;
	}

	.herd-notification__icon {
		width: clamp(34px, 11vw, min(var(--herd-icon-size, 42px), 48px));
		height: clamp(34px, 11vw, min(var(--herd-icon-size, 42px), 48px));
		flex-basis: clamp(34px, 11vw, min(var(--herd-icon-size, 42px), 48px));
	}

	.herd-notification__close {
		top: 50%;
		right: 6px;
		width: 36px;
		height: 44px;
		transform: translateY(-50%);
		font-size: 22px;
	}
}

@media (max-width: 360px) {
	.herd-effect {
		right: max(8px, env(safe-area-inset-right));
		left: max(8px, env(safe-area-inset-left));
	}

	.herd-notification {
		gap: 8px;
		padding: 10px 40px 10px 10px;
	}

	.herd-notification__close {
		right: 3px;
		width: 34px;
	}
}

@media (max-height: 480px) and (orientation: landscape) {
	.herd-position-top-left,
	.herd-position-top-center,
	.herd-position-top-right {
		top: max(8px, env(safe-area-inset-top));
	}

	.herd-position-bottom-left,
	.herd-position-bottom-center,
	.herd-position-bottom-right {
		bottom: max(8px, env(safe-area-inset-bottom));
	}

	.herd-notification {
		min-height: 58px;
		padding-top: 8px;
		padding-bottom: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.herd-effect {
		animation: none !important;
	}
}
