/**
 * Referral Dashboard & Wallet Styles
 */

/* ── Checkout & Cart Wallet Notice ── */
.tp-wallet-checkout-box {
	background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 100%);
	border: 1px solid #86efac;
	border-radius: 12px;
	padding: 16px 20px;
	margin: 20px 0 25px;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.tp-wallet-box-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.tp-wallet-icon {
	font-size: 32px;
	line-height: 1;
}

.tp-wallet-info {
	flex: 1;
	min-width: 220px;
}

.tp-wallet-info h4 {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: #065f46;
}

.tp-wallet-info p {
	margin: 0;
	font-size: 14px;
	color: #047857;
}

.tp-wallet-action .button.tp-wallet-toggle-btn {
	background-color: #059669 !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 8px !important;
	padding: 10px 18px !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tp-wallet-action .button.tp-wallet-toggle-btn:hover {
	background-color: #047857 !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.tp-wallet-action .button.tp-wallet-toggle-btn.tp-applied {
	background-color: #dc2626 !important;
}

.tp-wallet-action .button.tp-wallet-toggle-btn.tp-applied:hover {
	background-color: #b91c1c !important;
}

/* ── My Account Dashboard ── */
.tp-ref-dashboard {
	font-family: inherit;
	color: #1e293b;
	margin-top: 10px;
}

.tp-ref-header {
	background: linear-gradient(135deg, #0f333a 0%, #1e5257 100%);
	color: #ffffff;
	padding: 28px;
	border-radius: 14px;
	margin-bottom: 24px;
	box-shadow: 0 8px 24px rgba(15, 51, 58, 0.15);
}

.tp-ref-header h2 {
	color: #ffffff !important;
	margin: 0 0 8px !important;
	font-size: 24px !important;
	font-weight: 700;
}

.tp-ref-header p {
	color: #d1fae5;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	max-width: 650px;
}

/* ── Stats Grid ── */
.tp-ref-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.tp-ref-stat-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-ref-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.tp-ref-stat-card.tp-stat-balance {
	border-color: #a7f3d0;
	background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.tp-stat-icon {
	font-size: 32px;
	line-height: 1;
}

.tp-stat-details {
	display: flex;
	flex-direction: column;
}

.tp-stat-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #64748b;
	font-weight: 600;
	margin-bottom: 4px;
}

.tp-stat-val {
	font-size: 22px;
	color: #0f172a;
	font-weight: 800;
	line-height: 1.2;
}

.tp-stat-balance .tp-stat-val {
	color: #059669;
}

.tp-stat-hint {
	font-size: 11px;
	color: #94a3b8;
	margin-top: 4px;
}

/* ── Shared Box Containers ── */
.tp-ref-box {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tp-ref-box h3 {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.tp-ref-box > p {
	color: #64748b;
	font-size: 14px;
	margin: 0 0 16px;
}

/* ── Referral Link Input ── */
.tp-ref-link-field {
	display: flex;
	gap: 10px;
	margin-bottom: 18px;
}

.tp-ref-link-field input {
	flex: 1;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 14px;
	color: #334155;
	font-family: monospace;
	outline: none;
}

.tp-ref-copy-btn {
	background: #0f333a;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 0 24px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
}

.tp-ref-copy-btn:hover {
	background: #184b55;
}

.tp-ref-copy-btn.copied {
	background: #059669 !important;
}

/* ── Social Share Buttons ── */
.tp-ref-share-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.tp-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 8px;
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 600;
	color: #ffffff !important;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.tp-share-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.tp-share-wa {
	background: #25d366;
}

.tp-share-fb {
	background: #1877f2;
}

.tp-share-tg {
	background: #0088cc;
}

/* ── Policy Rules Box ── */
.tp-ref-policy-box {
	background: #f8fafc;
	border-left: 4px solid #0f333a;
}

.tp-ref-rules-list {
	margin: 0;
	padding-left: 20px;
	color: #475569;
	font-size: 13px;
	line-height: 1.8;
}

.tp-ref-rules-list strong {
	color: #0f172a;
}

/* ── Tables & Badges ── */
.tp-ref-table-wrapper {
	overflow-x: auto;
}

.tp-ref-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	margin-top: 8px;
}

.tp-ref-table th {
	background: #f8fafc;
	padding: 12px 14px;
	text-align: left;
	font-weight: 600;
	color: #475569;
	border-bottom: 1px solid #e2e8f0;
}

.tp-ref-table td {
	padding: 12px 14px;
	border-bottom: 1px solid #f1f5f9;
	color: #334155;
}

.tp-ref-badge {
	display: inline-block;
	padding: 4px 9px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
}

.tp-badge-approved {
	background: #dcfce7;
	color: #15803d;
}

.tp-badge-excluded {
	background: #ffedd5;
	color: #c2410c;
}

.tp-badge-blocked {
	background: #fee2e2;
	color: #b91c1c;
}

.tp-badge-pending {
	background: #f1f5f9;
	color: #64748b;
}

.tp-ref-type {
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
}

.tp-type-credit {
	background: #dcfce7;
	color: #15803d;
}

.tp-type-debit {
	background: #fee2e2;
	color: #b91c1c;
}

.tp-ref-empty {
	margin: 8px 0 0;
	color: #94a3b8;
	font-style: italic;
	font-size: 14px;
}

/* Mobile safeguard: referral link row wraps on narrow cards, desktop unchanged. */
@media (max-width: 480px) {
    .tp-ref-link-field {
        flex-wrap: wrap;
    }
    .tp-ref-link-field input {
        flex: 1 1 160px;
        min-width: 0;
    }
    .tp-ref-copy-btn {
        flex-shrink: 0;
    }
}