/*
 * The header's account element (Places Found Place Pages 0.50.0, includes/header-account.php).
 *
 * The header and its menu drawer are the style reference's dark chrome (Ink Deep), so the element
 * takes the header's colours: Cream text, Rust on Ink for focus rings and underlines, Join a Rust
 * fill with a Paper label (Rust Deep on hover), the open menu Ink Raised (docs/site-style-reference.html).
 * Its rules start with div.pf-header-account, which outranks what Kadence's HTML elements give links
 * (an underline, the Customizer's link colours) and what it gives every button.
 */

.pf-header-account {
	--pf-ha-raised: #1B1E24;
	--pf-ha-cream: #E8E2D6;
	--pf-ha-cream-soft: rgba(232, 226, 214, .68);
	--pf-ha-cream-muted: rgba(232, 226, 214, .62);
	--pf-ha-rule: rgba(232, 226, 214, .12);
	--pf-ha-rust: #B4552B;
	--pf-ha-rust-deep: #A24C27;
	--pf-ha-rust-on-ink: #D06837;
	--pf-ha-paper: #FAF7F1;
	--pf-ha-ink: #14161A;
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1.3;
	text-align: left;
}

.pf-header-account *,
.pf-header-account *::before,
.pf-header-account *::after {
	box-sizing: border-box;
}

/* ---- Signed out: Sign in and Join ------------------------------------------------------- */

.pf-header-account--header {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
}

div.pf-header-account a.pf-header-account__signin,
div.pf-header-account a.pf-header-account__join {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 2px;
	font-family: inherit;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

div.pf-header-account a.pf-header-account__signin {
	min-height: 44px;
	padding: 0 10px;
	color: var(--pf-ha-cream);
	font-size: 15px;
}

div.pf-header-account a.pf-header-account__signin:hover {
	color: var(--pf-ha-cream);
	text-decoration: underline;
	text-decoration-color: var(--pf-ha-rust-on-ink);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

div.pf-header-account a.pf-header-account__join {
	height: 36px;
	padding: 0 16px;
	background: var(--pf-ha-rust);
	color: var(--pf-ha-paper);
	font-size: 14px;
	transition: background-color 200ms ease-out;
}

/* A 44px target around the 36px button, as the header's own buttons are drawn. */
div.pf-header-account a.pf-header-account__join::after {
	content: "";
	position: absolute;
	top: -4px;
	right: 0;
	bottom: -4px;
	left: 0;
}

div.pf-header-account a.pf-header-account__join:hover {
	background: var(--pf-ha-rust-deep);
	color: var(--pf-ha-paper);
	text-decoration: none;
}

div.pf-header-account a:focus-visible,
div.pf-header-account button:focus-visible {
	outline: 2px solid var(--pf-ha-rust-on-ink);
	outline-offset: 2px;
}

/* ---- Signed in: the picture and its menu ------------------------------------------------- */

div.pf-header-account a.pf-header-account__button,
div.pf-header-account button.pf-header-account__button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	margin: 0;
	padding: 0 4px 0 6px;
	border: 0;
	border-radius: 22px;
	background: transparent;
	box-shadow: none;
	color: var(--pf-ha-cream-soft);
	font: inherit;
	line-height: 1;
	letter-spacing: normal;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
}

div.pf-header-account a.pf-header-account__button:hover,
div.pf-header-account button.pf-header-account__button:hover,
div.pf-header-account button.pf-header-account__button:focus,
div.pf-header-account button.pf-header-account__button:active {
	background: transparent;
	box-shadow: none;
	color: var(--pf-ha-cream);
}

.pf-header-account .pf-header-account__picture {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--pf-ha-cream);
	color: var(--pf-ha-ink);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .02em;
}

.pf-header-account .pf-header-account__picture img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.pf-header-account .pf-header-account__button .pf-header-account__picture {
	box-shadow: 0 0 0 1px rgba(232, 226, 214, .38);
	transition: box-shadow 180ms ease-out;
}

.pf-header-account .pf-header-account__button:hover .pf-header-account__picture,
.pf-header-account.is-open .pf-header-account__button .pf-header-account__picture {
	box-shadow: 0 0 0 2px var(--pf-ha-cream);
}

.pf-header-account .pf-header-account__chevron {
	flex: none;
	width: 10px;
	height: 10px;
	transition: transform 180ms ease-out;
}

.pf-header-account.is-open .pf-header-account__chevron {
	transform: rotate(180deg);
}

/* "Your account", for screen readers: the picture itself is decorative. */
.pf-header-account .pf-header-account__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.pf-header-account .pf-header-account__panel {
	position: absolute;
	top: calc(100% + 12px);
	right: 0;
	z-index: 1000;
	display: block;
	width: 288px;
	max-width: calc(100vw - 32px);
	border: 1px solid var(--pf-ha-rule);
	border-radius: 4px;
	background: var(--pf-ha-raised);
	box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
	color: var(--pf-ha-cream);
	animation: pf-header-account-in 180ms ease-out;
}

