/*
 * NOTIFY-ME-01 (#882): the waiting-list form inside the product page's waitlist block.
 * Hand-written, loaded on the product pages that print the block only (inc/product-presentation.php),
 * scoped to .ra-notify. The "Notify me when available" button itself (a <summary>, or a <button> for a
 * signed-in visitor) keeps the block's existing .ra-pdp-waitlist__button look; this file styles what opens
 * under it: the email field, the one line of promise, the submit button, the answer message.
 * Colours come from the site's --rp-* tokens with the Home v3 values as fallbacks, so night mode follows.
 */

.ra-notify {
	--ra-nm-ink: var(--rp-text, #3e4546);
	--ra-nm-muted: var(--rp-muted, #5f6667);
	--ra-nm-line: var(--rp-border, #dcd3c7);
	--ra-nm-field: var(--rp-surface, #fbf8f3);
	--ra-nm-action: var(--rp-action, #875fa3);
	--ra-nm-action-hover: var(--rp-action-hover, #7a5395);
	--ra-nm-action-ink: var(--rp-action-ink, #ffffff);
	--ra-nm-ok: #5e7352;
	--ra-nm-error: #a3392f;

	box-sizing: border-box;
	margin-top: 14px;
	max-width: 420px;
	color: var(--ra-nm-ink);
}

/* Not `inherit`: content inside <details> inherits through the browser's own content-box wrapper. */
.ra-notify *,
.ra-notify *::before,
.ra-notify *::after {
	box-sizing: border-box;
}

.ra-notify__details {
	margin: 0;
}

.ra-notify__form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 14px;
}

.ra-notify__label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--ra-nm-ink);
}

.ra-notify__input {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var(--ra-nm-line);
	border-radius: 4px;
	background: var(--ra-nm-field);
	color: var(--ra-nm-ink);
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming into the field */
}

.ra-notify__input:focus-visible {
	border-color: var(--ra-nm-action);
	outline: 2px solid var(--ra-nm-action);
	outline-offset: 1px;
}

.ra-notify__line {
	margin: 2px 0 4px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ra-nm-muted);
}

/* The submit button and the signed-in one-click button: the site's action button. */
.ra-notify__submit,
.ra-notify .ra-notify__button {
	display: inline-block;
	min-height: 46px;
	padding: 0.85em 1.8em;
	border: 1px solid var(--ra-nm-action);
	border-radius: var(--rp-radius-sm, 4px);
	background: var(--ra-nm-action);
	color: var(--ra-nm-action-ink) !important;
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.ra-notify__submit:hover,
.ra-notify__submit:focus-visible,
.ra-notify .ra-notify__button:hover,
.ra-notify .ra-notify__button:focus-visible {
	border-color: var(--ra-nm-action-hover);
	background: var(--ra-nm-action-hover);
}

.ra-notify__account {
	margin: 4px 0 0;
	font-size: 13px;
}

.ra-notify__account a {
	color: var(--ra-nm-action);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* The answer after a request. */
.ra-notify__msg {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-left: 4px solid var(--ra-nm-ok);
	border-radius: 4px;
	background: var(--ra-nm-field);
	font-size: 14px;
	line-height: 1.5;
}

.ra-notify__msg--error {
	border-left-color: var(--ra-nm-error);
}

/* The honeypot: out of sight and out of the tab order, but not display:none (some bots skip those). */
.ra-notify__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 480px) {
	.ra-notify {
		max-width: none;
	}

	.ra-notify__submit,
	.ra-notify .ra-notify__button {
		width: 100%;
	}
}
