/* eTenders Affiliate System — front-end (signup + dashboard shortcodes) */

:root {
	--etaff-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--etaff-accent: #8e9100;
	--etaff-accent-dark: #6e7100;
	--etaff-accent-soft: #f3f4dc;
}

[class^="etaff-"],
[class*=" etaff-"] {
	font-family: var(--etaff-font);
}

.etaff-front-card {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 24px;
	max-width: 620px;
	margin: 0 0 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.etaff-front-card h3 {
	margin-top: 0;
}

.etaff-front-card--notice {
	padding: 18px 22px;
	background: #f6f7f7;
	max-width: 480px;
}

.etaff-front-card--notice p {
	margin: 0;
}

/* ---------------------------------------------------------
 * Success banner (e.g. after submitting an application)
 * --------------------------------------------------------- */

.etaff-success-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #edfaef;
	border: 1px solid #c8ecd2;
	color: #00742a;
	border-radius: 10px;
	padding: 14px 18px;
	font-size: 14px;
	font-weight: 500;
}

.etaff-success-banner .dashicons {
	flex-shrink: 0;
	font-size: 18px;
}

/* ---------------------------------------------------------
 * Buttons
 * --------------------------------------------------------- */

.etaff-btn {
	display: inline-block;
	border: none;
	border-radius: 5px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.etaff-btn-primary {
	background: var(--etaff-accent-dark);
	color: #fff;
}

.etaff-btn-primary:hover {
	background: #5a5b00;
}

.etaff-btn:disabled,
.etaff-btn-primary:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	pointer-events: none;
}

.etaff-btn-small {
	padding: 6px 12px;
	font-size: 12px;
	background: #f0f0f1;
	color: #1d2327;
	border-radius: 4px;
	white-space: nowrap;
}

.etaff-btn-small:hover {
	background: #e0e0e1;
}

.etaff-btn-small.etaff-copied {
	background: #00a32a;
	color: #fff;
}

/* ---------------------------------------------------------
 * Dashboard — full-width layout
 * --------------------------------------------------------- */

.etaff-dash-wrap {
	width: 100%;
	max-width: none;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.etaff-dash-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: linear-gradient(135deg, var(--etaff-accent-soft) 0%, #f7f9fb 100%);
	border: 1px solid #e2e4e7;
	border-radius: 12px;
	padding: 24px 28px;
}

.etaff-dash-eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--etaff-accent-dark);
	margin-bottom: 4px;
}

.etaff-dash-header h2 {
	margin: 0 0 4px;
	font-size: 24px;
	line-height: 1.3;
}

.etaff-dash-sub {
	margin: 0;
	color: #646970;
	font-size: 14px;
}

.etaff-dash-header-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.etaff-dash-rate {
	font-size: 13px;
	color: #50575e;
}

.etaff-dash-rate strong {
	color: #1d2327;
}

/* Stat cards */

.etaff-dash-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.etaff-dash-stat-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	padding: 18px 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.etaff-dash-stat-card .dashicons {
	width: 42px;
	height: 42px;
	font-size: 22px;
	line-height: 42px;
	text-align: center;
	border-radius: 50%;
	flex-shrink: 0;
}

.etaff-dash-stat-card--blue .dashicons {
	background: var(--etaff-accent-soft);
	color: var(--etaff-accent-dark);
}

.etaff-dash-stat-card--purple .dashicons {
	background: #f1eafc;
	color: #6b3ec7;
}

.etaff-dash-stat-card--green .dashicons {
	background: #e7f8ec;
	color: #00742a;
}

.etaff-dash-stat-card--amber .dashicons {
	background: #fdf3e0;
	color: #a86400;
}

.etaff-dash-stat-value {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.2;
}

.etaff-dash-stat-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #787c82;
	margin-top: 2px;
}

/* Referral cards */

.etaff-dash-referral-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	gap: 16px;
}

.etaff-dash-referral-card {
	display: flex;
	gap: 16px;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.etaff-dash-referral-icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--etaff-accent-soft);
	color: var(--etaff-accent-dark);
	display: flex;
	align-items: center;
	justify-content: center;
}

.etaff-dash-referral-icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.etaff-dash-referral-body {
	flex: 1;
	min-width: 0;
}

.etaff-dash-referral-body label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #646970;
	margin-bottom: 6px;
}

.etaff-dash-referral-hint {
	margin: 8px 0 0;
	font-size: 12px;
	color: #787c82;
	line-height: 1.5;
}

