/* WooCommerce Custom Product Manager Styles */

.woo-cpm-tier-info {
	background: linear-gradient(135deg, #f8fafb 0%, #e8f1f8 100%);
	border: 1px solid #e2e8f0;
	border-left: 4px solid #3b82f6;
	border-radius: 12px;
	padding: 0;
	margin: 24px 0;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	transition: all 0.3s ease;
	overflow: hidden;
}

.woo-cpm-tier-info:hover {
	box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	transform: translateY(-2px);
}

.tier-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.tier-icon {
	background: rgba(255, 255, 255, 0.2);
	padding: 12px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tier-title h4 {
	color: white;
	margin: 0;
	font-size: 20px;
	font-weight: 600;
}

.tier-subtitle {
	color: rgba(255, 255, 255, 0.8);
	margin: 4px 0 0 0;
	font-size: 14px;
}

.tier-details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 0;
}

.gold-tier,
.diamond-tier {
	padding: 24px;
	position: relative;
	transition: all 0.3s ease;
}

.gold-tier {
	background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
	border-right: 1px solid #e2e8f0;
}

.diamond-tier {
	background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(8, 145, 178, 0.05) 100%);
}

.gold-tier:hover,
.diamond-tier:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tier-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 16px;
	width: fit-content;
}

.tier-badge.gold {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: white;
}

.tier-badge.diamond {
	background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
	color: white;
}

.tier-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tier-range {
	font-size: 16px;
	font-weight: 600;
	color: #1f2937;
}

.tier-benefit {
	font-size: 14px;
	color: #6b7280;
	line-height: 1.5;
}

/* Modern Reward Points Checkout Section */
.woo-cpm-reward-checkout-section {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 16px;
	padding: 0;
	margin: 16px 0;
	box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.25);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px;
	background: rgba(255, 255, 255, 0.1);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-icon {
	background: rgba(255, 255, 255, 0.2);
	padding: 12px;
	border-radius: 12px;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
}

.reward-title h4 {
	color: white;
	margin: 0;
	font-size: 20px;
	font-weight: 600;
}

.reward-subtitle {
	color: rgba(255, 255, 255, 0.8);
	margin: 4px 0 0 0;
	font-size: 14px;
}

.reward-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	padding: 24px;
	background: rgba(255, 255, 255, 0.05);
}

.stat-card {
	text-align: center;
	padding: 16px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
	font-size: 24px;
	font-weight: 700;
	color: white;
	margin-bottom: 4px;
}

.stat-label {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.8);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.reward-applied {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px;
	background: rgba(34, 197, 94, 0.15);
	border: 1px solid rgba(34, 197, 94, 0.3);
}

.applied-content {
	display: flex;
	align-items: center;
	gap: 12px;
}

.applied-icon {
	background: rgba(34, 197, 94, 0.2);
	padding: 8px;
	border-radius: 50%;
	color: #22c55e;
	display: flex;
	align-items: center;
	justify-content: center;
}

.applied-details strong {
	color: white;
	font-size: 16px;
	display: block;
}

.applied-details p {
	color: rgba(255, 255, 255, 0.9);
	margin: 4px 0 0 0;
	font-size: 14px;
}

.reward-form {
	padding: 24px;
}

.form-group {
	margin-bottom: 0;
}

.form-label {
	display: block;
	color: white;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 12px;
}

.input-group {
	display: flex;
	gap: 12px;
	align-items: stretch;
}

.form-input {
	flex: 1;
	max-width: 120px;
	padding: 12px 16px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	color: white;
	font-size: 14px;
	transition: all 0.3s ease;
}

.form-input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
	outline: none;
	border-color: rgba(255, 255, 255, 0.4);
	background: rgba(255, 255, 255, 0.15);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-help {
	margin-top: 8px;
}

.help-text {
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
}

