/*
 * The sign-in overlay, offered when a signed-out visitor tries to vote.
 *
 * ⚠️ IT STYLES THE CONTENT AND NOT THE POPUP.
 *
 * Bricks owns `.brx-popup`, its backdrop and its open/close transition, and all
 * three are editable in the builder's popup settings. Anything here that set a
 * width or a backdrop colour would be a second opinion, winning silently, in a
 * file nobody opens while looking at the popup panel.
 *
 * So this file dresses `.oview-prompt` and stops. Every value is a token, and
 * the card, button and text language is the one /join/ and /signin/ already use
 * - because somebody meeting this overlay is one click from those pages and
 * should not notice a change of voice.
 */

.oview-prompt {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-s);
	inline-size: min(42rem, calc(100vw - var(--space-l)));
	padding: var(--space-l);
	text-align: center;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-l-2);
}

.oview-prompt__icon {
	inline-size: 4.4rem;
	block-size: 4.4rem;
	padding: var(--space-2xs);
	color: var(--color-accent-ink);
	background: var(--color-accent-soft);
	border-radius: var(--radius-full);
}

.oview-prompt__title {
	margin: 0;
	font-size: var(--text-l);
}

.oview-prompt__body {
	margin: 0;
	max-inline-size: 34rem;
	color: var(--color-text-muted);
	font-size: var(--text-xs);
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
 * The two doors.
 *
 * Create-an-account is the primary and sign-in is the secondary, which is the
 * opposite weighting to a normal login screen and is deliberate: everybody
 * seeing this overlay was refused for the same reason, and most of them do not
 * have an account to sign into.
 * -------------------------------------------------------------------------- */

.oview-prompt__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-s);
	inline-size: 100%;
	margin-block-start: var(--space-2xs);
}

.oview-prompt__action {
	flex: 1 1 16rem;
	max-inline-size: 22rem;
	text-align: center;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
 * The close control.
 *
 * ⚠️ Backdrop-click and ESC already close this, and neither is discoverable.
 * The X is the visible half of a promise the other two keep silently.
 *
 * 44px because it is the smallest thing a finger reliably hits, which is the
 * same floor `check-mobile.js` holds every other control to.
 * -------------------------------------------------------------------------- */

.oview-prompt__close {
	position: absolute;
	inset-block-start: var(--space-2xs);
	inset-inline-end: var(--space-2xs);
	display: grid;
	place-items: center;
	inline-size: 4.4rem;
	block-size: 4.4rem;
	padding: 0;
	font-size: var(--text-l);
	line-height: 1;
	color: var(--color-text-muted);
	background: none;
	border: 1px solid transparent;
	border-radius: var(--radius-full);
	cursor: pointer;
}

.oview-prompt__close:hover {
	color: var(--color-text);
	background: var(--color-surface-sunk);
}

.oview-prompt__close:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* The readout inside a card keeps saying it after the overlay is dismissed. */
.oview-vote__signin {
	color: var(--color-text-muted);
	font-size: var(--text-xs);
}
