/*
 * The pending-email banner (cili/account/email-confirmation.php, assets/js/confirm-email.js; ADR-0078; WEB-1583 to WEB-1590): a
 * band at the top of every page while the signed-in member's address is not confirmed, in the page's flow (not fixed, so it hides
 * no control and needs no scroll padding), printed on `wp_body_open` before the header.
 *
 * Grayscale only (ADR-0018): every value is a design token (design-tokens.css, design-tokens-dark.css), which ./scripts/verify.sh
 * checks, so the dark mode (ADR-0045) follows the tokens with no rule of its own. The panel gray, the divider hairline under it,
 * the ink text; the primary button is the ink fill with the on-ink text, the second one a plain outline; every control is at least
 * 44px high and wide. `.is-attention` (a gated action was refused, assets/js/confirm-email.js) takes the ink outline. Nothing
 * animates, so reduced motion needs no rule. Every rule starts with `html body`, as the other layouts do.
 */

html body .cili-confirm {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--lcr-space-12) var(--lcr-space-24);
	padding: var(--lcr-space-12) var(--lcr-web-gutter-phone);
	border-bottom: var(--lcr-size-hairline) solid var(--lcr-color-divider);
	background-color: var(--lcr-color-panel);
	color: var(--lcr-color-ink);
	font-size: var(--lcr-type-body-font-size);
	line-height: var(--lcr-type-body-line-height);
}

html body .cili-confirm.is-attention {
	outline: 2px solid var(--lcr-color-ink);
	outline-offset: -2px;
}

html body .cili-confirm__text {
	flex: 1 1 280px;
	min-width: 0;
}

html body .cili-confirm p {
	margin: 0;
}

html body .cili-confirm__title {
	font-weight: var(--lcr-font-weight-semibold);
}

html body .cili-confirm__lead {
	color: var(--lcr-color-body);
	font-size: var(--lcr-type-small-font-size);
	line-height: var(--lcr-type-small-line-height);
}

html body .cili-confirm__message {
	font-size: var(--lcr-type-small-font-size);
	line-height: var(--lcr-type-small-line-height);
}

html body .cili-confirm__message:empty {
	display: none;
}

html body .cili-confirm__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--lcr-space-8);
}

html body .cili-confirm__code {
	box-sizing: border-box;
	width: 9em;
	height: auto; /* Heilz's theme.css gives every text input `height: 100%`, which stretched it to its container's height */
	min-height: 44px;
	padding: 0 var(--lcr-space-12);
	border: var(--lcr-size-hairline) solid var(--lcr-color-muted);
	border-radius: var(--lcr-radius-field);
	background-color: var(--lcr-color-background);
	color: var(--lcr-color-ink);
	font-family: var(--lcr-font-family-sans);
	font-size: var(--lcr-type-body-font-size);
}

html body .cili-confirm__button {
	box-sizing: border-box;
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--lcr-space-16);
	border: var(--lcr-size-hairline) solid var(--lcr-color-ink);
	border-radius: var(--lcr-radius-field);
	background-color: var(--lcr-color-ink);
	color: var(--lcr-color-on-ink);
	font-family: var(--lcr-font-family-sans);
	font-size: var(--lcr-type-body-font-size);
	font-weight: var(--lcr-font-weight-medium);
	cursor: pointer;
}

html body .cili-confirm__button--plain {
	background-color: transparent;
	color: var(--lcr-color-ink);
}

html body .cili-confirm__link {
	display: inline-flex;
	align-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--lcr-space-4);
	color: var(--lcr-color-ink);
	font-size: var(--lcr-type-small-font-size);
	text-decoration: underline;
}

/* "Send a new code" counts down in its own label (assets/js/confirm-code.js): the label's text sits over a hidden copy of the longest
   one ("Send a new code in 0:59"), both in one grid cell, so the button keeps one width and nothing beside it moves. While it waits
   it reads as not available (aria-disabled), still a button the keyboard reaches. */
html body .cili-confirm__label {
	display: inline-grid;
	justify-items: center;
}

html body .cili-confirm__label > * {
	grid-area: 1 / 1;
	font-variant-numeric: tabular-nums;
}

html body .cili-confirm__label-sizer {
	visibility: hidden;
}

html body .cili-confirm__button[aria-disabled="true"] {
	cursor: default;
	opacity: .6;
}

html body .cili-confirm__button[hidden],
html body .cili-confirm__link[hidden] {
	display: none;
}

/* "Still no code?" is a button that reads as the "Change email" link beside it. */
html body button.cili-confirm__link {
	justify-content: center;
	gap: var(--lcr-space-6);
	border: 0;
	background: none;
	font-family: var(--lcr-font-family-sans);
	cursor: pointer;
}

/* Its sad face (the owner's decision of 2026-11-16), a line icon of the label's size; the label alone is underlined. */
html body .cili-confirm__support-icon {
	--lcr-icon-size: var(--lcr-space-20);
	flex: none;
}

html body button.cili-confirm__support {
	text-decoration: none;
}

html body button.cili-confirm__support > span {
	text-decoration: underline;
}