.pf-header-account .pf-header-account__panel[hidden] {
	display: none;
}

/* The pointer's way from the picture down to the menu: no gap where it would close. */
.pf-header-account .pf-header-account__panel::before {
	content: "";
	position: absolute;
	top: -13px;
	right: 0;
	left: 0;
	height: 13px;
}

@keyframes pf-header-account-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---- The person, and the links (the menu and the drawer) ---------------------------------- */

.pf-header-account .pf-header-account__who {
	display: flex;
	align-items: center;
	gap: 12px;
}

.pf-header-account--header .pf-header-account__who {
	padding: 16px 16px 14px;
	border-bottom: 1px solid var(--pf-ha-rule);
}

.pf-header-account .pf-header-account__who .pf-header-account__picture {
	width: 40px;
	height: 40px;
	font-size: 15px;
}

.pf-header-account .pf-header-account__who-text {
	min-width: 0;
}

div.pf-header-account p.pf-header-account__name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 8px;
	margin: 0;
	color: var(--pf-ha-cream);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

div.pf-header-account p.pf-header-account__state {
	margin: 2px 0 0;
	color: var(--pf-ha-cream-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

/* The "AI-managed" chip: the site's pill (account.css, place-page.css), its colours turned for the dark
   menu. Its selector outranks My Account's own chip rule (body.pf-account-page .pf-ai-chip), whose dark
   fill would vanish on the menu. */
div.pf-header-account span.pf-ai-chip {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--pf-ha-cream);
	color: var(--pf-ha-ink);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .02em;
	text-transform: none;
	white-space: nowrap;
}

div.pf-header-account ul.pf-header-account__links {
	margin: 0;
	padding: 6px 0;
	list-style: none;
}

div.pf-header-account li.pf-header-account__item {
	margin: 0;
	padding: 0;
}

div.pf-header-account li.pf-header-account__item--signout {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid var(--pf-ha-rule);
}

div.pf-header-account a.pf-header-account__link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	color: var(--pf-ha-cream);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}

div.pf-header-account a.pf-header-account__link:hover {
	background: rgba(232, 226, 214, .07);
	color: var(--pf-ha-cream);
	text-decoration: none;
}

div.pf-header-account a.pf-header-account__link:focus-visible {
	outline-offset: -2px;
}

/* ---- In the phone and tablet menu drawer: laid open --------------------------------------- */

.pf-header-account--drawer {
	margin: 0 0 6px;
	padding: 4px 0 16px;
	border-bottom: 1px solid var(--pf-ha-rule);
}

.pf-header-account--drawer .pf-header-account__who {
	padding: 0 0 10px;
}

.pf-header-account--drawer .pf-header-account__who .pf-header-account__picture {
	width: 44px;
	height: 44px;
	font-size: 16px;
}

div.pf-header-account--drawer ul.pf-header-account__links {
	padding: 0;
}

div.pf-header-account--drawer li.pf-header-account__item--signout {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

div.pf-header-account--drawer a.pf-header-account__link {
	padding: 0;
}

div.pf-header-account--drawer a.pf-header-account__link:hover {
	background: none;
	text-decoration: underline;
	text-decoration-color: var(--pf-ha-rust-on-ink);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

div.pf-header-account--drawer a.pf-header-account__link:focus-visible {
	outline-offset: 2px;
}

.pf-header-account--drawer.pf-header-account--signed-out {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding-top: 6px;
	padding-bottom: 20px;
}

div.pf-header-account--drawer a.pf-header-account__signin {
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid rgba(232, 226, 214, .55);
}

div.pf-header-account--drawer a.pf-header-account__signin:hover {
	border-color: var(--pf-ha-cream);
	text-decoration: none;
}

div.pf-header-account--drawer a.pf-header-account__join {
	height: auto;
	min-height: 44px;
	font-size: 15px;
}

div.pf-header-account--drawer a.pf-header-account__join::after {
	content: none;
}

/* ---- While the menu is open --------------------------------------------------------------- */

/* Kadence's header (#masthead) is a z-index 11 layer; the Explore Map's layers and card sit higher
   (400 to 1100), so while the menu is open the header goes above them. */
html.pf-header-account-open #masthead {
	z-index: 1300;
}

@media (prefers-reduced-motion: reduce) {
	.pf-header-account .pf-header-account__panel {
		animation: none;
	}

	.pf-header-account .pf-header-account__chevron,
	.pf-header-account .pf-header-account__button .pf-header-account__picture,
	div.pf-header-account a.pf-header-account__join {
		transition: none;
	}
}
