#spp-container,
#spp-container * {
	box-sizing: border-box;
}

#spp-container {
	position: fixed !important;
	z-index: 2147483000 !important;
	pointer-events: none;
	max-width: 360px;
	width: calc(100% - 32px);
	display: block;
}

#spp-container.spp-pos-bottom-left {
	left: 16px;
	right: auto;
	top: auto;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
#spp-container.spp-pos-bottom-right {
	right: 16px;
	left: auto;
	top: auto;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
#spp-container.spp-pos-top-left {
	left: 16px;
	right: auto;
	bottom: auto;
	top: calc(16px + env(safe-area-inset-top, 0px));
}
#spp-container.spp-pos-top-right {
	right: 16px;
	left: auto;
	bottom: auto;
	top: calc(16px + env(safe-area-inset-top, 0px));
}

.spp-toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	max-width: 100%;
	background: var(--spp-bg, #ffffff);
	color: var(--spp-text, #1a1a1a);
	border-radius: 10px;
	border: var(--spp-border-width, 0px) solid var(--spp-border-color, transparent);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
	padding: 14px 34px 14px 14px;
	pointer-events: auto;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.2s ease, border-width 0.2s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	text-decoration: none;
	position: relative;
	overflow: hidden;
}

.spp-toast.spp-visible {
	opacity: 1;
	transform: translateY(0);
}

#spp-container.spp-pos-top-left .spp-toast,
#spp-container.spp-pos-top-right .spp-toast {
	transform: translateY(-20px);
}
#spp-container.spp-pos-top-left .spp-toast.spp-visible,
#spp-container.spp-pos-top-right .spp-toast.spp-visible {
	transform: translateY(0);
}

.spp-toast-icon {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--spp-icon, var(--spp-accent, #2e7d32));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1;
}

.spp-toast-body {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
}

.spp-toast-title {
	margin: 0 0 2px;
	font-size: 13.5px;
	line-height: 1.4;
	font-weight: 600;
	color: var(--spp-text, #1a1a1a);
	overflow-wrap: break-word;
	word-break: break-word;
	hyphens: auto;
}

.spp-toast-title .spp-accent {
	color: var(--spp-accent, #2e7d32);
}

.spp-toast-meta {
	margin: 0;
	font-size: 11.5px;
	color: var(--spp-sub, #6b7280);
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-wrap: break-word;
	word-break: break-word;
}

.spp-toast-close {
	position: absolute;
	top: 0;
	right: 0;
	width: 34px;
	height: 34px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	color: var(--spp-sub, #6b7280);
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.spp-toast-close:hover,
.spp-toast-close:focus {
	color: var(--spp-text, #1a1a1a);
	outline: none;
}

/* Tablets and large phones */
@media (max-width: 600px) {
	#spp-container {
		width: calc(100% - 24px);
		max-width: 420px;
	}
	#spp-container.spp-pos-bottom-left,
	#spp-container.spp-pos-bottom-right {
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		max-width: none;
	}
	#spp-container.spp-pos-top-left,
	#spp-container.spp-pos-top-right {
		left: 12px;
		right: 12px;
		top: calc(12px + env(safe-area-inset-top, 0px));
		max-width: none;
	}
}

/* Small phones */
@media (max-width: 380px) {
	.spp-toast {
		gap: 10px;
		padding: 12px 30px 12px 12px;
		border-radius: 9px;
	}
	.spp-toast-icon {
		width: 32px;
		height: 32px;
		font-size: 14px;
	}
	.spp-toast-title {
		font-size: 12.5px;
	}
	.spp-toast-meta {
		font-size: 11px;
	}
	.spp-toast-close {
		width: 30px;
		height: 30px;
		font-size: 15px;
	}
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	.spp-toast {
		transition: opacity 0.15s linear;
		transform: none !important;
	}
}
