/**
 * Back in Stock — standalone request form (front end).
 *
 * Rendered by the [lw_back_in_stock] shortcode, which self-gates to
 * out-of-stock products. Two states driven by a class on the root:
 *   default              → only the "Notify me" trigger button shows.
 *   .lw-bis--open        → the email field + submit show, trigger hides.
 *   .lw-bis--done        → success message shows, form hides.
 * Colours follow the LW navy (#163158); kept self-contained so it doesn't
 * depend on theme/builder styles.
 */

.lw-bis {
	--lw-bis-navy: #163158;
	margin: 12px 0;
	font-size: 15px;
	line-height: 1.5;
}

.lw-bis * {
	box-sizing: border-box;
}

/* Trigger button (the "Request Notice" equivalent). */
.lw-bis__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--lw-bis-navy);
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 11px 20px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
}

.lw-bis__trigger:hover {
	filter: brightness(1.08);
}

/* The email-entry panel, hidden until the trigger is clicked. */
.lw-bis__panel {
	display: none;
	max-width: 420px;
}

.lw-bis--open .lw-bis__trigger {
	display: none;
}

.lw-bis--open .lw-bis__panel {
	display: block;
}

.lw-bis__label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--lw-bis-navy);
}

.lw-bis__row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.lw-bis__email {
	flex: 1 1 220px;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	font-size: 15px;
}

.lw-bis__email:focus {
	outline: 2px solid var(--lw-bis-navy);
	outline-offset: 1px;
}

.lw-bis__submit {
	background: var(--lw-bis-navy);
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 10px 18px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.lw-bis__submit:disabled {
	opacity: .6;
	cursor: default;
}

.lw-bis__hint {
	margin: 6px 0 0;
	font-size: 13px;
	color: #646970;
}

/* Inline status message (error/success while the panel is open). */
.lw-bis__msg {
	margin: 8px 0 0;
	font-size: 14px;
}

.lw-bis__msg--error {
	color: #b91c1c;
}

/* Final success state — replaces the whole form. */
.lw-bis__done {
	display: none;
	padding: 12px 16px;
	border: 1px solid #bbf7d0;
	background: #f0fdf4;
	border-radius: 6px;
	color: #15803d;
	font-weight: 600;
}

.lw-bis--done .lw-bis__trigger,
.lw-bis--done .lw-bis__panel {
	display: none;
}

.lw-bis--done .lw-bis__done {
	display: block;
}
