.csp-bubble {
	position: absolute;
	bottom: calc(100% + 14px);
	right: 8px;
	width: max-content;
	max-width: min(300px, calc(100vw - 24px));
	background: #fff;
	color: #191919;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 18px 18px 6px 18px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 14px 36px rgba(0, 0, 0, 0.18);
	padding: 12px 14px 12px 34px;
	font-family: inherit;
	font-size: 13.5px;
	line-height: 1.8;
	direction: rtl;
	text-align: right;
	cursor: pointer;
	z-index: 100000;
	transform-origin: bottom right;
	animation: csp-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.csp-bubble::after {
	content: '';
	position: absolute;
	bottom: -8px;
	right: 22px;
	width: 0;
	height: 0;
	border-left: 9px solid transparent;
	border-right: 9px solid transparent;
	border-top: 9px solid #fff;
	filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.05));
}

.csp-body {
	display: flex;
	align-items: center;
	gap: 10px;
	pointer-events: auto;
}

.csp-icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 19px;
	background: linear-gradient(135deg, #fff1f0, #ffddd9);
	box-shadow: inset 0 0 0 1px rgba(211, 47, 47, 0.12);
}

.csp-bubble.csp-done .csp-icon {
	background: linear-gradient(135deg, #eef9ef, #d9f0db);
	box-shadow: inset 0 0 0 1px rgba(46, 125, 50, 0.15);
}

.csp-text {
	min-width: 0;
}

.csp-text strong {
	font-weight: 800;
	color: #d32f2f;
	white-space: nowrap;
}

.csp-bubble.csp-done .csp-text strong {
	color: #2e7d32;
}

.csp-close {
	position: absolute;
	top: 8px;
	left: 8px;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	color: #888;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease;
}

.csp-close:hover {
	background: rgba(0, 0, 0, 0.1);
	color: #222;
}

.csp-bubble.csp-fade-out {
	animation: csp-fade-out 0.3s ease-in forwards;
}

@keyframes csp-pop {
	0% {
		opacity: 0;
		transform: scale(0.7) translateY(14px);
	}
	100% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@keyframes csp-fade-out {
	0% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
	100% {
		opacity: 0;
		transform: scale(0.9) translateY(8px);
	}
}

@media (max-width: 768px) {
	.csp-bubble {
		bottom: calc(100% + 12px);
		right: 4px;
		max-width: min(260px, calc(100vw - 20px));
		font-size: 12.5px;
		line-height: 1.75;
		padding: 10px 12px 10px 30px;
		border-radius: 16px 16px 5px 16px;
	}

	.csp-icon {
		width: 34px;
		height: 34px;
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.csp-bubble {
		animation: none;
	}
	.csp-bubble.csp-fade-out {
		animation: none;
		opacity: 0;
	}
}
