/*
 * The sign-in / sign-up pop-out.
 *
 * Hand-written, plain CSS, on purpose. The site's other stylesheets are a
 * compiled Tailwind build (assets/css/main.css) and would need `npx tailwindcss`
 * to add a class; this file needs nothing, so a file-by-file FTP deploy that
 * carries it always matches the markup that uses it. The theme's own style.css
 * is the WordPress theme header and is served verbatim, so it is not the place
 * for this either.
 *
 * What is inside is only the shell: the position, the backdrop, the close bar
 * and the padding. Everything the sheet contains is the real /login/ and
 * /register/ page, so its own classes are already in the Tailwind build.
 */

.duncan-auth {
	position: fixed;
	inset: 0 0 0 auto;
	margin: 0;
	padding: 0;
	width: min(460px, 100%);
	max-width: 100%;
	height: 100vh;
	height: 100dvh;
	max-height: 100vh;
	max-height: 100dvh;
	border: 0;
	background: #fff;
	color: inherit;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	box-shadow: -10px 0 40px rgba(15, 23, 42, .18);
}

.duncan-auth::backdrop {
	background: rgba(12, 20, 33, .5);
}

@media (max-width: 640px) {
	.duncan-auth {
		width: 100%;
		box-shadow: none;
	}
}

/* The close control. Sticky, so it stays reachable while the sheet is scrolled
   to the bottom of the registration form. */
.duncan-auth__bar {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	justify-content: flex-end;
	padding: .5rem .75rem;
	background: #fff;
	border-bottom: 1px solid #e8e4dd;
}

.duncan-auth__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid #e8e4dd;
	border-radius: 9999px;
	background: #fff;
	color: #1f2937;
	cursor: pointer;
}

.duncan-auth__close:hover {
	background: #f4f2ee;
}

.duncan-auth__loading,
.duncan-auth__notice {
	margin: 0;
	padding: 2rem 1.25rem;
	font-size: .9375rem;
	color: #4b5563;
}

.duncan-auth__notice {
	color: #b91c1c;
}

/*
 * The page, re-padded for the sheet, and forced to a single column.
 *
 * The page's two-column arrangement turns on at the `lg:` breakpoint, which
 * Tailwind measures against the VIEWPORT, not the container. A desktop visitor
 * would otherwise get the page's wide layout squeezed into a 460px panel: the
 * form at lg:w-[420px] with the aside at lg:w-[250px] beside it, 670px of
 * content in a 460px box. So the flex row is turned back into a stack here.
 */
.duncan-auth [data-duncan-auth-page] {
	padding: 1rem 1.25rem 2.5rem;
}

.duncan-auth [data-duncan-auth-page] .lg\:flex {
	display: block;
}

/* One heading size inside the sheet, whatever the page set. */
.duncan-auth [data-duncan-auth-page] .duncan-title {
	font-size: 1.5rem;
	line-height: 2rem;
}
