/* =====================================================
   Healio - Affiliate tab
   Renders inside .woocommerce-MyAccount-content, which
   account.css already styles as the white panel, so
   nothing here re-creates that shell.
   ===================================================== */

.haff-eyebrow {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rose);
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
}
.haff-eyebrow::before {
	content: "";
	width: 22px;
	height: 1px;
	background: currentColor;
	flex: none;
}

.haff-lede-p {
	color: var(--mauve);
	font-size: 15px;
	max-width: 60ch;
	margin: 0 0 26px;
}
.haff-blank {
	color: var(--mauve);
	font-size: 15px;
	margin: 0;
}

/* -----------------------------------------------------
   Code and link
   ----------------------------------------------------- */

.haff-ident {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 12px;
}

/* The two numbers affiliates ask about most -- what their audience saves, and
   what they earn -- were only on the signup screen and in the welcome email.
   Nothing on the dashboard itself said them out loud. */
.haff-ident-note {
	margin: 0 0 34px;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--mauve);
	max-width: 66ch;
}
.haff-ident-note strong { color: var(--wine); font-weight: 650; }
.haff-field {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--blush-soft);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 14px 14px 14px 18px;
}
.haff-field-b {
	min-width: 0;
	flex: 1;
}
.haff-field-k {
	display: block;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mauve);
	margin-bottom: 5px;
}
.haff-field-v {
	display: block;
	font-family: var(--font-mono);
	font-size: 15px;
	color: var(--wine);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.haff-copy {
	flex: none;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	background: var(--wine);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 10px 15px;
	cursor: pointer;
	transition: background 0.25s ease;
}
.haff-copy:hover { background: var(--berry); }
.haff-copy.is-done { background: #7B9A85; }

/* -----------------------------------------------------
   Ledger and payout
   ----------------------------------------------------- */

.haff-ledger {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: clamp(26px, 4vw, 48px);
	align-items: start;
}
.haff-lede {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mauve);
	margin: 0 0 12px;
}
.haff-total {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(48px, 7vw, 76px);
	line-height: 0.92;
	letter-spacing: -0.03em;
	color: var(--berry);
	font-variant-numeric: tabular-nums;
	margin: 0;
}
.haff-total .haff-cents {
	font-size: 0.44em;
	vertical-align: 0.72em;
}
.haff-note-sm {
	font-size: 14px;
	color: var(--mauve);
	margin: 10px 0 0;
	max-width: 38ch;
}

.haff-states {
	list-style: none;
	margin: 26px 0 0;
	padding: 0;
	border-top: 1px solid var(--line);
}
.haff-states li {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
}
.haff-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex: none;
	transform: translateY(-1px);
}
.haff-dot.is-pending { box-shadow: inset 0 0 0 1.5px var(--rose); }
.haff-dot.is-approved { background: var(--rose); }
.haff-dot.is-paid { background: #7B9A85; }
.haff-lbl { font-size: 14.5px; flex: 1; }
.haff-sub {
	display: block;
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mauve);
	margin-top: 3px;
}
.haff-amt {
	font-family: var(--font-display);
	font-size: 21px;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.haff-payout {
	background: var(--wine);
	color: #F6EAEE;
	border-radius: 22px;
	padding: clamp(24px, 3vw, 30px);
}
.haff-payout .haff-eyebrow { color: #E9C3D3; }
.haff-payout-date {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 30px;
	letter-spacing: -0.02em;
	line-height: 1.05;
	margin: 0;
}
.haff-payout-date em { font-style: italic; color: #E9C3D3; }
.haff-payout-sub {
	font-size: 14px;
	color: rgba(246, 234, 238, 0.66);
	margin: 10px 0 0;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(233, 195, 211, 0.22);
}
.haff-payout-form { padding-top: 18px; }
.haff-payout-form label {
	display: block;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(246, 234, 238, 0.6);
	margin: 0 0 7px;
}
.haff-payout-form select,
.haff-payout-form input {
	width: 100%;
	font-family: var(--font-body);
	font-size: 14.5px;
	color: #F6EAEE;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(233, 195, 211, 0.28);
	border-radius: 12px;
	padding: 11px 13px;
	margin-bottom: 16px;
}
.haff-payout-form select option { color: #2B0A14; }
.haff-payout-form input::placeholder { color: rgba(246, 234, 238, 0.45); }
/* The @ is furniture, not typing: it sits inside the field and the input is
   padded past it, so the affiliate never has to wonder whether to include it. */
.haff-at { position: relative; }
.haff-at .haff-at-sign {
	position: absolute;
	left: 13px;
	top: 11px;
	font-family: var(--font-body);
	font-size: 14.5px;
	line-height: 1.4;
	color: rgba(246, 234, 238, 0.5);
	pointer-events: none;
}
.haff-payout-form .haff-at input { padding-left: 27px; }
.haff-field-hint {
	font-size: 12.5px;
	line-height: 1.5;
	color: rgba(246, 234, 238, 0.55);
	margin: -6px 0 16px;
}
.haff-payout-form select:focus,
.haff-payout-form input:focus {
	outline: 0;
	border-color: #E9C3D3;
}
.haff-payout-form .btn-ghost {
	width: 100%;
	color: #F6EAEE;
	border-color: rgba(233, 195, 211, 0.34);
}
.haff-payout-form .btn-ghost:hover { border-color: #E9C3D3; color: #fff; }

/* -----------------------------------------------------
   Tabs
   ----------------------------------------------------- */

.haff-tabs {
	display: flex;
	gap: 2px;
	margin-top: clamp(34px, 4.5vw, 52px);
	border-bottom: 1px solid var(--line);
	overflow-x: auto;
	scrollbar-width: none;
}
.haff-tabs::-webkit-scrollbar { display: none; }
.haff-tab {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--mauve);
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	padding: 13px 15px;
	cursor: pointer;
	white-space: nowrap;
	margin-bottom: -1px;
	transition: color 0.22s ease, border-color 0.22s ease;
}
.haff-tab:hover { color: var(--berry); }
.haff-tab[aria-selected="true"] {
	color: var(--wine);
	border-bottom-color: var(--rose);
}

.haff-panel { display: none; padding-top: clamp(24px, 3vw, 34px); }
.haff-panel.is-on { display: block; }

/* -----------------------------------------------------
   Performance
   ----------------------------------------------------- */

.haff-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
	margin: 0 0 20px;
}
.haff-stats dt {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--mauve);
	margin-bottom: 7px;
}
.haff-stats dd {
	margin: 0;
	font-family: var(--font-display);
	font-size: 30px;
	line-height: 1;
	letter-spacing: -0.025em;
	font-variant-numeric: tabular-nums;
	color: var(--wine);
}
.haff-stats dd small {
	font-size: 13px;
	font-family: var(--font-body);
	color: var(--mauve);
	margin-left: 4px;
}

/* -----------------------------------------------------
   Link builder
   ----------------------------------------------------- */

.haff-builder label {
	display: block;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mauve);
	margin: 0 0 8px;
}
.haff-builder select {
	width: 100%;
	max-width: 420px;
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--wine);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 18px;
}
.haff-built {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--blush-soft);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 14px 14px 14px 18px;
	max-width: 620px;
}
.haff-built code {
	flex: 1;
	min-width: 0;
	font-family: var(--font-mono);
	font-size: 14px;
	color: var(--wine);
	background: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* -----------------------------------------------------
   Assets
   ----------------------------------------------------- */

.haff-assets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
.haff-asset {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 18px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.haff-asset:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-soft);
	border-color: var(--blush);
}
.haff-asset-art {
	aspect-ratio: 4 / 3;
	border-bottom: 1px solid var(--line);
	background: var(--blush-soft) no-repeat center / contain;
}
/* Three tiles, not six. The old set had two names for each of these colours,
   which is fine in a hardcoded array and confusing in a dropdown. The tile
   still matters once artwork is attached: contain leaves letterboxing, and a
   transparent PNG needs the right ground behind it. */
