/*
 * Fan accounts: the header's account link and the My Account page
 * (inc/fan-accounts.php, inc/fan-follows.php).
 *
 * Every rule of the page starts from the class fha. Its colors are fixed
 * pairs, dark on light or white on dark, and do not follow the Theme Colors
 * pickers: a form that signs people in has to stay readable whatever a site
 * picks. The theme's root font size is 20px, so sizes here are in pixels.
 */

/* ---- the header link (fh_fan_header_link()) ---- */

.fh-acct {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.fh-acct:hover .fh-acct__t,
.fh-acct:focus .fh-acct__t {
	text-decoration: underline;
}
.fh-acct__i {
	flex: 0 0 auto;
}

/* ---- the page ---- */

.fha {
	max-width: 760px;
	margin: 0 auto;
	color: #1a2a3a;
	font-size: 16px;
	line-height: 1.5;
}
.fha *,
.fha *::before,
.fha *::after {
	box-sizing: border-box;
}
.fha-card {
	margin: 0 0 16px;
	padding: 20px;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
}
.fha-note {
	background: #fffbeb;
	border-color: #b45309;
}
.fha h2 {
	margin: 0 0 10px;
	color: #1a2a3a;
	font-size: 22px;
	line-height: 1.25;
}
.fha p {
	margin: 0 0 12px;
}
.fha p:last-child {
	margin-bottom: 0;
}
.fha a {
	color: #1a2a3a;
	text-decoration: underline;
}
.fha-muted {
	color: #475569;
	font-size: 14px;
}
.fha-who,
.fha-email {
	overflow-wrap: anywhere;
}

/* The message: what just happened, or what is wrong. */
.fha-msg {
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: 8px;
	font-weight: 700;
}
.fha-msg.ok {
	background: #f0fdf4;
	border: 1px solid #15803d;
	color: #14532d;
}
.fha-msg.err {
	background: #fef2f2;
	border: 1px solid #b91c1c;
	color: #7f1d1d;
}

/* The form */
.fha-label {
	display: block;
	margin: 0 0 4px;
	font-weight: 700;
}
.fha .fha-input {
	display: block;
	width: 100%;
	max-width: 420px;
	min-height: 44px;
	margin: 0 0 14px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #64748b;
	border-radius: 8px;
	color: #1a2a3a;
	font-size: 16px;
}
.fha [aria-invalid="true"] {
	border: 2px solid #b91c1c;
}
.fha-chk {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 14px;
	font-weight: 400;
}
.fha .fha-chk input {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	margin: 0;
}
/* The trap field for robots: off the page, out of the tab order (tabindex -1), hidden from a screen reader. */
.fha-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Buttons */
.fha .fha-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	background: #1a2a3a;
	border: 2px solid #1a2a3a;
	border-radius: 8px;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}
.fha .fha-btn:hover {
	background: #0f1a26;
	border-color: #0f1a26;
}
.fha .fha-btn--ghost {
	background: #fff;
	color: #1a2a3a;
}
.fha .fha-btn--ghost:hover {
	background: #e2e8f0;
	border-color: #1a2a3a;
}
.fha .fha-btn--danger {
	background: #b91c1c;
	border-color: #b91c1c;
	color: #fff;
}
.fha .fha-btn--danger:hover {
	background: #7f1d1d;
	border-color: #7f1d1d;
}
.fha .fha-btn--small {
	padding: 8px 14px;
	font-size: 14px;
}
.fha-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
}
.fha-row form {
	margin: 0;
}
.fha :is(a, button, input):focus-visible {
	outline: 3px solid #1a2a3a;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #fff;
}

/* The followed players */
.fha .fha-players {
	margin: 0;
	padding: 0;
	list-style: none;
}
.fha-player {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-top: 1px solid #e2e8f0;
}
.fha-player form {
	margin: 0 0 0 auto;
}
.fha .fha-player__pic {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	max-width: none;
	border-radius: 50%;
	background: #e2e8f0;
	object-fit: cover;
}
.fha .fha-player__pic--none {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #334155;
	font-size: 16px;
	font-weight: 800;
}
.fha .fha-player__name {
	min-width: 0;
	font-weight: 700;
	overflow-wrap: anywhere;
}

@media (max-width: 600px) {
	.fha-card {
		padding: 16px;
	}
	.fha-player {
		flex-wrap: wrap;
	}
}
