/**
 * WooCommerce Out of Stock Manager - Styles
 */

/* ============================================
   产品页面缺货提示
   ============================================ */

.wc-osm-out-of-stock-notice {
	background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
	border: 2px solid #ffc107;
	border-radius: 8px;
	padding: 20px 25px;
	margin: 20px 0;
	box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
	animation: wc-osm-fade-in 0.5s ease;
}

.wc-osm-out-of-stock-notice .wc-osm-icon {
	font-size: 24px;
	margin-right: 10px;
	display: inline-block;
	vertical-align: middle;
}

.wc-osm-out-of-stock-notice strong {
	color: #856404;
	font-size: 18px;
	display: block;
	margin-bottom: 8px;
}

.wc-osm-out-of-stock-notice p {
	color: #856404;
	margin: 0;
	font-size: 14px;
}

/* ============================================
   购物车页面通知
   ============================================ */

.wc-osm-cart-notice {
	background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
	border: 2px solid #ffc107 !important;
	border-radius: 8px;
	padding: 20px 25px;
	display: flex;
	align-items: flex-start;
	gap: 15px;
	margin-bottom: 20px;
	animation: wc-osm-fade-in 0.5s ease;
}

.wc-osm-cart-notice::before {
	display: none !important;
}

.wc-osm-cart-notice .wc-osm-icon {
	font-size: 28px;
	flex-shrink: 0;
}

.wc-osm-notice-content {
	flex: 1;
}

.wc-osm-notice-content strong {
	color: #856404;
	font-size: 16px;
	display: block;
	margin-bottom: 8px;
}

.wc-osm-notice-content p {
	color: #856404;
	margin: 0 0 15px 0;
	font-size: 14px;
}

.wc-osm-remove-out-of-stock {
	background: #dc3545 !important;
	color: #fff !important;
	border: none !important;
	padding: 10px 20px !important;
	border-radius: 5px !important;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.3s ease;
}

.wc-osm-remove-out-of-stock:hover {
	background: #c82333 !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.wc-osm-remove-out-of-stock:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* ============================================
   购物车商品行样式
   ============================================ */

.wc-osm-out-of-stock-item {
	position: relative;
	background-color: #fff3cd !important;
	border-left: 4px solid #ffc107 !important;
}

.wc-osm-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	margin-left: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.wc-osm-badge-out-of-stock {
	background: #dc3545;
	color: #fff;
	animation: wc-osm-pulse 2s infinite;
}

.wc-osm-stock-status {
	font-weight: 600;
	padding: 8px 12px;
	border-radius: 5px;
	display: inline-block;
	margin-top: 10px;
}

.wc-osm-stock-status .wc-osm-icon {
	margin-right: 5px;
}

/* ============================================
   结算页面通知
   ============================================ */

.wc-osm-checkout-notice {
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	border: 2px solid #dc3545 !important;
	border-radius: 8px;
	padding: 25px 30px;
	display: flex;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 25px;
	animation: wc-osm-fade-in 0.5s ease;
}

.wc-osm-checkout-notice::before {
	display: none !important;
}

.wc-osm-checkout-notice .wc-osm-icon {
	font-size: 32px;
	flex-shrink: 0;
}

.wc-osm-checkout-notice .wc-osm-notice-content strong {
	color: #721c24;
	font-size: 18px;
	display: block;
	margin-bottom: 10px;
}

.wc-osm-checkout-notice .wc-osm-notice-content p {
	color: #721c24;
	margin: 0 0 10px 0;
	font-size: 14px;
}

.wc-osm-product-list {
	background: rgba(255, 255, 255, 0.5);
	padding: 15px 20px;
	border-radius: 5px;
	margin: 15px 0;
	list-style: none;
}

.wc-osm-product-list li {
	color: #721c24;
	font-weight: 600;
	padding: 5px 0;
	position: relative;
	padding-left: 20px;
}

.wc-osm-product-list li::before {
	content: '✖';
	position: absolute;
	left: 0;
	color: #dc3545;
	font-weight: bold;
}

.wc-osm-actions {
	display: flex;
	gap: 10px;
	margin-top: 15px;
	flex-wrap: wrap;
}

.wc-osm-actions .button {
	padding: 12px 24px !important;
	border-radius: 5px !important;
	font-weight: 600 !important;
	transition: all 0.3s ease;
}

.wc-osm-actions .button:not(.wc-osm-remove-out-of-stock) {
	background: #6c757d !important;
	color: #fff !important;
	border: none !important;
}

.wc-osm-actions .button:not(.wc-osm-remove-out-of-stock):hover {
	background: #5a6268 !important;
	transform: translateY(-2px);
}

/* ============================================
   动画效果
   ============================================ */

@keyframes wc-osm-fade-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes wc-osm-pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.wc-osm-shake {
	animation: wc-osm-shake-animation 0.6s ease;
}

@keyframes wc-osm-shake-animation {
	0%, 100% {
		transform: translateX(0);
	}
	10%, 30%, 50%, 70%, 90% {
		transform: translateX(-10px);
	}
	20%, 40%, 60%, 80% {
		transform: translateX(10px);
	}
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 767px) {
	.wc-osm-cart-notice,
	.wc-osm-checkout-notice {
		flex-direction: column;
		padding: 15px 20px;
	}
	
	.wc-osm-cart-notice .wc-osm-icon,
	.wc-osm-checkout-notice .wc-osm-icon {
		font-size: 24px;
	}
	
	.wc-osm-notice-content strong {
		font-size: 16px !important;
	}
	
	.wc-osm-actions {
		flex-direction: column;
	}
	
	.wc-osm-actions .button {
		width: 100%;
		text-align: center;
	}
	
	.wc-osm-badge {
		display: block;
		margin: 8px 0;
		width: fit-content;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.wc-osm-checkout-notice {
		padding: 20px 25px;
	}
	
	.wc-osm-checkout-notice .wc-osm-icon {
		font-size: 28px;
	}
}

/* ============================================
   打印样式
   ============================================ */

@media print {
	.wc-osm-out-of-stock-notice,
	.wc-osm-cart-notice,
	.wc-osm-checkout-notice,
	.wc-osm-remove-out-of-stock {
		display: none !important;
	}
}
