/**
 * Cart Toast Notification Styles
 * Migrado desde functions.php líneas 663-883
 */

/* Animations */
@keyframes t3d-slide-in {
	from {
		transform: translateX(400px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes t3d-slide-out {
	from {
		transform: translateX(0);
		opacity: 1;
	}
	to {
		transform: translateX(400px);
		opacity: 0;
	}
}

@keyframes t3d-spin {
	to { transform: rotate(360deg); }
}

/* Toast Container */
#t3d-toast {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 999999;
	background: #fff;
	color: #333;
	padding: 16px 20px;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
	font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	display: none;
	gap: 12px;
	align-items: center;
	max-width: min(380px, calc(100vw - 48px));
	border-left: 4px solid #10b981;
	animation: t3d-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#t3d-toast.hiding {
	animation: t3d-slide-out 0.3s cubic-bezier(0.5, 0, 0.75, 0);
}

/* Check Icon */
#t3d-toast .icon-check {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #10b981;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

#t3d-toast .icon-check::after {
	content: '';
	width: 6px;
	height: 11px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	position: relative;
	top: -1px;
}

/* Toast Content */
#t3d-toast .toast-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

#t3d-toast .toast-title {
	font-weight: 600;
	color: #1a1a1a;
	font-size: 15px;
}

#t3d-toast .toast-message {
	font-size: 14px;
	color: #666;
}

/* Toast Actions */
#t3d-toast .toast-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-left: 8px;
}

/* View cart button styling */
#t3d-toast .view-cart-btn {
	color: #10b981;
	background: none;
	border: none;
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
	transition: color 0.2s;
	cursor: pointer;
	padding: 0;
	font-family: inherit;
}

#t3d-toast .view-cart-btn:hover {
	color: #059669;
}

/* Close Button */
#t3d-toast .close-btn {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	transition: all 0.2s;
	flex: 0 0 auto;
}

#t3d-toast .close-btn:hover {
	background: #f3f4f6;
	color: #666;
}

#t3d-toast .close-btn::before,
#t3d-toast .close-btn::after {
	content: '';
	position: absolute;
	width: 12px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

#t3d-toast .close-btn::before {
	transform: rotate(45deg);
}

#t3d-toast .close-btn::after {
	transform: rotate(-45deg);
}

/* Loading Spinner */
.t3d-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: t3d-spin 0.6s linear infinite;
	vertical-align: middle;
}

/* Add to Cart Button Loading State */
.single_add_to_cart_button.loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.single_add_to_cart_button.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -8px 0 0 -8px;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: t3d-spin 0.6s linear infinite;
}

/* Responsive: Mobile */
@media (max-width: 768px) {
	#t3d-toast {
		top: auto;
		bottom: 24px;
		right: 16px;
		left: 16px;
		max-width: none;
	}

	@keyframes t3d-slide-in {
		from {
			transform: translateY(100px);
			opacity: 0;
		}
		to {
			transform: translateY(0);
			opacity: 1;
		}
	}

	@keyframes t3d-slide-out {
		from {
			transform: translateY(0);
			opacity: 1;
		}
		to {
			transform: translateY(100px);
			opacity: 0;
		}
	}
}

/* Chat Widget Overlap Prevention */
@media (min-width: 769px) {
	body.has-chat-widget #t3d-toast {
		right: 100px;
	}
}