.haff-art-cream { background-color: var(--cream); }
.haff-art-wine { background-color: var(--wine); }
.haff-art-blush { background-image: linear-gradient(160deg, #F4E2EA, #E9C3D3); }

.haff-asset-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 16px;
}
.haff-asset-n { display: block; font-size: 13.5px; line-height: 1.35; }
.haff-asset-k {
	display: block;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mauve);
	margin-top: 4px;
}
.haff-dl {
	flex: none;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--berry);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 8px 13px;
	transition: border-color 0.22s ease, color 0.22s ease;
}
.haff-dl:hover { border-color: var(--rose); color: var(--rose); }
.haff-dl.is-soon { color: var(--mauve); border-style: dashed; }

/* -----------------------------------------------------
   Swipe copy
   ----------------------------------------------------- */

.haff-rules {
	background: var(--blush-soft);
	border: 1px solid var(--blush);
	border-radius: 18px;
	padding: 22px 24px;
	margin-bottom: 26px;
}
.haff-rules h3 {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--berry);
	margin: 0 0 12px;
	font-weight: 400;
}
.haff-rules ul { margin: 0; padding-left: 18px; }
.haff-rules li { font-size: 14.5px; color: var(--wine); margin-bottom: 7px; }
.haff-rules li:last-child { margin-bottom: 0; }

.haff-swipes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
.haff-swipe {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
}
.haff-swipe-h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 12px;
}
.haff-swipe-k {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--mauve);
}
.haff-swipe-b {
	font-size: 14.5px;
	line-height: 1.6;
	white-space: pre-line;
	color: var(--wine);
	margin: 0;
	flex: 1;
}

/* -----------------------------------------------------
   Tables
   ----------------------------------------------------- */

.haff-tablewrap { overflow-x: auto; }
.haff-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 540px;
}
.haff-table th {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--mauve);
	font-weight: 400;
	text-align: left;
	padding: 0 14px 12px 0;
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
}
.haff-table td {
	padding: 15px 14px 15px 0;
	border-bottom: 1px solid var(--line);
	font-size: 14.5px;
	vertical-align: middle;
}
.haff-table th:last-child,
.haff-table td:last-child { padding-right: 0; text-align: right; }
.haff-num {
	font-family: var(--font-display);
	font-size: 17px;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}
