/* ─── NDP Deal Wallet ─────────────────────────────────────────────────────── */

.ndp-deal-wallet {
	margin: 0;
	padding: 0;
}

.ndp-deal-wallet__login,
.ndp-deal-wallet__empty {
	text-align: center;
	padding: 40px 20px;
	color: #6b7280;
}

.ndp-deal-wallet__login a,
.ndp-deal-wallet__empty a {
	color: inherit;
	text-decoration: underline;
}

/* ─── Wallet List ─────────────────────────────────────────────────────────── */

.ndp-wallet-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ─── Wallet Card ─────────────────────────────────────────────────────────── */

.ndp-wallet-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.06 );
}

.ndp-wallet-card--expiring-soon {
	border-color: #f59e0b;
	box-shadow: 0 1px 6px rgba( 245, 158, 11, 0.2 );
}

.ndp-wallet-card--promo-expired {
	opacity: 0.85;
}

.ndp-wallet-card--redeemed {
	opacity: 0.6;
	filter: grayscale( 0.4 );
}

/* ─── Card Header ─────────────────────────────────────────────────────────── */

.ndp-wallet-card__header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px;
}

.ndp-wallet-card__image {
	width: 76px;
	height: 76px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}

.ndp-wallet-card__image--placeholder {
	width: 76px;
	height: 76px;
	border-radius: 8px;
	background: #f3f4f6;
	flex-shrink: 0;
}

.ndp-wallet-card__meta {
	flex: 1;
	min-width: 0;
}

/* ─── Status Chip ─────────────────────────────────────────────────────────── */

.ndp-wallet-card__status {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
	margin-bottom: 6px;
	line-height: 1.4;
}

.ndp-wallet-card__status--active {
	background: #d1fae5;
	color: #065f46;
}

.ndp-wallet-card__status--expiring-soon {
	background: #fef3c7;
	color: #92400e;
}

.ndp-wallet-card__status--promo-expired {
	background: #f3f4f6;
	color: #6b7280;
}

.ndp-wallet-card__status--redeemed {
	background: #f3f4f6;
	color: #9ca3af;
}

.ndp-wallet-card__title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 4px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ndp-wallet-card__title a {
	color: inherit;
	text-decoration: none;
}

.ndp-wallet-card__title a:hover {
	text-decoration: underline;
}

.ndp-wallet-card__business {
	font-size: 13px;
	color: #6b7280;
	margin: 0;
}

/* ─── Balances ────────────────────────────────────────────────────────────── */

.ndp-wallet-card__balances {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: #e5e7eb;
	border-top: 1px solid #e5e7eb;
}

.ndp-wallet-card__balance {
	background: #f9fafb;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ndp-wallet-card__balance-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #9ca3af;
}

.ndp-wallet-card__balance-value {
	font-size: 22px;
	font-weight: 700;
	color: #111827;
	line-height: 1;
}

.ndp-wallet-card__balance-note {
	font-size: 11px;
	color: #9ca3af;
	margin-top: 3px;
}

.ndp-wallet-card__expiry-countdown {
	color: #f59e0b;
	font-weight: 600;
}

.ndp-wallet-card--promo-expired .ndp-wallet-card__expiry-countdown {
	color: #9ca3af;
	font-weight: 400;
}

/* ─── QR Toggle Button ────────────────────────────────────────────────────── */

.ndp-wallet-card__qr-toggle {
	display: block;
	width: 100%;
	padding: 14px 16px;
	background: #111827;
	color: #fff;
	border: none;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: background 0.15s ease;
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
}

.ndp-wallet-card__qr-toggle:hover,
.ndp-wallet-card__qr-toggle:focus-visible {
	background: #1f2937;
	outline: 2px solid #6b7280;
	outline-offset: -2px;
}

.ndp-wallet-card--redeemed .ndp-wallet-card__qr-toggle {
	background: #d1d5db;
	color: #9ca3af;
	cursor: not-allowed;
	pointer-events: none;
}

/* ─── QR Panel ────────────────────────────────────────────────────────────── */

