/**
 * GothamPeps :: Sign-in / create-account popup and members-only gate
 *
 * Loaded for visitors only. The card is the same in both places; the gate
 * adds a full-screen photographic backdrop, the header popup sits over the
 * shared .gp-overlay.
 */

/* ==========================================================================
   Card
   ========================================================================== */

.gp-auth {
	position: relative;
	width: 100%;
	max-width: 30rem;
	padding: 2rem 1.5rem 1.5rem;
	background: var(--gp-surface);
	border: 1px solid rgba(57, 134, 245, .35);
	border-radius: var(--gp-radius-lg);
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
	color: var(--gp-body-color);
}

@media (min-width: 640px) {
	.gp-auth { padding: 2.5rem 2.5rem 2rem; }
}

/* Thin gold rule across the top edge. */
.gp-auth::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 2rem;
	right: 2rem;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--gp-primary), transparent);
}

.gp-auth__head { margin-bottom: 1.5rem; text-align: center; }

.gp-auth__brand {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .625rem;
	margin-bottom: 1.25rem;
	color: var(--gp-white);
}

.gp-auth__brand .gp-brand__logo { max-height: 3rem; width: auto; }

.gp-auth__brand .gp-brand__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--gp-primary);
	color: var(--gp-primary);
	font-family: var(--gp-font-heading);
	font-size: 1.125rem;
}

.gp-auth__brand .gp-brand__text {
	font-family: var(--gp-font-heading);
	font-size: 1.25rem;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.gp-auth__eyebrow {
	display: block;
	margin-bottom: .5rem;
	color: var(--gp-primary);
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.gp-auth__title {
	margin: 0 0 .625rem;
	color: var(--gp-heading-color);
	font-family: var(--gp-font-heading);
	font-size: 1.75rem;
	font-weight: var(--gp-heading-weight);
	line-height: 1.15;
}

@media (min-width: 640px) {
	.gp-auth__title { font-size: 2rem; }
}

.gp-auth__intro {
	margin: 0 auto;
	max-width: 24rem;
	color: var(--gp-muted);
	font-size: .9375rem;
	line-height: 1.6;
}

/* Notices -------------------------------------------------------------- */

.gp-auth__notices { margin-bottom: 1.25rem; font-size: .875rem; }
.gp-auth__notices .woocommerce-error,
.gp-auth__notices .woocommerce-message,
.gp-auth__notices .woocommerce-info { margin: 0; }

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

.gp-auth__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--gp-border);
}

.gp-auth__tab {
	position: relative;
	padding: .875rem .5rem;
	border: 0;
	background: none;
	color: var(--gp-muted);
	font-family: var(--gp-font-body);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color var(--gp-speed) var(--gp-ease);
}

.gp-auth__tab::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--gp-primary);
	transform: scaleX(0);
	transition: transform var(--gp-speed) var(--gp-ease);
}

.gp-auth__tab:hover { color: var(--gp-heading-color); }
.gp-auth__tab[aria-selected="true"] { color: var(--gp-heading-color); }
.gp-auth__tab[aria-selected="true"]::after { transform: scaleX(1); }

/* Fields --------------------------------------------------------------- */

/* WooCommerce boxes form.login / form.register; inside the card that doubles up. */
.gp-auth .gp-auth__form,
.woocommerce .gp-auth form.login,
.woocommerce .gp-auth form.register {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.gp-auth__field { margin: 0 0 1rem; }

.gp-auth__field label {
	margin-bottom: .375rem;
	color: var(--gp-heading-color);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.gp-auth input[type="text"],
.gp-auth input[type="email"],
.gp-auth input[type="password"] {
	padding: .8125rem 1rem;
	background: var(--gp-card);
	border-color: var(--gp-surface-2);
	font-size: 1rem; /* 16px keeps iOS from zooming on focus. */
}

.gp-auth__password { position: relative; display: block; }
.gp-auth__password input { padding-right: 3rem !important; }

.gp-auth__reveal {
	position: absolute;
	top: 50%;
	right: .375rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	background: none;
	color: var(--gp-muted);
	cursor: pointer;
	transform: translateY(-50%);
}

.gp-auth__reveal:hover { color: var(--gp-primary); }

/* WooCommerce's script adds its own reveal button to every password field. */
.gp-auth .show-password-input { display: none !important; }
.gp-auth__reveal svg { width: 1.125rem; height: 1.125rem; }
.gp-auth__reveal .gp-auth__eye-hide,
.gp-auth__reveal[aria-pressed="true"] .gp-auth__eye-show { display: none; }
.gp-auth__reveal[aria-pressed="true"] .gp-auth__eye-hide { display: block; }

.gp-auth__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 1rem;
	margin: .25rem 0 1.25rem;
	font-size: .8125rem;
}

.gp-auth__check {
	display: inline-flex;
	align-items: center;
	margin: 0;
	color: var(--gp-body-color);
	font-size: .8125rem;
	font-weight: 400;
	cursor: pointer;
}

.gp-auth__link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--gp-primary);
	font: inherit;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: rgba(57, 134, 245, .4);
	text-underline-offset: 3px;
	cursor: pointer;
}

