/**
 * Member-gate login page + Stone Delivery micro-interaction (Sprint 3, Task 2).
 * Loaded only by the self-rendered gate page (see class-member-gate.php).
 * Brand hexes are inlined here — the gate renders outside the theme, so the
 * theme.json CSS custom properties aren't available.
 */

body.riverdale-gate {
	font-family: system-ui, sans-serif;
	background: #251B64; /* deep-indigo */
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.member-gate {
	background: #fff;
	border-radius: 24px; /* stone curvature */
	padding: 2.5rem;
	width: min(92vw, 420px);
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.25 );
}

.member-gate h1 {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	color: #000;
}

.member-gate label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #000;
}

.member-gate input[type="password"],
.member-gate .gate-password input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem;
	border: 2px solid #000;
	border-radius: 12px;
	font-size: 1rem;
}

/* Show/hide the password. The field keeps its full width and the button sits
   over its right edge, so revealing costs no layout shift on a phone. Extra
   right padding keeps the longest password clear of the button. */
.member-gate .gate-password {
	position: relative;
	display: block;
}

.member-gate .gate-password input {
	padding-right: 3.25rem;
}

.member-gate .gate-password__toggle {
	position: absolute;
	top: 50%;
	right: 0.25rem;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	padding: 0;
	color: #555;
	cursor: pointer;
	/* A finger target, not a mouse one — this is used at the rink. The icon
	   inside stays small; the tappable box around it does not. */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
}

.member-gate .gate-password__toggle:hover {
	color: #1f6feb;
}

.member-gate .gate-password__toggle svg {
	width: 22px;
	height: 22px;
	display: block;
}

/* Which eye shows. Driven by a class on the button rather than by JS setting
   `hidden` on the <svg>: `hidden` is an HTMLElement property and SVGElement
   does not reflect it, so assigning it in script does nothing at all. */
.member-gate .gate-password__toggle .gate-password__eye-off,
.member-gate .gate-password__toggle.is-revealed .gate-password__eye {
	display: none;
}

.member-gate .gate-password__toggle.is-revealed .gate-password__eye-off {
	display: block;
}

.member-gate .gate-password__toggle:focus-visible {
	outline: 2px solid #1f6feb;
	outline-offset: 2px;
	border-radius: 6px;
}

.member-gate .gate-error {
	color: #E51937; /* athletic-red */
	font-weight: 600;
	margin: 0 0 1rem;
}

/* "Use your team password" notice on the front door. Dismissable — the JS
   remembers the dismissal in localStorage and removes it on the next visit. */
.member-gate .gate-banner {
	position: relative;
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	margin: 0 0 1.25rem;
	padding: 0.85rem 2.1rem 0.85rem 0.9rem;
	border-radius: 12px;
	border-left: 4px solid #E51937; /* athletic-red accent */
	background: #f3f4fb;
}

.member-gate .gate-banner__icon {
	font-size: 1.1rem;
	line-height: 1.4;
	color: #251B64; /* deep-indigo */
}

.member-gate .gate-banner p {
	margin: 0;
	font-size: 0.86rem;
	line-height: 1.45;
	color: #000;
	text-wrap: pretty;
}

.member-gate .gate-banner__dismiss {
	position: absolute;
	top: 0.35rem;
	right: 0.45rem;
	border: 0;
	background: none;
	padding: 0.2rem 0.35rem;
	font-size: 1.1rem;
	line-height: 1;
	color: #251B64;
	cursor: pointer;
}

/* Team-password prompt: explains what is missing without shouting like an error. */
.member-gate .gate-note {
	margin: 0 0 1.25rem;
	font-size: 0.92rem;
	line-height: 1.5;
	opacity: 0.85;
	text-wrap: pretty;
}

/* The delivery lane — the ice sheet the stone travels down. */
.delivery {
	position: relative;
	height: 64px;
	margin-top: 1.25rem;
	border-radius: 12px;
	background: linear-gradient( #eef3ff, #dbe6ff );
	border: 2px solid #cdd8f0;
	overflow: hidden;
}

/* The submit button, styled as the stone at the hack (left). */
.delivery .stone {
	position: absolute;
	top: 50%;
	left: 8px;
	transform: translateY( -50% );
	padding: 0.6rem 1.15rem;
	border: 0;
	border-radius: 999px;
	background: #E51937; /* athletic-red */
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	z-index: 2;
	transition: left 0.8s cubic-bezier( 0.45, 0.05, 0.25, 1 );
}

/* On submit the JS adds .delivering → the stone slides toward the house. */
.delivery.delivering .stone {
	left: calc( 100% - 128px );
}

/* Target vector: the house rings at the far end of the lane. */
.delivery .house {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY( -50% );
	width: 44px;
	height: 44px;
	z-index: 1;
}

@media ( prefers-reduced-motion: reduce ) {
	.delivery .stone {
		transition: none;
	}
}