.haff-when {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	color: var(--mauve);
	white-space: nowrap;
}
.haff-pill {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 999px;
}
.haff-pill.is-wait { background: var(--blush-soft); color: var(--berry); }
.haff-pill.is-good { background: rgba(123, 154, 133, 0.18); color: #4E6957; }
.haff-pill.is-off { background: rgba(107, 97, 101, 0.14); color: var(--mauve); }

/* -----------------------------------------------------
   Empty / pending states
   ----------------------------------------------------- */

/* Both states used to take their white surface from the account panel that
   wrapped the whole content column. That panel is gone -- the signed-in screens
   now sit straight on the page and only real objects get a card -- so these two
   carry their own. */
/* -----------------------------------------------------
   Banners: confirm your email, claim a better code
   Both sit above the dashboard and both are dismissible
   by acting on them, so neither gets a close button.
   ----------------------------------------------------- */

.haff-banner {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: center;
	justify-content: space-between;
	background: var(--blush-soft);
	border: 1px solid var(--blush);
	border-radius: 18px;
	padding: 18px 22px;
	margin: 0 0 24px;
}
.haff-banner.is-claim { background: var(--paper); }
.haff-banner-h {
	font-family: var(--font-display);
	font-size: 19px;
	color: var(--wine);
	margin: 0 0 5px;
}
.haff-banner-p {
	font-size: 14px;
	color: var(--mauve);
	margin: 0;
	max-width: 58ch;
}
.haff-banner form { margin: 0; flex: none; }
.haff-claim-form { display: grid; gap: 8px; min-width: 240px; }
.haff-payout-locked {
	font-size: 13.5px;
	color: rgba(246, 234, 238, 0.72);
	border-top: 1px solid rgba(246, 234, 238, 0.16);
	margin: 18px 0 0;
	padding-top: 18px;
}

/* In-account signup: the code field, reusing the public form's look. */
.haff-signup { display: grid; gap: 12px; max-width: 380px; }
.haff-signup-l {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--mauve);
	margin: 4px 0 -4px;
}
.haff-signup .af-consent,
.haff-claim-form .af-consent {
	display: flex;
	gap: 11px;
	align-items: flex-start;
	font-size: 13px;
	color: var(--mauve);
	background: var(--blush-soft);
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
}
.haff-signup .af-consent input { accent-color: var(--rose); margin-top: 3px; flex-shrink: 0; }
.haff-signup .af-consent a { color: var(--berry); }

.haff-profile-form { display: grid; gap: 8px; max-width: 380px; }
.haff-profile-form label {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--mauve);
	margin-top: 8px;
}
.haff-profile-form input,
.haff-profile-form select {
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 12px 14px;
	font: inherit;
	color: var(--wine);
	background: var(--paper);
}
.haff-profile-form input:focus,
.haff-profile-form select:focus {
	outline: none;
	border-color: var(--rose);
	box-shadow: 0 0 0 3px var(--blush-soft);
}
.haff-profile-form .btn-ghost { justify-self: start; margin-top: 12px; }

@media (max-width: 640px) {
	.haff-banner { flex-direction: column; align-items: stretch; }
	.haff-banner form, .haff-claim-form { min-width: 0; }
}

.haff-empty {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: clamp(28px, 4.4vw, 56px);
	align-items: center;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 24px;
	padding: clamp(30px, 4.4vw, 52px);
	box-shadow: var(--shadow-soft);
}
.haff-empty-h {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(26px, 3.2vw, 36px);
	letter-spacing: -0.02em;
	line-height: 1.08;
	margin: 0 0 14px;
	color: var(--wine);
}
.haff-empty-h em { font-style: italic; color: var(--rose); }
.haff-empty-p {
	color: var(--mauve);
	font-size: 15.5px;
	max-width: 44ch;
	margin: 0 0 24px;
}
.haff-terms { list-style: none; margin: 0; padding: 0; }
.haff-terms li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
}
.haff-terms li:first-child { border-top: 1px solid var(--line); }
.haff-terms .k {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--mauve);
}
.haff-terms .v {
	font-family: var(--font-display);
	font-size: 24px;
	letter-spacing: -0.02em;
	line-height: 1;
	color: var(--wine);
}
.haff-terms .v em { font-style: italic; color: var(--rose); font-size: 0.6em; }

.haff-note {
	max-width: 640px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 24px;
	padding: clamp(30px, 4.4vw, 52px);
	box-shadow: var(--shadow-soft);
}

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

@media (max-width: 1080px) {
	.haff-ledger,
	.haff-empty { grid-template-columns: 1fr; }
	.haff-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.haff-swipes { grid-template-columns: 1fr; }
	.haff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
	.haff-ident { grid-template-columns: 1fr; }
	.haff-assets { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.haff-asset,
	.haff-copy,
	.haff-tab { transition: none; }
}
