/**
 * wLoyalty Pro – Frontend Styles
 *
 * All frontend loyalty styles. No inline CSS.
 * Loaded only on pages where needed via wp_enqueue_style().
 */

/* ── EARN BANNER ─────────────────────────────────────────── */
.wlp-earn-notice {
	background: #f0fff4;
	border: 1px solid #bbf7d0;
	border-left: 4px solid #16a34a;
	border-radius: 8px;
	color: #15803d;
	font-size: 14px;
	font-weight: 600;
	padding: 12px 16px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ── PRODUCT POINTS BADGE ────────────────────────────────── */
.wlp-product-points {
	color: #f59e0b;
	font-size: 13px;
	font-weight: 600;
	margin: 6px 0 10px;
	display: block;
}

.wlp-loop-points-badge {
	color: #f59e0b;
	font-size: 12px;
	font-weight: 600;
	display: block;
	margin-top: 4px;
}

/* ── POINTS-ONLY PRODUCT PRICE ───────────────────────────── */
.wlp-points-price {
	background: #fef3c7;
	border: 1px solid #fbbf24;
	border-radius: 8px;
	padding: 12px 16px;
	margin: 12px 0;
	display: inline-block;
}

.wlp-points-price .wlp-point-cost {
	font-size: 22px;
	font-weight: 800;
	color: #f59e0b;
}

.wlp-points-price .wlp-point-label {
	color: #92400e;
	font-size: 14px;
	margin-left: 6px;
}

.wlp-points-price .wlp-balance-ok {
	color: #16a34a;
	font-size: 13px;
	margin-top: 4px;
	display: block;
}

.wlp-points-price .wlp-balance-short {
	color: #dc2626;
	font-size: 13px;
	margin-top: 4px;
	display: block;
}

/* ── REDEMPTION WIDGET ───────────────────────────────────── */
.wlp-redeem-box,
.wlp-redeem-widget {
	background: #fff;
	border: 1px solid #fde68a;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 16px;
}

.wlp-redeem-box__head {
	background: #fef3c7;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 14px;
	color: #92400e;
}

.wlp-redeem-box__body {
	padding: 14px 16px;
}

.wlp-balance-line {
	font-size: 13px;
	color: #374151;
	margin-bottom: 8px;
}

.wlp-balance-line strong {
	color: #16a34a;
}

.wlp-earn-info-bar {
	background: #f0fdf4;
	border-left: 3px solid #16a34a;
	padding: 8px 10px;
	font-size: 12px;
	color: #15803d;
	margin-bottom: 10px;
}

.wlp-input-row {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}

.wlp-points-input {
	flex: 1;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 14px;
}

.wlp-btn-apply {
	background: #16a34a;
	color: #fff;
	border: none;
	padding: 9px 16px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

.wlp-btn-apply:hover {
	background: #15803d;
}

.wlp-btn-remove {
	background: #ef4444;
	color: #fff;
	border: none;
	padding: 9px 14px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

.wlp-btn-remove:hover {
	background: #dc2626;
}

.wlp-discount-applied {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-left: 3px solid #16a34a;
	padding: 10px 12px;
	font-size: 13px;
	color: #15803d;
	border-radius: 6px;
	margin-top: 8px;
}

.wlp-redeem-max-note {
	font-size: 11px;
	color: #94a3b8;
	margin-top: 6px;
}

/* ── ORDER POINTS SUMMARY ────────────────────────────────── */
.wlp-order-loyalty-box {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 16px;
	margin-top: 20px;
}

.wlp-order-loyalty-box h3 {
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 12px;
}

.wlp-loyalty-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f8fafc;
	font-size: 13px;
}

.wlp-loyalty-row:last-child {
	border-bottom: none;
}

.wlp-loyalty-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	flex-shrink: 0;
}

.wlp-loyalty-icon--earned {
	background: #dcfce7;
}

.wlp-loyalty-icon--redeemed {
	background: #fee2e2;
}

.wlp-loyalty-icon--balance {
	background: #dbeafe;
}

.wlp-pts-earned {
	color: #16a34a;
	font-weight: 700;
}

.wlp-pts-redeemed {
	color: #ef4444;
	font-weight: 700;
}

.wlp-pts-balance {
	font-weight: 700;
	color: #1e293b;
}

.wlp-earn-trophy {
	background: #f0fdf4;
	border-radius: 10px;
	padding: 14px 16px;
	margin-top: 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.wlp-earn-trophy__icon {
	font-size: 28px;
}

.wlp-earn-trophy__text {
	font-size: 14px;
	font-weight: 600;
	color: #15803d;
}

.wlp-earn-trophy__pts {
	color: #16a34a;
}

/* ── MY ACCOUNT ──────────────────────────────────────────── */
.wlp-myaccount-wrap {
	padding: 0;
}

.wlp-balance-card {
	background: linear-gradient( 135deg, #1e3a8a, #2563eb );
	border-radius: 16px;
	padding: 24px 28px;
	color: #fff;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.wlp-balance-card__pts {
	font-size: 36px;
	font-weight: 800;
}

.wlp-balance-card__sub {
	font-size: 12px;
	opacity: 0.7;
	margin-top: 2px;
}

.wlp-balance-card__value {
	font-size: 28px;
	font-weight: 800;
	text-align: right;
}

.wlp-how-it-works {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 12px;
	margin-bottom: 20px;
}

.wlp-hiw-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px;
	text-align: center;
}

.wlp-hiw-card__num {
	font-size: 24px;
	font-weight: 800;
	color: #1e3a8a;
}

.wlp-hiw-card__label {
	font-size: 12px;
	color: #94a3b8;
	margin-top: 4px;
}

.wlp-tier-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
}

.wlp-coupon-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid #f1f5f9;
	font-size: 13px;
}