/* Modern Account Dashboard */
.woo-cpm-reward-dashboard {
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 0;
	margin: 24px 0;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.dashboard-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.dashboard-icon {
	background: rgba(255, 255, 255, 0.2);
	padding: 12px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dashboard-title h3 {
	color: white;
	margin: 0;
	font-size: 22px;
	font-weight: 600;
}

.dashboard-subtitle {
	color: rgba(255, 255, 255, 0.8);
	margin: 4px 0 0 0;
	font-size: 14px;
}

.dashboard-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0;
}

.stat-card.primary,
.stat-card.secondary {
	padding: 24px;
	display: flex;
	align-items: center;
	gap: 16px;
	transition: all 0.3s ease;
}

.stat-card.primary {
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	border-right: 1px solid #e2e8f0;
}

.stat-card.secondary {
	background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
	background: white;
	padding: 12px;
	border-radius: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
}

.stat-card.primary .stat-icon {
	color: #3b82f6;
}

.stat-card.secondary .stat-icon {
	color: #10b981;
}

.stat-content .stat-value {
	font-size: 28px;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 4px;
}

.stat-content .stat-label {
	font-size: 13px;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.dashboard-info {
	padding: 24px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.info-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
	background: white;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
}

.info-item strong {
	color: #374151;
	font-size: 14px;
}

.info-item span {
	color: #6b7280;
	font-size: 14px;
}

/* Modern Button Styles */
.woo-cpm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
	min-height: 44px;
	gap: 8px;
}

.woo-cpm-button-primary {
	background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
	color: white;
	box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.woo-cpm-button-primary:hover {
	background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
	transform: translateY(-1px);
	box-shadow: 0 8px 15px -3px rgba(59, 130, 246, 0.4);
}

.woo-cpm-button-secondary {
	background: rgba(255, 255, 255, 0.2);
	color: white;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.woo-cpm-button-secondary:hover {
	background: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.5);
}

/* Savings Display */
.woo-cpm-savings-row th,
.woo-cpm-savings-row td {
	background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
	color: #065f46 !important;
	font-weight: 600;
	border-radius: 8px !important;
}

.free-tier-badge {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: white;
	padding: 4px 12px;
	border-radius: 16px;
	font-size: 11px;
	font-weight: 600;
	margin-left: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Dynamic Tier Info */
.woo-cpm-dynamic-tier-info {
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	margin: 20px 0;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	animation: fadeInUp 0.6s ease-out;
}

.tier-dynamic-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.tier-dynamic-icon {
	background: rgba(255, 255, 255, 0.2);
	padding: 8px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tier-dynamic-title h4 {
	color: white;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.tier-dynamic-subtitle {
	color: rgba(255, 255, 255, 0.8);
	margin: 2px 0 0 0;
	font-size: 13px;
}

.tier-dynamic-content {
	padding: 0;
}

.tier-status {
	transition: all 0.3s ease;
}

.tier-status.active {
	background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
	border-top: 3px solid #22c55e;
}

.tier-status.active.diamond {
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	border-top-color: #3b82f6;
}

.tier-status.upgrade-available {
	background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
	border-top: 3px solid #f59e0b;
}

.tier-status.inactive {
	background: #f8fafc;
	border-top: 3px solid #cbd5e1;
}

.tier-status-header {
	padding: 16px 20px 12px 20px;
}

.tier-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tier-status-badge.gold {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: white;
}

.tier-status-badge.diamond {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: white;
}

.tier-status-badge.upgrade {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: white;
}

.tier-benefit-display,
.tier-upgrade-display {
	padding: 0 20px 20px 20px;
}

.benefit-item,
.upgrade-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.benefit-icon {
	background: #22c55e;
	color: white;
	padding: 6px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.benefit-text,
.upgrade-text {
	flex: 1;
}

.benefit-text strong,
.upgrade-text strong {
	display: block;
	color: #1f2937;
	font-size: 14px;
	margin-bottom: 2px;
}

.benefit-text span,
.upgrade-text span {
	color: #6b7280;
	font-size: 12px;
}

.tier-upgrade-btn {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.tier-upgrade-btn:hover {
	background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(217, 119, 6, 0.3);
}

.tier-inactive-content {
	padding: 20px;
	text-align: center;
}

.tier-inactive-content p {
	color: #6b7280;
	margin: 0;
	font-size: 14px;
}

/* Legacy support for old dynamic-tier-info class */
.dynamic-tier-info {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: white;
	border-radius: 12px;
	padding: 16px;
	margin: 16px 0;
	font-weight: 500;
	text-align: center;
	box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
	animation: pulse 3s infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
	}
	50% {
		transform: scale(1.02);
		box-shadow: 0 8px 20px rgba(240, 147, 251, 0.4);
	}
}

/* Notice Styles */
.woo-cpm-notice {
	border-radius: 8px;
	padding: 16px 20px;
	margin: 16px 0;
	border: 1px solid #e2e8f0;
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.woo-cpm-notice.woocommerce-error {
	background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
	border-color: #fca5a5;
	color: #991b1b;
}

.woo-cpm-notice.woocommerce-message {
.woo-cpm-notice.woocommerce-message {
	background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
	border-color: #86efac;
	color: #14532d;
}

/* Quantity Input Enhancements */
.quantity input[type="number"] {
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 16px;
	width: 80px;
	text-align: center;
	font-weight: 500;
	transition: all 0.3s ease;
}

.quantity input[type="number"]:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Admin Settings Styling */
.woo-cpm-admin-settings .form-table th {
	width: 200px;
	padding: 20px 10px 20px 0;
	font-weight: 600;
	color: #374151;
}

.woo-cpm-admin-settings .form-table td {
	padding: 15px 10px;
}

.woo-cpm-admin-settings input[type="number"] {
	width: 100px;
	padding: 8px 12px;
	border: 2px solid #e2e8f0;
	border-radius: 6px;
}

.woo-cpm-admin-settings .description {
	font-style: italic;
	color: #6b7280;
	margin-top: 8px;
	font-size: 13px;
}

/* Loading States */
.woo-cpm-loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.woo-cpm-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 24px;
	margin: -12px 0 0 -12px;
	border: 3px solid #f3f4f6;
	border-top: 3px solid #3b82f6;
	border-radius: 50%;
	animation: woo-cpm-spin 1s linear infinite;
}

@keyframes woo-cpm-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Responsive Design */
@media (max-width: 768px) {
	.tier-details {
		grid-template-columns: 1fr;
	}

	.reward-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 20px;
	}

	.reward-stats {
		grid-template-columns: 1fr;
		gap: 12px;
		padding: 20px;
	}

	.dashboard-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 20px;
	}

	.dashboard-stats {
		grid-template-columns: 1fr;
	}

	.info-grid {
		grid-template-columns: 1fr;
	}

	.input-group {
		flex-direction: column;
		gap: 12px;
	}

	.form-input {
		max-width: none;
	}

	.reward-applied {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.woo-cpm-button {
		width: 100%;
		justify-content: center;
	}

	/* Dynamic Tier Info Mobile */
	.tier-dynamic-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 16px;
	}

	.tier-dynamic-title h4 {
		font-size: 15px;
	}

	.tier-dynamic-subtitle {
		font-size: 12px;
	}

	.tier-status-header {
		padding: 12px 16px 8px 16px;
	}

	.tier-benefit-display,
	.tier-upgrade-display {
		padding: 0 16px 16px 16px;
	}

	.benefit-item,
	.upgrade-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 12px;
	}

	.tier-upgrade-btn {
		width: 100%;
		padding: 10px 16px;
		font-size: 13px;
	}

	.tier-status-badge {
		font-size: 12px;
		padding: 5px 10px;
	}

	.tier-inactive-content {
		padding: 16px;
	}
}

@media (max-width: 480px) {
	.woo-cpm-tier-info,
	.woo-cpm-reward-checkout-section,
	.woo-cpm-reward-dashboard,
	.woo-cpm-dynamic-tier-info {
		margin: 16px -10px;
		border-radius: 12px;
	}

	.woo-cpm-tier-info {
		padding: 20px;
	}

	.reward-header,
	.reward-stats,
	.reward-form,
	.dashboard-header,
	.dashboard-info {
		padding: 16px;
	}

	.stat-card.primary,
	.stat-card.secondary {
		padding: 20px;
	}

	.stat-content .stat-value {
		font-size: 24px;
	}

	.dashboard-title h3 {
		font-size: 20px;
	}

	.reward-title h4 {
		font-size: 18px;
	}

	/* Dynamic Tier Info Mobile Small */
	.tier-dynamic-header {
		padding: 12px;
	}

	.tier-dynamic-title h4 {
		font-size: 14px;
	}

	.tier-dynamic-subtitle {
		font-size: 11px;
	}

	.tier-status-header {
		padding: 10px 12px 6px 12px;
	}

	.tier-benefit-display,
	.tier-upgrade-display {
		padding: 0 12px 12px 12px;
	}

	.benefit-item,
	.upgrade-item {
		padding: 10px;
	}

	.benefit-text strong,
	.upgrade-text strong {
		font-size: 13px;
	}

	.benefit-text span,
	.upgrade-text span {
		font-size: 11px;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.woo-cpm-reward-dashboard {
		background: #1f2937;
		border-color: #374151;
	}

	.dashboard-info {
		background: #111827;
		border-color: #374151;
	}

	.info-item {
		background: #1f2937;
		border-color: #374151;
	}

	.info-item strong {
		color: #f9fafb;
	}

	.info-item span {
		color: #d1d5db;
	}

	.stat-content .stat-value {
		color: #f9fafb;
	}

	.woo-cpm-tier-info {
		background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
		border-color: #374151;
	}

	.woo-cpm-tier-info h4 {
		color: #60a5fa;
	}

	.gold-tier,
	.diamond-tier {
		background: rgba(0, 0, 0, 0.3);
	}
}

/* Animation Enhancements */
.woo-cpm-reward-checkout-section,
.woo-cpm-reward-dashboard,
.woo-cpm-tier-info {
	animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Focus States for Accessibility */
.woo-cpm-button:focus,
.form-input:focus {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
	.woo-cpm-button-primary {
		background: #000;
		color: #fff;
		border: 2px solid #fff;
	}

	.woo-cpm-button-secondary {
		background: #fff;
		color: #000;
		border: 2px solid #000;
	}

	.stat-card {
		border: 2px solid #000;
	}
}

/* Print Styles */
@media print {
	.woo-cpm-reward-checkout-section,
	.woo-cpm-button {
		display: none !important;
	}

	.woo-cpm-reward-dashboard,
	.woo-cpm-tier-info {
		background: white !important;
		color: black !important;
		box-shadow: none !important;
		border: 1px solid #000 !important;
	}
}
