/*
 * Matches the Dr. Snoozz newsletter widget aesthetic:
 * white card, bold uppercase black labels, black input fields with
 * white typed text and grey placeholder text, black button, white text,
 * square edges, Courier New monospace throughout.
 */

.cfb-form-wrap {
	background: #ffffff;
	padding: 24px 20px;
	font-family: 'Courier New', Courier, monospace;
	box-sizing: border-box;
}

.cfb-form-wrap * {
	box-sizing: border-box;
}

/* ---------- shared field styling ---------- */

.cfb-field-label {
	font-size: 16px;
	font-weight: bold;
	color: #000000;
	letter-spacing: 1px;
	text-transform: uppercase;
	white-space: nowrap;
}

.cfb-field input[type="text"],
.cfb-field input[type="email"],
.cfb-field input[type="tel"],
.cfb-field input[type="number"],
.cfb-field textarea,
.cfb-field select {
	height: 40px;
	padding: 0 12px;
	background: #000000;
	color: #ffffff;
	border: 2px solid #000000;
	border-radius: 0;
	font-size: 15px;
	font-family: 'Courier New', Courier, monospace;
	outline: none;
	width: 100%;
}

.cfb-field textarea {
	height: auto;
	min-height: 100px;
	padding: 10px 12px;
	resize: vertical;
}

.cfb-field input::placeholder,
.cfb-field textarea::placeholder {
	color: #999999;
	opacity: 1;
}

.cfb-field input:focus,
.cfb-field textarea:focus,
.cfb-field select:focus {
	border-color: #000000;
	outline: 2px solid #000000;
	outline-offset: 2px;
}

.cfb-field select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 10px 7px;
	padding-right: 32px;
}

.cfb-field select option {
	background-color: #000000;
	color: #ffffff;
}

.cfb-required {
	color: #000000;
	opacity: 0.6;
}

.cfb-inline-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-right: 14px;
	font-weight: normal;
	text-transform: none;
	color: #000000;
	font-size: 15px;
}

.cfb-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
}

.cfb-field input[type="checkbox"],
.cfb-field input[type="radio"] {
	accent-color: #000000;
	width: 16px;
	height: 16px;
}

.cfb-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cfb-submit-btn {
	height: 44px;
	padding: 0 24px;
	background: #000000;
	color: #ffffff;
	border: 2px solid #000000;
	border-radius: 0;
	font-size: 15px;
	font-weight: bold;
	font-family: 'Courier New', Courier, monospace;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.cfb-submit-btn:hover {
	background: #ffffff;
	color: #000000;
}

.cfb-form.cfb-submitting .cfb-submit-btn {
	opacity: 0.6;
	pointer-events: none;
}

.cfb-message {
	margin-top: 10px;
	font-weight: bold;
	font-family: 'Courier New', Courier, monospace;
	letter-spacing: 1px;
	text-transform: uppercase;
	width: 100%;
	text-align: center;
}

.cfb-message.cfb-success {
	color: #000000;
}

.cfb-message.cfb-error {
	color: #c62828;
}

.cfb-success-swap {
	font-size: 18px;
	font-weight: bold;
	color: #000000;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
}

/* ---------- inline layout: single field — label, input, button, one line ---------- */

.cfb-form-wrap.cfb-inline-layout .cfb-form {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.cfb-form-wrap.cfb-inline-layout .cfb-inline-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	flex: 0 1 auto;
}

.cfb-form-wrap.cfb-inline-layout .cfb-inline-row input,
.cfb-form-wrap.cfb-inline-layout .cfb-inline-row select {
	width: 220px;
}

.cfb-form-wrap.cfb-inline-layout .cfb-submit-row {
	margin: 0;
}

.cfb-form-wrap.cfb-inline-layout .cfb-honeypot {
	flex-basis: 0;
}

/* ---------- stacked layout: multiple fields — label+input per row, button at the end ---------- */

.cfb-form-wrap.cfb-stacked-layout .cfb-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cfb-form-wrap.cfb-stacked-layout .cfb-field-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
}

.cfb-form-wrap.cfb-stacked-layout .cfb-field-row .cfb-field-label {
	flex: 0 0 150px;
}

.cfb-form-wrap.cfb-stacked-layout .cfb-field-row input,
.cfb-form-wrap.cfb-stacked-layout .cfb-field-row select,
.cfb-form-wrap.cfb-stacked-layout .cfb-field-row textarea,
.cfb-form-wrap.cfb-stacked-layout .cfb-field-row .cfb-radio-group {
	flex: 1 1 auto;
}

.cfb-form-wrap.cfb-stacked-layout .cfb-field-row.cfb-field-textarea {
	align-items: flex-start;
}

.cfb-form-wrap.cfb-stacked-layout .cfb-field-row.cfb-field-checkbox .cfb-field-label {
	flex: 0 0 auto;
}

.cfb-form-wrap.cfb-stacked-layout .cfb-submit-row {
	display: flex;
	justify-content: flex-end;
}

/* Narrow screens: stack label above field even in the multi-field layout */
@media (max-width: 480px) {
	.cfb-form-wrap.cfb-stacked-layout .cfb-field-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.cfb-form-wrap.cfb-stacked-layout .cfb-field-row .cfb-field-label {
		flex: 0 0 auto;
	}

	.cfb-form-wrap.cfb-inline-layout .cfb-inline-row input,
	.cfb-form-wrap.cfb-inline-layout .cfb-inline-row select {
		width: 100%;
	}

	.cfb-form-wrap.cfb-inline-layout .cfb-form {
		flex-direction: column;
		align-items: stretch;
	}
}