.wlp-coupon-row:last-child {
	border-bottom: none;
}

.wlp-coupon-status--active {
	background: #dcfce7;
	color: #16a34a;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
}

.wlp-coupon-status--used {
	background: #f3f4f6;
	color: #6b7280;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
}

.wlp-coupon-status--expired {
	background: #fee2e2;
	color: #dc2626;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
}

.wlp-txn-table {
	width: 100%;
	border-collapse: collapse;
}

.wlp-txn-table th {
	padding: 10px 14px;
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #94a3b8;
	border-bottom: 2px solid #f1f5f9;
}

.wlp-txn-table td {
	padding: 10px 14px;
	font-size: 13px;
	border-bottom: 1px solid #f8fafc;
}

.wlp-txn-plus {
	color: #16a34a;
	font-weight: 700;
}

.wlp-txn-minus {
	color: #ef4444;
	font-weight: 700;
}

/* ── GIFT POINTS ─────────────────────────────────────────── */
.wlp-gift-box {
	background: #fef3c7;
	border: 1px solid #fbbf24;
	border-radius: 12px;
	padding: 20px;
	margin-top: 24px;
}

.wlp-gift-box__title {
	font-weight: 700;
	font-size: 15px;
	color: #92400e;
	margin-bottom: 8px;
}

.wlp-gift-box__desc {
	font-size: 13px;
	color: #78350f;
	margin-bottom: 14px;
}

.wlp-gift-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.wlp-gift-input {
	flex: 1;
	min-width: 180px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 13px;
}

.wlp-gift-amount {
	width: 90px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 13px;
}

.wlp-btn-gift {
	background: #f59e0b;
	color: #fff;
	border: none;
	padding: 9px 18px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

.wlp-btn-gift:hover {
	background: #d97706;
}

.wlp-gift-msg {
	margin-top: 10px;
	font-size: 13px;
}

/* ── FLASH EVENT BANNER ──────────────────────────────────── */
.wlp-flash-banner {
	background: linear-gradient( 135deg, #f59e0b, #d97706 );
	color: #fff;
	text-align: center;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	position: relative;
	z-index: 9999;
}

.wlp-flash-banner em {
	background: rgba( 255, 255, 255, 0.2 );
	padding: 2px 8px;
	border-radius: 4px;
	font-style: normal;
	margin: 0 4px;
}

/* ── FLOATING WIDGET ─────────────────────────────────────── */
#wlp-fw-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #f59e0b;
	border: none;
	cursor: pointer;
	z-index: 9998;
	box-shadow: 0 4px 16px rgba( 245, 158, 11, 0.45 );
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s;
}

#wlp-fw-btn:hover {
	transform: scale( 1.1 );
}

