/**
 * Cbran Subscription — toast notifications (ecosystem pattern)
 */

.cbran-toast-stack {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 10000010 !important;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	max-width: min(420px, calc(100vw - 2rem));
	pointer-events: none;
	isolation: isolate;
}

body.admin-bar .cbran-toast-stack {
	top: calc(32px + 1.25rem);
}

.cbran-toast {
	pointer-events: auto;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-shadow:
		0 18px 40px rgba(15, 23, 42, 0.12),
		0 4px 12px rgba(15, 23, 42, 0.06);
	backdrop-filter: blur(12px);
	transform: translateX(110%);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
	position: relative;
	overflow: hidden;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cbran-toast.is-visible {
	transform: translateX(0);
	opacity: 1;
}

.cbran-toast.is-leaving {
	transform: translateX(110%);
	opacity: 0;
}

.cbran-toast-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cbran-toast-icon .el-icon.cbran-subs-icon,
.cbran-toast-icon .cbran-toast-icon-svg {
	width: 20px;
	height: 20px;
}

.cbran-toast--success .cbran-toast-icon {
	background: #ecfdf5;
	color: #059669;
}

.cbran-toast--error .cbran-toast-icon {
	background: #fef2f2;
	color: #dc2626;
}

.cbran-toast--warning .cbran-toast-icon {
	background: #fffbeb;
	color: #d97706;
}

.cbran-toast--info .cbran-toast-icon {
	background: #eff6ff;
	color: #2563eb;
}

.cbran-toast-body {
	flex: 1;
	min-width: 0;
	padding-top: 0.1rem;
}

.cbran-toast-title {
	margin: 0 0 0.15rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.cbran-toast-message {
	margin: 0;
	font-size: 0.8125rem;
	color: #64748b;
	line-height: 1.45;
}

.cbran-toast-close {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border: none;
	background: transparent;
	border-radius: 8px;
	color: #94a3b8;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease;
}

.cbran-toast-close:hover,
.cbran-toast-close:focus {
	background: #f1f5f9;
	color: #475569;
	outline: none;
}

.cbran-toast-progress {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	border-radius: 0 0 0 14px;
	background: currentColor;
	opacity: 0.35;
	transform-origin: left center;
	animation: cbran-toast-progress linear forwards;
}

.cbran-toast--success .cbran-toast-progress { color: #10b981; }
.cbran-toast--error .cbran-toast-progress { color: #ef4444; }
.cbran-toast--warning .cbran-toast-progress { color: #f59e0b; }
.cbran-toast--info .cbran-toast-progress { color: #3b82f6; }

@keyframes cbran-toast-progress {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

.woocommerce-MyAccount-content .cbran-toast-stack {
	top: 1.25rem;
}

@media (max-width: 782px) {
	body.admin-bar .cbran-toast-stack {
		top: calc(46px + 1rem);
	}

	.cbran-toast-stack {
		right: 0.75rem;
		left: 0.75rem;
		max-width: none;
	}
}
