/*
 * sg-drip-form — base styles
 * Theme via CSS custom properties on .sg-drip-form or any ancestor.
 */

.sg-drip-form {
	--sg-form-accent:  #000;
	--sg-form-radius:  4px;
	--sg-form-bg:      #fff;
	--sg-form-border:  #ccc;
	--sg-form-text:    #333;
	--sg-form-success: #2d8a4e;
	--sg-form-error:   #c0392b;

	position: relative;
	font-family: inherit;
}

/* ── Field ───────────────────────────────────── */
.sg-drip-form__field {
	margin-bottom: 10px;
}

.sg-drip-form__field label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.875em;
	color: var(--sg-form-text);
}

.sg-drip-form__field input[type="email"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--sg-form-border);
	border-radius: var(--sg-form-radius);
	background: var(--sg-form-bg);
	color: var(--sg-form-text);
	font-size: 1em;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.sg-drip-form__field input[type="email"]:focus {
	outline: none;
	border-color: var(--sg-form-accent);
}

/* ── Submit button ───────────────────────────── */
.sg-drip-form__submit {
	display: inline-block;
	padding: 10px 22px;
	background: var(--sg-form-accent);
	color: #fff;
	border: none;
	border-radius: var(--sg-form-radius);
	font-size: 1em;
	font-family: inherit;
	cursor: pointer;
	transition: opacity 0.15s;
}

.sg-drip-form__submit:hover {
	opacity: 0.85;
}

.sg-drip-form__submit:disabled {
	opacity: 0.55;
	cursor: default;
}

/* ── Feedback messages ───────────────────────── */
.sg-drip-form__success {
	color: var(--sg-form-success);
	padding: 8px 0;
	font-weight: 500;
}

.sg-drip-form__error {
	color: var(--sg-form-error);
	padding: 6px 0;
	font-size: 0.875em;
}

/* ── EU consent checkbox ─────────────────────── */
.sg-drip-form__consent {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875em;
	margin-bottom: 10px;
	color: var(--sg-form-text);
}

.sg-drip-form__consent input[type="checkbox"] {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	cursor: pointer;
}

.sg-drip-form__consent label {
	cursor: pointer;
	line-height: 1.4;
}

/* ── Inline / bar layout helper ──────────────── */
.sg-drip-form--inline {
	display: flex;
	gap: 8px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.sg-drip-form--inline .sg-drip-form__field {
	margin-bottom: 0;
	flex: 1 1 200px;
}

.sg-drip-form--inline .sg-drip-form__field label {
	/* Visually hidden in inline layouts, still readable by screen readers */
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