.ndp-wallet-card__qr-view {
	background: #fff;
	border-top: 1px solid #e5e7eb;
	padding: 28px 16px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.ndp-wallet-card__qr-view[hidden] {
	display: none;
}

.ndp-wallet-card__qr-code {
	width: 240px;
	height: 240px;
	display: block;
	border: 10px solid #fff;
	box-shadow: 0 0 0 1px #e5e7eb, 0 4px 16px rgba( 0, 0, 0, 0.08 );
	border-radius: 6px;
}

.ndp-wallet-card__brightness-hint {
	font-size: 12px;
	color: #9ca3af;
	margin: 0;
	text-align: center;
}

.ndp-wallet-card__brightness-hint[hidden] {
	display: none;
}

/* ─── Redemption History Accordion ───────────────────────────────────────── */

.ndp-wallet-card__history {
	border-top: 1px solid #e5e7eb;
}

.ndp-wallet-card__history-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 500;
	color: #6b7280;
	cursor: pointer;
	list-style: none;
	-webkit-user-select: none;
	user-select: none;
}

/* Remove default marker in all browsers */
.ndp-wallet-card__history-toggle::-webkit-details-marker {
	display: none;
}

.ndp-wallet-card__history-toggle::marker {
	content: '';
}

.ndp-wallet-card__history-toggle::after {
	content: '▾';
	font-size: 11px;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.ndp-wallet-card__history[open] > .ndp-wallet-card__history-toggle::after {
	transform: rotate( -180deg );
}

.ndp-wallet-card__history-list {
	list-style: none;
	margin: 0;
	padding: 0 16px 14px;
}

.ndp-wallet-card__history-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 7px 0;
	border-top: 1px solid #f3f4f6;
	font-size: 13px;
	color: #374151;
}

.ndp-wallet-card__history-item time {
	font-size: 12px;
	color: #9ca3af;
}

.ndp-wallet-card__history-empty {
	padding: 4px 16px 14px;
	font-size: 13px;
	color: #9ca3af;
	font-style: italic;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media ( max-width: 480px ) {
	.ndp-wallet-card__header {
		padding: 14px;
		gap: 12px;
	}

	.ndp-wallet-card__image,
	.ndp-wallet-card__image--placeholder {
		width: 60px;
		height: 60px;
	}

	.ndp-wallet-card__balance-value {
		font-size: 18px;
	}

	.ndp-wallet-card__qr-code {
		width: 200px;
		height: 200px;
	}
}

/* ─── Profile Pane ────────────────────────────────────────────────────────── */

.ndp-wallet-profile {
	padding: 24px 0;
}

.ndp-wallet-profile__heading {
	font-size: 18px;
	font-weight: 600;
	color: #111827;
	margin: 0 0 20px;
}

.ndp-wallet-profile__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 480px;
}

.ndp-wallet-profile__row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ndp-wallet-profile__label {
	font-size: 13px;
	font-weight: 500;
	color: #374151;
}

.ndp-wallet-profile__input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 15px;
	color: #111827;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s;
	-webkit-appearance: none;
}

.ndp-wallet-profile__input:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba( 99, 102, 241, 0.12 );
}

.ndp-wallet-profile__submit {
	align-self: flex-start;
	padding: 11px 24px;
	background: #111827;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
}

.ndp-wallet-profile__submit:hover {
	background: #1f2937;
}

.ndp-wallet-profile__submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.ndp-wallet-profile__status {
	font-size: 14px;
	padding: 10px 14px;
	border-radius: 8px;
}

.ndp-wallet-profile__status--success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.ndp-wallet-profile__status--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.ndp-wallet-profile__divider {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 32px 0;
}

.ndp-wallet-profile__hint {
	font-size: 12px;
	color: #9ca3af;
	margin-top: 2px;
}

.ndp-wallet-profile__input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.ndp-wallet-profile__input-wrap .ndp-wallet-profile__input {
	flex: 1;
	padding-right: 44px;
}

.ndp-wallet-profile__pw-toggle {
	position: absolute;
	right: 0;
	top: 0;
	height: 100%;
	width: 42px;
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	opacity: 0.4;
	transition: opacity 0.15s;
	padding: 0;
}

.ndp-wallet-profile__pw-toggle:hover,
.ndp-wallet-profile__pw-toggle--visible {
	opacity: 0.85;
}
