/* Moved out of shop.css so that only the page that needs it loads it. */
/* ==========================================================================
   Sign in (My account, signed out): one card, the bolt docked on its top
   edge. Frame: inc/sign-in.php. Google's button is the Accounts plugin's.
   ========================================================================== */

/* The band above is left out: the card holds the headline. That makes this
   section the top of the page, so it may glow. */
body.hzs-signin-view .hzs-band--shop {
	display: none;
}

body.hzs-signin-view .et_pb_section.hzs-shop--page {
	background: radial-gradient(60% 50% at 50% 0%, rgba(124, 58, 237, 0.26), transparent 70%), var(--surface-b);
}

body.hzs .hzs-signin {
	display: grid;
	justify-items: center;
	max-width: 25rem;
	margin: 0 auto;
	text-align: center;
}

/* The bolt, with two rings and a soft light behind it. The picture is only
   placed. */
body.hzs .hzs-signin__mark {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 11rem;
	height: 11rem;
}

body.hzs .hzs-signin__mark::before,
body.hzs .hzs-signin__mark::after {
	content: "";
	position: absolute;
	border-radius: 50%;
}

body.hzs .hzs-signin__mark::before {
	inset: 14%;
	border: 1px solid rgba(242, 100, 234, 0.34);
	background: radial-gradient(closest-side, rgba(124, 58, 237, 0.3), transparent);
}

body.hzs .hzs-signin__mark::after {
	inset: 0;
	border: 1px dashed rgba(167, 139, 250, 0.24);
}

body.hzs .hzs-signin__mark img {
	position: relative;
	width: auto;
	height: 66%;
}

body.hzs .hzs-signin__card {
	display: grid;
	justify-items: center;
	gap: 0.75rem;
	box-sizing: border-box;
	width: 100%;
	margin-top: -4.25rem;
	padding: 4.5rem 1.5rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--r-form);
	background: var(--surface-card);
}

body.hzs #main-content .hzs-signin__title {
	margin: 0;
	padding: 0;
	font-family: var(--font-heading);
	font-size: var(--fs-h1);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.035em;
	color: var(--text-strong);
}

/* A headline is one color (design.md). */
body.hzs .hzs-signin__title em {
	font-style: normal;
}

body.hzs .hzs-signin__card > p,
body.hzs .hzs-signin .accounts-door > p {
	margin: 0;
	padding: 0;
	text-wrap: balance;
}

body.hzs .hzs-signin__lead {
	font-size: var(--fs-lead);
	color: var(--text-body);
}

body.hzs .hzs-signin__new {
	font-weight: 600;
	color: var(--text-strong);
}

/* The plugin's panel takes the site's colors. */
body.hzs .hzs-signin .accounts-door {
	justify-items: center;
	width: 100%;
	max-width: none;
	margin: 0.5rem 0 0;
}

/* On the card the fields' usual edge is too faint (2.57 to 1 against the card). Solid lilac reads (4.9 to 1). */
body.hzs.woocommerce-page #main-content .hzs-signin :is(input.input-text, input[type="checkbox"]:not(:checked)) {
	border-color: var(--hzs-lilac);
}

/* The plugin prints its panel hidden and its script shows it. With scripts
   on (the class hzs-js is set before the page is drawn) the panel has its
   room from the start, so the card does not grow under the visitor's eyes.
   With scripts off it stays hidden, as the plugin means it to. Once the page
   has loaded (the class hzs-loaded, set by site.js) a panel that is still
   hidden stays hidden: the plugin's script did not run. */
html.hzs-js:not(.hzs-loaded) body.hzs .hzs-signin .accounts-door[hidden] {
	display: grid !important;
}

/* While Google's button loads, a quiet shape holds its place, so nothing
   below it jumps. */
body.hzs .hzs-signin .accounts-door:not(.is-in-app):not(:has(.accounts-door__slot:not([hidden]), [data-accounts-press]:not([hidden])))::before {
	content: "";
	width: 100%;
	height: 2.75rem;
	border-radius: var(--r-button);
	background: var(--line);
}

/* Google's frame is 20px wider than its button and pulls itself back with a
   margin. A width limit would cut the button's right end. */
body.hzs .hzs-signin .accounts-door__slot {
	width: 100%;
	/* One fixed height: Google's frame settles its own size a moment after it is drawn. */
	height: 2.75rem;
	overflow: hidden;
}

body.hzs .hzs-signin .accounts-door__slot > div {
	width: fit-content;
	margin-inline: auto;
}

body.hzs .hzs-signin .accounts-door__slot iframe {
	max-width: none;
}

/* "One moment." and "You are in." are for a screen reader. A refusal and a line to read
   (is-note: "we sent a code", the line inside an app's browser) are shown to everyone. */
body.hzs .hzs-signin .accounts-door__msg:not(.is-bad, .is-note) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

body.hzs .hzs-signin .accounts-door__note {
	max-width: 20rem;
	font-size: var(--fs-small);
	line-height: 1.5;
	color: var(--text-body);
}

/* The plugin's password hint: the card has no password form. */
body.hzs .hzs-signin .accounts-door__note ~ .accounts-door__note {
	display: none;
}

/* The email door, under Google's button. */
body.hzs .hzs-signin .accounts-door__email {
	width: 100%;
	margin-top: 0.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--line);
	text-align: left;
}

body.hzs .hzs-signin .accounts-door__email label {
	font-weight: 600;
	color: var(--text-strong);
}

body.hzs .hzs-signin .accounts-door__sub {
	text-align: center;
	color: var(--text-strong);
}

body.hzs .hzs-signin .accounts-door__email .accounts-door__note {
	margin-inline: auto;
	text-align: center;
}

body.hzs .hzs-signin .accounts-door__email .accounts-door__msg {
	margin: 0;
}

/* The shop's password form, shown only while Google sign-in is off. */
body.hzs #main-content .hzs-signin__card > h2 {
	display: none;
}

body.hzs .woocommerce .hzs-signin__card form.login,
body.hzs.woocommerce-page #main-content .hzs-signin__card form.login {
	width: 100%;
	margin: 0;
	padding: 0 0 0.5rem;
	border: 0;
	border-radius: 0;
	background: none;
	text-align: left;
}

body.hzs .hzs-signin__back {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap-min);
	margin-top: 0.5rem;
	font-size: var(--fs-button);
	font-weight: 600;
}

@media (min-width: 1024px) {
	body.hzs .hzs-signin__mark {
		width: 13.5rem;
		height: 13.5rem;
	}
}

@media (max-width: 767px) {
	body.hzs .hzs-signin__card {
		padding-inline: 1.25rem;
	}
}
