/**
 * In-Stock Notifier — Frontend Styles
 *
 * Clean modern card — explicit pixel sizes for theme compatibility.
 *
 * @package InStockNotifier
 */

/* ── Entrance ─────────────────────────────────────────────────── */

@keyframes bisn-enter {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Container ──────────────────────────────────────────────────── */

.bisn-notify-form {
	--_accent: #2563eb;
	--_accent-hover: #1d4ed8;
	--_accent-glow: rgba(37, 99, 235, 0.15);
	--_bg: #ffffff;
	--_input-bg: #f8fafc;
	--_border: #e2e8f0;
	--_text: #1e293b;
	--_text-secondary: #475569;
	--_ok: #16a34a;
	--_err: #dc2626;
	--_ease: cubic-bezier(0.4, 0, 0.2, 1);

	margin: 24px 0 0;
	padding: 24px 28px 28px;
	background: var(--_bg);
	border: 1px solid var(--_border);
	border-radius: 0;
	color: var(--_text);
	font-family: inherit;
	box-shadow: none;
	animation: bisn-enter 0.4s var(--_ease) both;
}

.bisn-notify-form form.bisn-form {
	margin: 0;
	padding: 0;
}

/* ── Screen reader text ─────────────────────────────────────────── */

.bisn-notify-form .screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal;
}

/* ── Heading ────────────────────────────────────────────────────── */

.bisn-form-heading {
	margin: 0 0 16px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--_text);
}

/* ── Field rows ─────────────────────────────────────────────────── */

.bisn-field {
	margin-bottom: 16px;
}

.bisn-field:last-child {
	margin-bottom: 0;
}

/* ── Inline row (email + button joined) ─────────────────────────── */

.bisn-fields-row {
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 480px;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
}

.bisn-fields-row:focus-within {
	box-shadow: none;
}

/* ── Email input ────────────────────────────────────────────────── */

.bisn-notify-form .bisn-email-input {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0 14px;
	background-color: var(--_input-bg);
	border: 1px solid var(--_border);
	border-right: none;
	border-radius: 0;
	color: var(--_text);
	font-size: 16px;
	font-family: inherit;
	box-sizing: border-box;
}

.bisn-notify-form .bisn-email-input::placeholder {
	color: #94a3b8;
}

.bisn-notify-form .bisn-email-input:focus {
	outline: none;
	background-color: #fff;
}

/* ── Quantity input ─────────────────────────────────────────────── */

.bisn-field-quantity label {
	display: block;
	margin-bottom: 6px;
	font-size: 15px;
	font-weight: 500;
	color: var(--_text-secondary);
}

.bisn-notify-form .bisn-quantity-input {
	width: 80px;
	height: 36px;
	padding: 0 10px;
	background-color: var(--_input-bg);
	border: 1px solid var(--_border);
	border-radius: 0;
	color: var(--_text);
	font-size: 16px;
	font-family: inherit;
	transition:
		border-color 0.2s var(--_ease),
		box-shadow 0.2s var(--_ease);
}

.bisn-notify-form .bisn-quantity-input::-webkit-inner-spin-button,
.bisn-notify-form .bisn-quantity-input::-webkit-outer-spin-button {
	height: 20px;
	width: 14px;
	margin: auto 0;
	opacity: 1;
}

.bisn-notify-form .bisn-quantity-input:focus {
	outline: none;
	border-color: var(--_accent);
	box-shadow: none;
}

/* ── GDPR checkbox ──────────────────────────────────────────────── */

.bisn-field-gdpr label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--_text-secondary);
	cursor: pointer;
}

.bisn-field-gdpr input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
	accent-color: var(--_accent);
	width: 18px;
	height: 18px;
	cursor: pointer;
}

/* ── Submit button ──────────────────────────────────────────────── */

.bisn-notify-form .bisn-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	height: 40px;
	padding: 0 20px;
	background: var(--_accent);
	color: #fff;
	border: 1px solid var(--_accent);
	border-radius: 0;
	cursor: pointer;
	font-size: 16px;
	font-family: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color 0.2s var(--_ease),
		transform 0.1s var(--_ease);
}

.bisn-notify-form .bisn-submit:hover {
	background: var(--_accent-hover);
}

.bisn-notify-form .bisn-submit:active {
	transform: scale(0.98);
}

.bisn-notify-form .bisn-submit:focus-visible {
	outline: 2px solid var(--_accent);
	outline-offset: 2px;
}

.bisn-notify-form .bisn-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* ── Status messages ────────────────────────────────────────────── */

.bisn-form-message {
	margin-top: 0;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	transition:
		margin-top 0.3s var(--_ease),
		max-height 0.3s var(--_ease),
		opacity 0.3s var(--_ease);
}

.bisn-form-message:not(:empty) {
	margin-top: 12px;
	max-height: 80px;
	opacity: 1;
}

.bisn-form-message.bisn-success {
	color: var(--_ok);
}

.bisn-form-message.bisn-error {
	color: var(--_err);
}