.gp-auth__link:hover { color: var(--gp-primary-hover); text-decoration-color: currentColor; }

.gp-auth__hint { margin: 0 0 1rem; color: var(--gp-muted); font-size: .8125rem; }

/* WooCommerce's privacy-policy text, printed on woocommerce_register_form. */
.gp-auth .woocommerce-privacy-policy-text { margin-bottom: 1.25rem; color: var(--gp-muted); font-size: .75rem; line-height: 1.6; }
.gp-auth .woocommerce-privacy-policy-text p { margin: 0; }

.gp-auth__submit { width: 100%; padding-block: 1rem; }

.gp-auth__switch {
	margin: 1.25rem 0 0;
	color: var(--gp-muted);
	font-size: .875rem;
	text-align: center;
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.gp-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Footer --------------------------------------------------------------- */

.gp-auth__foot {
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--gp-border);
	text-align: center;
}

.gp-auth__disclaimer {
	margin: 0;
	color: var(--gp-muted);
	font-size: .6875rem;
	letter-spacing: .08em;
	line-height: 1.6;
	text-transform: uppercase;
}

.gp-auth__legal {
	display: flex;
	justify-content: center;
	gap: 1.25rem;
	margin-top: .625rem;
	font-size: .75rem;
}

.gp-auth__legal a { color: var(--gp-muted); }
.gp-auth__legal a:hover { color: var(--gp-primary); }

/* ==========================================================================
   Members-only gate
   ========================================================================== */

body.gp-gate-body {
	min-height: 100vh;
	padding-bottom: 0;
	background: var(--gp-black);
}

.gp-gate {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 2rem var(--gp-gutter);
	overflow: hidden;
	isolation: isolate;
}

.gp-gate__backdrop {
	position: fixed;
	inset: -2rem;
	z-index: -1;
	background-color: var(--gp-white);
	background-position: center;
	background-size: cover;
	filter: blur(6px) saturate(.9);
	transform: scale(1.04);
}

.gp-gate__backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .88) 70%),
		linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .35));
}

.gp-auth--gate { animation: gp-auth-in .5s var(--gp-ease) both; }

@keyframes gp-auth-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Header popup
   ========================================================================== */

.gp-auth-modal {
	position: fixed;
	inset: 0;
	z-index: var(--gp-z-modal);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 1.5rem var(--gp-gutter);
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--gp-speed) var(--gp-ease), visibility var(--gp-speed) var(--gp-ease);
}

@media (min-height: 760px) {
	.gp-auth-modal { align-items: center; }
}

.gp-auth-modal.gp-is-active { opacity: 1; visibility: visible; }

.gp-auth--modal {
	margin-block: auto;
	transform: translateY(12px);
	transition: transform var(--gp-speed) var(--gp-ease);
}

.gp-auth-modal.gp-is-active .gp-auth--modal { transform: none; }

.gp-auth__close {
	position: absolute;
	top: .75rem;
	right: .75rem;
	display: inline-flex;
	padding: .5rem;
	border: 0;
	background: none;
	color: var(--gp-muted);
	cursor: pointer;
}

.gp-auth__close:hover { color: var(--gp-heading-color); }
.gp-auth__close svg { width: 1.25rem; height: 1.25rem; }
