/**
 * Purchase toast – front-end styles.
 */

.solus-purchase-toast {
	--spt-primary: #55a61d;
	--spt-primary-dark: #458a17;
	--spt-text: #333333;
	--spt-text-light: #888888;
	--spt-white: #ffffff;
	--spt-radius: 10px;

	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 9990;
	width: min(320px, calc(100vw - 32px));
	background: var(--spt-white);
	border: 1px solid var(--spt-primary);
	border-radius: var(--spt-radius);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
	overflow: hidden;
	transform: translateY(calc(100% + 24px));
	opacity: 0;
	pointer-events: none;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.solus-purchase-toast.is-visible {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.solus-purchase-toast[hidden] {
	display: block;
}

.solus-purchase-toast__close {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--spt-primary);
	color: var(--spt-white);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.solus-purchase-toast__close:hover,
.solus-purchase-toast__close:focus {
	background: var(--spt-primary-dark);
	outline: none;
}

.solus-purchase-toast__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 36px 12px 12px;
	color: inherit;
	text-decoration: none;
}

.solus-purchase-toast__link:hover {
	color: inherit;
}

.solus-purchase-toast__image {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 6px;
	object-fit: cover;
	background: #f3f3f3;
}

.solus-purchase-toast__content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.solus-purchase-toast__label {
	font-size: 13px;
	font-weight: 700;
	color: var(--spt-text);
	line-height: 1.3;
}

.solus-purchase-toast__name {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--spt-text);
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.solus-purchase-toast__time {
	font-size: 12px;
	color: var(--spt-text-light);
	line-height: 1.3;
}

@media (max-width: 480px) {
	.solus-purchase-toast {
		left: 12px;
		bottom: 12px;
		width: calc(100vw - 24px);
	}
}
