/* ================================================================
   Suhaku — CartToast
   ================================================================ */

/* ── Container (fixed, bottom-centre) ──────────────────────── */
#ct-container {
	position: fixed;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 99999;
	pointer-events: none;
	width: max-content;
	max-width: calc(100vw - 32px);
}

/* ── Individual toast ───────────────────────────────────────── */
.ct-toast {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 380px;
	max-width: 480px;
	padding: 8px 12px 8px 8px;
	background: #fff;
	border: 0.5px solid rgba(0, 0, 0, 0.10);
	border-radius: 12px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	pointer-events: all;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 200ms ease-out, transform 200ms ease-out;
}

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

.ct-toast--out {
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 160ms ease-in, transform 160ms ease-in;
}

/* ── Thumbnail ──────────────────────────────────────────────── */
.ct-thumb {
	position: relative;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: #f5f5f0;
	overflow: hidden;
}

.ct-thumb--icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ct-thumb img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	display: block;
}

/* Fade overlay for "removed" variant */
.ct-thumb__fade {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.45);
	border-radius: inherit;
}

/* Quantity badge */
.ct-thumb__qty {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #1a1a1a;
	color: #fff;
	font-family: 'Avenir Next', sans-serif;
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	padding: 2px 4px;
	border-radius: 50px;
	white-space: nowrap;
}

/* ── Text block ─────────────────────────────────────────────── */
.ct-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ct-eyebrow {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'Avenir Next', sans-serif;
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #666;
	line-height: 1;
}

.ct-name {
	font-family: 'Avenir Next', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

/* ── Action button ──────────────────────────────────────────── */
.ct-action {
	flex-shrink: 0;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 10px 22px;
	font-family: 'Avenir Next', sans-serif;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 0.15s ease;
	line-height: 1;
}

.ct-action:hover {
	opacity: 0.78;
}

/* ── Dismiss button ─────────────────────────────────────────── */
.ct-dismiss {
	flex-shrink: 0;
	background: none;
	border: none;
	padding: 4px 0 4px 6px;
	color: #aaa;
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: color 0.15s ease;
	line-height: 1;
}

.ct-dismiss:hover {
	color: #1a1a1a;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
	#ct-container {
		top: 16px;
		bottom: auto;
		left: 16px;
		right: 16px;
		transform: none;
		width: auto;
		max-width: none;
	}

	.ct-toast {
		min-width: 0;
		width: 100%;
	}

	.ct-action {
		padding: 9px 14px;
	}
}
