/**
 * The Affiliate tab in My Account.
 *
 * Deliberately light touch so it inherits the theme's own typography.
 *
 * @package Kyushi_Affiliates
 */

.kaf-panel {
	margin: 0 0 24px;
	padding: 20px;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 6px;
}

.kaf-panel h3 {
	margin: 0 0 12px;
}

.kaf-panel--notice {
	background: rgba( 0, 0, 0, 0.02 );
}

.kaf-link-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.kaf-link-row .kaf-link-input {
	flex: 1 1 260px;
	min-width: 0;
	padding: 10px 12px;
	font-family: monospace;
	font-size: 14px;
	border: 1px solid rgba( 0, 0, 0, 0.2 );
	border-radius: 4px;
	background: rgba( 0, 0, 0, 0.03 );
}

.kaf-link-row .kaf-copy {
	flex: 0 0 auto;
}

.kaf-rate {
	margin: 0;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
}

.kaf-hint {
	margin: 8px 0 0;
	font-size: 14px;
	opacity: 0.75;
}

.kaf-hint code {
	padding: 2px 6px;
	border-radius: 3px;
	background: rgba( 0, 0, 0, 0.06 );
}

.kaf-products {
	margin: 0;
	padding-left: 20px;
}

.kaf-products li {
	margin-bottom: 4px;
}

/* How it works ----------------------------------------------------------- */

.kaf-how {
	margin: 0 0 24px;
	padding: 14px 20px;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 6px;
	background: rgba( 0, 0, 0, 0.02 );
}

.kaf-how summary {
	cursor: pointer;
	font-weight: 600;
}

.kaf-how ol {
	margin: 14px 0 0;
	padding-left: 20px;
}

.kaf-how li {
	margin-bottom: 8px;
}

/* Dashboard ------------------------------------------------------------- */
/* One hero figure per view; everything else is a supporting tile. Values
   use the font's default proportional figures - tabular-nums is reserved
   for columns of numbers that have to line up. */

.kaf-hero {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 16px;
	padding: 24px;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 8px;
}

.kaf-hero__main {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.kaf-hero__label {
	font-size: 14px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.65;
}

.kaf-hero__value {
	font-size: 48px;
	font-weight: 600;
	line-height: 1.1;
}

.kaf-hero__note {
	max-width: 46ch;
	font-size: 14px;
	opacity: 0.75;
}

.kaf-hero__action {
	flex: 0 0 auto;
}

.kaf-button--primary {
	font-size: 16px;
}

.kaf-stats {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 150px, 1fr ) );
	gap: 12px;
	margin-bottom: 24px;
}

.kaf-stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px 16px;
	border: 1px solid rgba( 0, 0, 0, 0.1 );
	border-radius: 6px;
}

.kaf-stat__label {
	font-size: 13px;
	opacity: 0.65;
}

.kaf-stat__value {
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
}

/* Direction is spelled out in the label too, never carried by colour alone. */
.kaf-stat__delta {
	font-size: 12px;
	opacity: 0.75;
}

.kaf-stat__delta--up::before {
	content: "\2191\00a0";
}

.kaf-stat__delta--down::before {
	content: "\2193\00a0";
}

.kaf-stat__delta--flat::before {
	content: "\2192\00a0";
}

/* Baskets ---------------------------------------------------------------- */

.kaf-table {
	width: 100%;
	margin: 0 0 12px;
	border-collapse: collapse;
}

.kaf-table th,
.kaf-table td {
	padding: 8px 10px;
	text-align: left;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
}

.kaf-table th {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.7;
}

.kaf-panel--total .kaf-rate {
	margin-bottom: 12px;
}

.kaf-pending {
	margin: 12px 0 0;
	padding: 10px 14px;
	border-radius: 4px;
	background: rgba( 219, 166, 23, 0.12 );
	font-size: 14px;
}
