/**
 * My Votes — /my-votes/ (my.php + my-votes.js).
 *
 * Flat by the house rule: no card panels. Races are rows divided by hairlines,
 * the stats are figures between rules (the Winners hero's language), and the
 * only filled shapes are the CTAs and the status chips.
 */

/* A reading column, not the 1280px site container: a row whose CTA sits a
   full screen away from the race it belongs to stops reading as one row.
   The ID selector is not decoration: the skin sets `#tie-wrapper .container`
   to the site width (measured winning over a class-only rule). */
#tie-wrapper main.sa-my.container,
.sa-my { max-width: 880px; margin-left: auto; margin-right: auto; padding-top: 1.6rem; padding-bottom: 2.5rem; }
/* `[hidden]` is only display:none in the UA sheet — every flex/grid rule below
   would beat it. One rule for the whole page. */
.sa-my [hidden] { display: none !important; }

/* ── head ──────────────────────────────────────────────────────────────── */
.sa-my__head { margin: 0 0 1.6rem; }
.sa-my__eye {
	display: inline-block;
	margin-bottom: .55rem;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--sa-heart);
}
.sa-my .sa-my__title {
	margin: 0;
	font-family: var(--sa-font-display);
	font-weight: 800;
	font-size: clamp(2.6rem, 7vw, 4.4rem);
	line-height: .96;
	letter-spacing: -.045em;
}
.sa-my .sa-grad {
	background: var(--sa-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.sa-my .sa-my__sub {
	margin: .7rem 0 0;
	max-width: 58ch;
	color: var(--sa-text-muted);
	font-size: clamp(.95rem, 1.6vw, 1.05rem);
	line-height: 1.55;
}

/* ── stats ─────────────────────────────────────────────────────────────── */
.sa-my__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	margin: 0 0 1.8rem;
}
.sa-my-stat {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 96px;
	padding-left: 16px;
	border-left: 1px solid var(--sa-border-strong);
}
.sa-my-stat__n {
	font-family: var(--sa-font-display);
	font-weight: 800;
	font-size: clamp(1.4rem, 3vw, 1.8rem);
	line-height: 1.1;
	color: var(--sa-text);
	font-variant-numeric: tabular-nums;
}
.sa-my-stat.is-hot .sa-my-stat__n {
	background: var(--sa-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.sa-my-stat__l {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--sa-text-dim);
}

.sa-my .sa-my__note {
	margin: 0 0 1.2rem;
	padding: 10px 0;
	border-block: 1px solid var(--sa-border);
	color: var(--sa-text-muted);
	font-size: 13px;
}

/* ── loading / empty ───────────────────────────────────────────────────── */
.sa-my__loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 28px 0;
	color: var(--sa-text-dim);
	font-size: 14px;
}
.sa-my__spin {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid var(--sa-border-strong);
	border-top-color: var(--sa-heart);
	animation: sa-my-spin .8s linear infinite;
}
@keyframes sa-my-spin { to { transform: rotate(360deg); } }
.sa-my .sa-my__nojs { color: var(--sa-text-muted); }

.sa-my-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 48px 12px 36px;
	text-align: center;
	border-block: 1px solid var(--sa-border);
}
.sa-my-empty__ico { font-size: 28px; line-height: 1; color: var(--sa-heart); }
.sa-my .sa-my-empty__t { margin: 0; font-family: var(--sa-font-display); font-size: 1.45rem; font-weight: 700; color: var(--sa-text); }
.sa-my .sa-my-empty__s { margin: 0 0 8px; max-width: 46ch; color: var(--sa-text-muted); font-size: 14px; line-height: 1.55; }

/* ── sections ──────────────────────────────────────────────────────────── */
.sa-my-sec { margin: 0 0 2rem; }
.sa-my .sa-my-sec__h {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--sa-border-strong);
	font-family: var(--sa-font-body);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--sa-text-muted);
}
.sa-my-sec.is-ready .sa-my-sec__h { color: var(--sa-heart); }
.sa-my-sec__n {
	min-width: 20px;
	padding: 2px 7px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--sa-text) 9%, transparent);
	color: var(--sa-text-muted);
	font-size: 11px;
	letter-spacing: 0;
	text-align: center;
}

/* ── one race: a row, not a card ───────────────────────────────────────── */
.sa-my-card {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--sa-border);
}
.sa-my-card__thumb {
	display: block;
	width: 76px;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 12px;
	background: var(--sa-surface-2);
}
.sa-my-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sa-my-card__main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
#tie-wrapper .sa-my a.sa-my-card__title,
.sa-my .sa-my-card__title {
	font-family: var(--sa-font-display);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--sa-text);
	text-decoration: none;
	overflow-wrap: anywhere;
}
#tie-wrapper .sa-my a.sa-my-card__title:hover { color: var(--sa-heart); }

.sa-my-card__pick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-width: 0; }
.sa-my-card__av,
.sa-my-call__av {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--sa-gradient);
	padding: 2px;
}
/* The house face crop — the same formula as the hero, Duel and leaderboard
   avatars: the image at 308% × the plugin's focal zoom, offset so the focal
   point lands in the circle. The circle clips inside the 2px ring. */