#wlp-fw-btn svg {
	width: 26px;
	height: 26px;
	fill: #fff;
}

#wlp-fw-panel {
	position: fixed;
	bottom: 90px;
	right: 24px;
	width: 300px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba( 0, 0, 0, 0.18 );
	z-index: 9997;
	overflow: hidden;
	display: none;
	opacity: 0;
	transform: translateY( 10px );
	transition: opacity 0.2s, transform 0.2s;
}

#wlp-fw-panel.wlp-open {
	display: block;
	opacity: 1;
	transform: translateY( 0 );
}

.wlp-fw-head {
	background: linear-gradient( 135deg, #1a1a2e, #2d1a00 );
	color: #fff;
	padding: 18px 20px;
}

.wlp-fw-head img {
	width: 36px;
	height: 36px;
	border-radius: 8px;
}

.wlp-fw-pts {
	font-size: 22px;
	font-weight: 800;
	color: #f59e0b;
}

.wlp-fw-sub {
	font-size: 11px;
	color: rgba( 255, 255, 255, 0.6 );
}

.wlp-fw-body {
	padding: 14px 16px;
}

.wlp-fw-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid #f3f4f6;
	font-size: 13px;
	color: #374151;
}

.wlp-fw-row:last-child {
	border-bottom: none;
}

.wlp-fw-icon {
	width: 28px;
	height: 28px;
	background: #fef3c7;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	flex-shrink: 0;
}

.wlp-fw-flash-row {
	background: #fef3c7;
	border-radius: 8px;
	padding: 8px 10px;
	border: none;
	margin-bottom: 4px;
}

.wlp-fw-progress-wrap {
	width: 100%;
	height: 6px;
	background: #f3f4f6;
	border-radius: 3px;
	overflow: hidden;
	margin-top: 6px;
}

.wlp-fw-progress-bar {
	height: 100%;
	background: #f59e0b;
	border-radius: 3px;
	transition: width 0.3s;
}

.wlp-fw-foot {
	padding: 12px 16px;
	border-top: 1px solid #f3f4f6;
}

.wlp-fw-foot a {
	display: block;
	text-align: center;
	background: #f59e0b;
	color: #fff;
	padding: 10px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.wlp-fw-foot a:hover {
	background: #d97706;
}

/* ── REWARDS STORE ───────────────────────────────────────── */
.wlp-rewards-store {
	display: grid;
	gap: 20px;
	margin: 20px 0;
}

.wlp-rs-card {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	text-align: center;
}

.wlp-rs-card__img {
	width: 100%;
	object-fit: cover;
}

.wlp-rs-card__body {
	padding: 14px;
}

.wlp-rs-card__name {
	font-weight: 600;
	font-size: 14px;
	margin: 0 0 8px;
}

.wlp-rs-card__cost {
	font-size: 20px;
	font-weight: 800;
	color: #f59e0b;
	margin-bottom: 8px;
}

.wlp-rs-card__need {
	color: #dc2626;
	font-size: 13px;
}

.wlp-btn-claim {
	display: block;
	width: 100%;
	background: #f59e0b;
	color: #fff;
	border: none;
	padding: 9px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
}

.wlp-btn-claim:hover {
	background: #d97706;
}

.wlp-btn-claim--locked {
	background: #e2e8f0;
	color: #94a3b8;
	cursor: not-allowed;
}

/* ── SHARE BUTTONS ───────────────────────────────────────── */
.wlp-share-btns {
	margin: 12px 0;
}

.wlp-share-btns small {
	color: #888;
}

.wlp-share-btn--facebook {
	display: inline-block;
	background: #1877f2;
	color: #fff;
	padding: 6px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	margin: 6px 6px 0 0;
}

.wlp-share-btn--twitter {
	display: inline-block;
	background: #1da1f2;
	color: #fff;
	padding: 6px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	margin: 6px 0 0;
}

/* ── TOAST NOTIFICATION ──────────────────────────────────── */
.wlp-toast {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #16a34a;
	color: #fff;
	padding: 12px 20px;
	border-radius: 8px;
	z-index: 99999;
	font-weight: 700;
	font-size: 14px;
	animation: wlp-fadein 0.3s ease;
}

@keyframes wlp-fadein {
	from { opacity: 0; transform: translateY( -10px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}