/* Referral link / code copy row — input stretches to fill the card,
   button stays fixed-width beside it. */

.etaff-copy-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.etaff-copy-row input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	color: #1d2327;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 10px 12px;
	box-shadow: none;
	text-overflow: ellipsis;
}

.etaff-copy-row input[type="text"]:focus {
	background: #fff;
	border-color: var(--etaff-accent-dark);
	outline: none;
	box-shadow: 0 0 0 2px var(--etaff-accent-soft);
}

.etaff-copy-row .etaff-copy-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0 16px;
	border-radius: 6px;
}

/* Recent commissions section */

.etaff-dash-section {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	padding: 22px 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.etaff-dash-section h3 {
	margin: 0 0 16px;
	font-size: 16px;
}

/* ---------------------------------------------------------
 * Signup page — how-it-works steps + CTA card
 * --------------------------------------------------------- */

.etaff-signup-wrap .etaff-dash-section {
	max-width: none;
}

.etaff-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.etaff-step {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.etaff-step-num {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--etaff-accent-soft);
	color: var(--etaff-accent-dark);
	font-weight: 700;
	font-size: 14px;
}

.etaff-step strong {
	display: block;
	font-size: 14px;
	color: #1d2327;
	margin-bottom: 2px;
}

.etaff-step p {
	margin: 0;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.etaff-step p a {
	font-weight: 600;
}

.etaff-cta-card {
	max-width: none;
	background: linear-gradient(135deg, #eef5fc 0%, #ffffff 100%);
	text-align: left;
}

.etaff-cta-card h3 {
	margin: 0 0 6px;
}

.etaff-cta-card p {
	margin: 0 0 18px;
	color: #50575e;
}

.etaff-cta-card .etaff-btn {
	padding: 11px 26px;
	font-size: 14px;
}

/* ---------------------------------------------------------
 * Recent commissions table
 * --------------------------------------------------------- */

.etaff-front-table-wrap {
	overflow-x: auto;
}

.etaff-front-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.etaff-front-table th {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 2px solid #e2e4e7;
	color: #646970;
	font-weight: 600;
}

.etaff-front-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #f0f0f1;
}

.etaff-front-table .etaff-empty {
	text-align: center;
	color: #787c82;
	padding: 18px 10px;
}

/* ---------------------------------------------------------
 * Status badges (shared visual language with admin)
 * --------------------------------------------------------- */

.etaff-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	text-transform: capitalize;
	white-space: nowrap;
}

.etaff-badge--active {
	background: #edfaef;
	color: #00742a;
}

.etaff-badge--pending {
	background: #fdf5e6;
	color: #996800;
}

.etaff-badge--suspended,
.etaff-badge--void {
	background: #fcedee;
	color: #b32d2e;
}

.etaff-badge--approved {
	background: #e7f0fb;
	color: #1a5faa;
}

.etaff-badge--paid {
	background: #edeafc;
	color: #5b3ec7;
}

.etaff-badge--refunded {
	background: #fdeee0;
	color: #a85700;
}

.etaff-muted {
	color: #787c82;
	font-size: 13px;
}

/* ---------------------------------------------------------
 * Responsive
 * --------------------------------------------------------- */

@media screen and (max-width: 600px) {
	.etaff-front-card {
		padding: 18px;
	}

	.etaff-dash-header {
		flex-direction: column;
		align-items: flex-start;
		padding: 20px;
	}

	.etaff-dash-header-meta {
		align-items: flex-start;
	}

	.etaff-dash-section {
		padding: 16px;
	}

	.etaff-cta-card {
		padding: 18px;
	}

	.etaff-step {
		gap: 12px;
	}

	.etaff-step-num {
		width: 26px;
		height: 26px;
		font-size: 13px;
	}

	.etaff-success-banner {
		padding: 12px 14px;
		font-size: 13px;
	}

	.etaff-front-table thead {
		display: none;
	}

	.etaff-front-table,
	.etaff-front-table tbody,
	.etaff-front-table tr,
	.etaff-front-table td {
		display: block;
		width: 100%;
	}

	.etaff-front-table tr {
		border-bottom: 2px solid #e2e4e7;
		padding: 6px 0;
	}

	.etaff-front-table td {
		display: flex;
		justify-content: space-between;
		border: none;
		padding: 4px 0;
	}

	.etaff-front-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #646970;
	}
}