.sa-my-face { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--sa-surface-2); }
.sa-my-face img {
	position: absolute;
	width: calc(var(--sa-focal-scale, 308%) * var(--np-zoom, 1));
	height: calc(var(--sa-focal-scale, 308%) * var(--np-zoom, 1));
	max-width: none;
	max-height: none;
	left: calc(var(--np-fx, .5) * (1 - 3.08 * var(--np-zoom, 1)) * 100%);
	top: calc(var(--np-fy, .4) * (1 - 3.08 * var(--np-zoom, 1)) * 100%);
	object-fit: cover;
	object-position: center 40%;
}
.sa-my-ini {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--sa-surface-2);
	color: var(--sa-text);
	font-weight: 800;
	font-size: 13px;
}
.sa-my-card__ptxt { display: flex; flex-direction: column; min-width: 0; }
.sa-my-card__plabel {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--sa-text-dim);
}
.sa-my-card__pname { font-weight: 700; color: var(--sa-text); font-size: 14px; overflow-wrap: anywhere; }

.sa-my-chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
	color: var(--sa-text-muted);
	background: color-mix(in srgb, var(--sa-text) 7%, transparent);
}
.sa-my-chip.is-hot { color: var(--sa-on-accent, #fff); background: var(--sa-gradient); }
.sa-my-chip.is-chase { color: var(--sa-text); background: color-mix(in srgb, var(--sa-heart) 16%, transparent); }
/* A win is a result, not an award: the palette's own gradient, never gold. */
.sa-my-chip.is-win { color: var(--sa-on-accent, #fff); background: var(--sa-gradient); letter-spacing: .08em; }

.sa-my-card__when { font-size: 12.5px; color: var(--sa-text-dim); font-variant-numeric: tabular-nums; }
.sa-my-card.is-ready .sa-my-card__when { color: var(--sa-heart); font-weight: 700; }

/* ── buttons (CTA labels are uppercase by rule) ────────────────────────── */
.sa-my-btn,
#tie-wrapper .sa-my a.sa-my-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 16px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--sa-gradient);
	box-shadow: var(--sa-button-depth);
	color: var(--sa-on-accent, #fff);
	font: inherit;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}
.sa-my-btn--ghost,
#tie-wrapper .sa-my a.sa-my-btn--ghost {
	background: transparent;
	box-shadow: none;
	border-color: var(--sa-border-strong);
	color: var(--sa-text-muted);
}
.sa-my-btn--ghost:hover,
#tie-wrapper .sa-my a.sa-my-btn--ghost:hover { color: var(--sa-on-accent, #fff); background: var(--sa-gradient); border-color: transparent; }
.sa-my-btn:active { transform: scale(.97); }
.sa-my-btn:focus-visible,
.sa-my-call__opt:focus-visible,
.sa-my__forget:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--sa-violet) 70%, transparent);
	outline-offset: 2px;
}

/* ── Call It ───────────────────────────────────────────────────────────── */
.sa-my-call { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sa-my-call .sa-my-btn { padding: 6px 12px; font-size: 11.5px; }
.sa-my-call__mine { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 13px; color: var(--sa-text-muted); }
.sa-my-call__ico { font-size: 14px; line-height: 1; }
.sa-my-call__res {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.sa-my-call__res.is-hit { color: var(--sa-on-accent, #fff); background: var(--sa-gradient); }
.sa-my-call__res.is-miss { color: var(--sa-text-dim); background: color-mix(in srgb, var(--sa-text) 8%, transparent); }
.sa-my-call__pick { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.sa-my .sa-my-call__ask { margin: 0; font-size: 12.5px; color: var(--sa-text-muted); }
.sa-my-call__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.sa-my-call__opt {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 3px 12px 3px 3px;
	border: 1px solid var(--sa-border-strong);
	border-radius: 999px;
	background: transparent;
	color: var(--sa-text);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.sa-my-call__opt .sa-my-call__av { width: 26px; height: 26px; padding: 1px; }
.sa-my-call__opt:hover { border-color: transparent; background: color-mix(in srgb, var(--sa-heart) 18%, transparent); }
.sa-my-call__cancel {
	align-self: flex-start;
	padding: 2px 0;
	border: 0;
	background: none;
	color: var(--sa-text-dim);
	font: inherit;
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
}

/* ── the record ────────────────────────────────────────────────────────── */
.sa-my-record {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin: 0 0 2rem;
	padding: 16px 0;
	border-block: 1px solid var(--sa-border-strong);
}
.sa-my-record__ico { font-size: 22px; line-height: 1; }
.sa-my .sa-my-record__t {
	flex: 1 1 220px;
	margin: 0;
	font-family: var(--sa-font-display);
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--sa-text);
}

/* ── foot ──────────────────────────────────────────────────────────────── */
.sa-my__foot { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.sa-my .sa-my__foot p { margin: 0; max-width: 60ch; font-size: 12.5px; line-height: 1.55; color: var(--sa-text-dim); }
.sa-my__forget {
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--sa-text-dim);
	font: inherit;
	font-size: 12.5px;
	text-decoration: underline;
	cursor: pointer;
}
.sa-my__forget.is-armed { color: var(--sa-heart); font-weight: 700; }

/* ── phones ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.sa-my { padding-top: 1.1rem; }
	.sa-my__stats { gap: 10px 18px; }
	.sa-my-stat { min-width: 0; flex: 1 1 28%; padding-left: 12px; }
	.sa-my-card { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; }
	.sa-my-card__thumb { width: 56px; border-radius: 10px; }
	.sa-my-card__cta { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
	.sa-my__spin { animation: none; }
	.sa-my-btn:active { transform: none; }
}
