/* WS Loyalty Program - Frontend Styles */

/* ── Account Dashboard ─────────────────────────── */
.ws-lp-account {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px 0;
}
.ws-lp-account > * {
	margin-bottom: 24px;
}

/* ── Member Card ───────────────────────────────── */
.ws-lp-card {
	border: 2px solid #ddd;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ws-lp-card__header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	flex-wrap: wrap;
}
.ws-lp-card__avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}
.ws-lp-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ws-lp-card__avatar span {
	font-size: 28px;
	font-weight: bold;
}
.ws-lp-card__info {
	flex: 1;
	min-width: 120px;
}
.ws-lp-card__name {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 600;
}
.ws-lp-card__rank {
	display: inline-block;
	font-size: 13px;
	color: #fff;
	padding: 2px 10px;
	border-radius: 12px;
}
.ws-lp-card__spent,
.ws-lp-card__points {
	display: flex;
	flex-direction: column;
	text-align: right;
	min-width: 80px;
}
.ws-lp-card__spent small,
.ws-lp-card__points small {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
}
.ws-lp-card__spent strong,
.ws-lp-card__points strong {
	font-size: 18px;
	color: #333;
}
.ws-lp-card__benefits {
	padding: 12px 20px;
	border-top: 1px solid #eee;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ws-lp-benefit {
	font-size: 13px;
	color: #555;
	display: flex;
	align-items: center;
	gap: 4px;
}
.ws-lp-benefit .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #27ae60;
}
.ws-lp-benefit--hint {
	font-style: italic;
	color: #999;
}

/* ── Progress Section ──────────────────────────── */
.ws-lp-progress-section {
	background: #fff;
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ws-lp-progress__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	font-size: 14px;
	flex-wrap: wrap;
	gap: 8px;
}
.ws-lp-progress__next {
	font-size: 13px;
	color: #666;
}
.ws-lp-progress__bar {
	height: 12px;
	background: #ecf0f1;
	border-radius: 6px;
	overflow: hidden;
}
.ws-lp-progress__fill {
	height: 100%;
	border-radius: 6px;
	transition: width 0.6s ease;
}
.ws-lp-progress__labels {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	font-size: 12px;
	color: #888;
	flex-wrap: wrap;
	gap: 4px;
}
.ws-lp-max-rank {
	background: #fff;
	padding: 20px;
	border-radius: 12px;
	text-align: center;
	font-size: 16px;
	font-weight: 600;
	color: #27ae60;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ws-lp-max-rank .dashicons {
	font-size: 24px;
	vertical-align: middle;
	margin-right: 6px;
}

/* ── Section ───────────────────────────────────── */
.ws-lp-section {
	background: #fff;
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ws-lp-section__title {
	margin: 0 0 16px;
	font-size: 18px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ws-lp-section__title .dashicons {
	color: #666;
}
.ws-lp-count {
	background: #e74c3c;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 1px 8px;
	border-radius: 10px;
}
.ws-lp-empty {
	color: #999;
	font-style: italic;
	text-align: center;
	padding: 20px 0;
}

/* ── Voucher Grid ──────────────────────────────── */
.ws-lp-vouchers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}
.ws-lp-voucher-card {
	display: flex;
	align-items: center;
	border: 1px dashed #ddd;
	border-radius: 8px;
	padding: 14px 16px;
	gap: 14px;
	background: #fafafa;
	cursor: pointer;
	transition: background 0.2s;
}
.ws-lp-voucher-card:hover {
	background: #f0f0f0;
}
.ws-lp-voucher__amount {
	font-size: 22px;
	font-weight: 700;
	min-width: 70px;
}
.ws-lp-voucher__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
}
.ws-lp-voucher__code {
	font-family: monospace;
	font-size: 13px;
	color: #333;
}
.ws-lp-voucher__info small {
	font-size: 11px;
	color: #888;
}
.ws-lp-voucher__expiry {
	color: #e74c3c !important;
}
.ws-lp-voucher__copy {
	font-size: 12px;
	color: #3498db;
	white-space: nowrap;
}

/* ── Table ─────────────────────────────────────── */
.ws-lp-table {
	width: 100%;
	border-collapse: collapse;
}
.ws-lp-table th,
.ws-lp-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}
.ws-lp-table th {
	font-weight: 600;
	color: #666;
	font-size: 12px;
	text-transform: uppercase;
}
.ws-lp-table td a {
	color: #3498db;
	text-decoration: none;
}
.ws-lp-table td a:hover {
	text-decoration: underline;
}
.ws-lp-amount {
	color: #27ae60;
	font-weight: 600;
}

/* ── Points Log ────────────────────────────────── */
.ws-lp-points--plus {
	color: #27ae60;
	font-weight: 600;
}
.ws-lp-points--minus {
	color: #e74c3c;
	font-weight: 600;
}
.ws-lp-points-type {
	display: inline-block;
	background: #f0f0f0;
	color: #666;
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 8px;
	margin-left: 6px;
	vertical-align: middle;
}

/* ── Rank Badge (My Account nav) ───────────────── */
.ws-lp-rank-badge {
	display: inline-block;
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 8px;
	margin-left: 4px;
}

/* ── Discount Badge ────────────────────────────── */
.ws-lp-discount-badge {
	display: inline-block;
	background: #e74c3c;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 6px;
	vertical-align: middle;
}

/* ── Checkout Points ────────────────────────────── */
.ws-lp-checkout-points {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 16px;
	margin: 16px 0;
}
.ws-lp-checkout-points__title {
	margin: 0 0 8px;
	font-size: 15px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ws-lp-checkout-points__title .dashicons {
	color: #f39c12;
}
.ws-lp-checkout-points__info {
	font-size: 13px;
	color: #555;
	margin-bottom: 10px;
}
.ws-lp-checkout-points__form {
	display: flex;
	gap: 6px;
	align-items: center;
}
.ws-lp-checkout-points__form input[type="number"] {
	width: 140px;
	padding: 6px 10px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
}
.ws-lp-checkout-points__form .button {
	padding: 6px 14px;
	font-size: 13px;
}
.ws-lp-checkout-points__msg {
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
}
.ws-lp-msg--success { color: #27ae60; }
.ws-lp-msg--error { color: #e74c3c; }
.ws-lp-checkout-points__active {
	margin-top: 8px;
	font-size: 13px;
	padding: 6px 10px;
	background: #e8f8f0;
	border-radius: 4px;
	color: #27ae60;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 600px) {
	.ws-lp-card__header {
		flex-direction: column;
		text-align: center;
	}
	.ws-lp-card__spent,
	.ws-lp-card__points {
		text-align: center;
	}
	.ws-lp-vouchers-grid {
		grid-template-columns: 1fr;
	}
	.ws-lp-table th:nth-child(3),
	.ws-lp-table td:nth-child(3) {
		display: none;
	}
	.ws-lp-progress__head {
		flex-direction: column;
		text-align: center;
	}
}