html body .cili-confirm :is(.cili-confirm__code, .cili-confirm__button, .cili-confirm__link):focus-visible {
	outline: 2px solid var(--lcr-color-focus);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	html body .cili-confirm__actions {
		width: 100%;
	}

	html body .cili-confirm__code {
		flex: 1 1 8em;
	}
}

/* ------------------------------------------------------------------------------------------- inline, on Submit Art */

/* The same component as the page's content (cili_confirmation_component( true ), templates/page-templates/submission.php; the owner's
   decision of 2026-11-15, ADR-0078): Utillz lays Submit Art out over the whole window, below the logo bar, so the form is a
   centred panel, one column from 320px to the desktop, with the text, the code field and the buttons stacked. These rules come
   after the band's, and the phone rule above, so they win where the two meet (the band's `flex` bases are widths in a row and
   would be heights in this column). */
html body .cili-confirm--inline {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	justify-content: flex-start;
	max-width: var(--lcr-web-container-auth);
	margin: 0 auto;
	padding: var(--lcr-space-24);
	border: var(--lcr-size-hairline) solid var(--lcr-color-outline);
	border-radius: var(--lcr-radius-panel);
	gap: var(--lcr-space-20);
	text-align: center;
}

html body .cili-confirm--inline .cili-confirm__text {
	flex: none;
	display: flex;
	flex-direction: column;
	gap: var(--lcr-space-8);
}

html body .cili-confirm--inline .cili-confirm__title {
	color: var(--lcr-color-ink);
	font-size: var(--lcr-type-section-font-size);
	font-weight: var(--lcr-type-section-font-weight);
	line-height: var(--lcr-type-section-line-height);
}

html body .cili-confirm--inline .cili-confirm__lead {
	font-size: var(--lcr-type-body-font-size);
	line-height: var(--lcr-type-body-line-height);
	overflow-wrap: anywhere;
}

html body .cili-confirm--inline .cili-confirm__actions {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	width: 100%;
	gap: var(--lcr-space-12);
}

html body .cili-confirm--inline .cili-confirm__code {
	flex: none;
	width: 100%;
}

html body .cili-confirm--inline .cili-confirm__button {
	flex: none;
	width: 100%;
}

html body .cili-confirm--inline .cili-confirm__link {
	justify-content: center;
}

/* ------------------------------------------------------------------------------------------- the Submit Art dialog */

/* A native dialog in the top layer (showModal(): the focus trap, Escape, the page behind inert; assets/js/confirm-email-dialog.js),
   like the applauders' list and the promoted chip's panel: the page's background, the panel radius, the scrim behind it. */
html body dialog.cili-confirm-dialog {
	width: var(--lcr-web-container-auth);
	max-width: calc(100% - 2 * var(--lcr-web-gutter-phone));
	max-height: calc(100% - 2 * var(--lcr-web-gutter-phone));
	padding: 0;
	border: var(--lcr-size-hairline) solid var(--lcr-color-outline);
	border-radius: var(--lcr-radius-panel);
	background-color: var(--lcr-color-background);
	color: var(--lcr-color-body);
}

html body dialog.cili-confirm-dialog::backdrop {
	background-color: var(--lcr-color-scrim);
}

html body dialog.cili-confirm-dialog .cili-confirm-dialog__body {
	display: flex;
	flex-direction: column;
	gap: var(--lcr-space-12);
	padding: var(--lcr-space-24);
}

/* The close button sits in the dialog's top-right corner, at the space-12 token from both edges, as every modal's close
   on the site (layout-artwork.css, `.ulz-modal .ulz-close`; the owner's request of 2026-11-15); the title keeps clear of it. */
html body dialog.cili-confirm-dialog .cili-confirm-dialog__head {
	display: block;
	padding-right: calc(var(--lcr-size-control) + var(--lcr-space-12));
}

html body dialog.cili-confirm-dialog .cili-confirm-dialog__title {
	min-width: 0;
	margin: 0;
	color: var(--lcr-color-ink);
	font-size: var(--lcr-type-section-font-size);
	font-weight: var(--lcr-type-section-font-weight);
	line-height: var(--lcr-type-section-line-height);
	overflow-wrap: anywhere;
}

/* showModal() puts the focus on the title (autofocus), so the close button shows no ring until the keyboard reaches it. */
html body dialog.cili-confirm-dialog .cili-confirm-dialog__title:focus {
	outline-style: none !important; /* the frame's focus ring is !important; a title is not a control */
}

html body dialog.cili-confirm-dialog .cili-confirm-dialog__text {
	margin: 0;
	font-size: var(--lcr-type-body-font-size);
	line-height: var(--lcr-type-body-line-height);
	overflow-wrap: anywhere;
}

html body dialog.cili-confirm-dialog .cili-confirm-dialog__close {
	position: absolute;
	top: var(--lcr-space-12);
	right: var(--lcr-space-12);
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--lcr-size-control);
	height: var(--lcr-size-control);
	padding: 0;
	border: 0;
	border-radius: var(--lcr-radius-pill);
	background-color: var(--lcr-color-fill);
	box-shadow: none;
	color: var(--lcr-color-ink);
	cursor: pointer;
}

html body dialog.cili-confirm-dialog .cili-confirm-dialog__close:focus-visible {
	outline: 2px solid var(--lcr-color-focus);
	outline-offset: 2px;
}
