/**
 * Frontend styles.
 *
 * @package UCMP
 */

.ucmp-coupons-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin: 20px 0;
}

.ucmp-coupon-card {
	border: 2px dashed #ddd;
	border-radius: 12px;
	padding: 20px;
	text-align: center;
	background: #fff;
	transition: all 0.3s;
}

.ucmp-coupon-card:hover {
	border-color: #6366f1;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.ucmp-coupon-code {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 2px;
	color: #6366f1;
	background: #eef2ff;
	padding: 8px 16px;
	border-radius: 8px;
	display: inline-block;
	margin-bottom: 12px;
	font-family: 'Courier New', monospace;
}

.ucmp-coupon-amount {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 8px;
}

.ucmp-coupon-expiry {
	font-size: 13px;
	color: #64748b;
	margin-bottom: 12px;
}

.ucmp-coupon-expired .ucmp-coupon-code { background: #fee2e2; color: #991b1b; }
.ucmp-coupon-used .ucmp-coupon-code { background: #e2e8f0; color: #475569; }

.ucmp-coupon-status {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	color: #64748b;
}

/* Wallet */
.ucmp-wallet-balance-card {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
}

.ucmp-wallet-amount {
	font-size: 36px;
	font-weight: 700;
}

.ucmp-transactions-table,
.ucmp-referrals-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;
}

.ucmp-transactions-table th,
.ucmp-referrals-table th {
	background: #f8fafc;
	padding: 10px 16px;
	text-align: left;
	font-weight: 600;
	font-size: 13px;
}

.ucmp-transactions-table td,
.ucmp-referrals-table td {
	padding: 10px 16px;
	border-bottom: 1px solid #e2e8f0;
}

.ucmp-tx-credit { color: #10b981; font-weight: 600; }
.ucmp-tx-debit { color: #ef4444; font-weight: 600; }

/* Badges */
.ucmp-badges-grid {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin: 16px 0;
}

.ucmp-badge {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #78350f;
	padding: 8px 16px;
	border-radius: 20px;
	font-weight: 600;
	font-size: 13px;
}

/* Banners */
.ucmp-cart-banner,
.ucmp-checkout-banner {
	background: linear-gradient(135deg, #eef2ff, #e0e7ff);
	border: 1px solid #c7d2fe;
	border-radius: 12px;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.ucmp-banner-icon { font-size: 28px; }

/* Exit popup */
.ucmp-exit-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ucmp-exit-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}

.ucmp-exit-content {
	position: relative;
	background: #fff;
	border-radius: 16px;
	padding: 40px;
	max-width: 480px;
	text-align: center;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.ucmp-exit-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #64748b;
}

.ucmp-exit-code code {
	font-size: 28px;
	background: #eef2ff;
	padding: 12px 24px;
	border-radius: 8px;
	display: inline-block;
	margin: 16px 0;
	letter-spacing: 3px;
	color: #6366f1;
}

/* Floating widget */
.ucmp-floating-coupon {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 9999;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
	min-width: 260px;
}

.ucmp-floating-header {
	background: #6366f1;
	color: #fff;
	padding: 10px 16px;
	border-radius: 12px 12px 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
}

.ucmp-close-floating {
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
}

.ucmp-floating-body {
	padding: 16px;
	text-align: center;
}

/* Copy button */
.ucmp-copy-btn {
	cursor: pointer;
	font-size: 13px;
}

/* Sticky coupon */
.ucmp-sticky-coupon {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	background: #6366f1;
	color: #fff;
	padding: 10px 20px;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-weight: 500;
}

.ucmp-close-sticky {
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	margin-left: auto;
}

/* Recent popup */
.ucmp-recent-popup {
	position: fixed;
	bottom: 20px;
	left: 20px;
	background: #fff;
	padding: 12px 20px;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
	font-size: 13px;
	z-index: 999;
	animation: ucmpSlideUp 0.5s ease;
}

@keyframes ucmpSlideUp {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Referral */
.ucmp-referral-link-box {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.ucmp-referral-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 14px;
}

/* Status */
.ucmp-status { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.ucmp-status-completed { background: #d1fae5; color: #065f46; }
.ucmp-status-pending { background: #fef3c7; color: #92400e; }

/* Points/Level */
.ucmp-rewards-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.ucmp-reward-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	text-align: center;
}

.ucmp-points-value {
	font-size: 36px;
	font-weight: 700;
	color: #6366f1;
}

.ucmp-level-value {
	font-size: 24px;
	font-weight: 700;
	text-transform: uppercase;
}

.ucmp-level-bronze { color: #92400e; }
.ucmp-level-silver { color: #6b7280; }
.ucmp-level-gold { color: #d97706; }
.ucmp-level-platinum { color: #6366f1; }
.ucmp-level-diamond { color: #06b6d4; }

/* Mini cart suggestion */
.ucmp-mini-cart-suggestion {
	background: #eef2ff;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 12px;
	text-align: center;
	margin: 8px 0;
	color: #4f46e5;
	font-weight: 500;
}

@media (max-width: 768px) {
	.ucmp-coupons-grid { grid-template-columns: 1fr; }
	.ucmp-cart-banner,
	.ucmp-checkout-banner { flex-direction: column; text-align: center; }
}
