/* Digibrand Conversational Forms
   Scoped to .dbc — override the custom properties below (in your theme
   or Divi custom CSS) to retheme without touching this file. */

.dbc {
	--dbc-accent: #3b82f6;          /* forward actions, focus states */
	--dbc-text: #ffffff;
	--dbc-body: #d6dbe3;            /* intro / helper copy */
	--dbc-muted: #9aa3b2;           /* back link, quiet chrome */
	--dbc-line: #4b5563;            /* resting field outline */
	--dbc-line-soft: #3a4150;       /* unfilled progress segment */
	--dbc-seg-done: #c7cdd8;        /* filled progress segment */
	--dbc-field-bg: rgba(255, 255, 255, 0.03);
	--dbc-error: #f87171;
	--dbc-radius: 5px;
	--dbc-max: 680px;

	color: var(--dbc-text);
	font-size: 17px;
	line-height: 1.55;
}

.dbc *,
.dbc *::before,
.dbc *::after {
	box-sizing: border-box;
}

/* ---------- Persistent heading ---------- */

.dbc-heading {
	color: var(--dbc-text);
	font-size: clamp(2.4rem, 5.5vw, 4.2rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.015em;
	margin: 0 0 2rem;
	max-width: 18ch;
}

/* ---------- Progress bar ---------- */

.dbc-progress {
	display: flex;
	gap: 12px;
	margin: 0 0 2rem;
}

.dbc-seg {
	flex: 1;
	height: 3px;
	border-radius: 2px;
	background: var(--dbc-line-soft);
	transition: background-color 0.3s ease;
}

.dbc-seg.is-done {
	background: var(--dbc-seg-done);
}

/* ---------- Back link (quiet, not yellow) ---------- */

.dbc-back {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: none;
	border: 0;
	padding: 0;
	margin: 0 0 2.25rem;
	color: var(--dbc-muted);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.2s ease;
}

.dbc-back:hover,
.dbc-back:focus-visible {
	color: var(--dbc-text);
}

.dbc-back:focus-visible {
	outline: 2px solid var(--dbc-accent);
	outline-offset: 4px;
	border-radius: 4px;
}

/* ---------- Screens ---------- */

.dbc-screen {
	display: none;
	max-width: var(--dbc-max);
}

.dbc-screen.is-active {
	display: block;
	animation: dbc-rise 0.35s ease both;
}

@keyframes dbc-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dbc-screen.is-active {
		animation: none;
	}
}

/* ---------- Welcome ---------- */

.dbc-intro p {
	color: var(--dbc-body);
	font-size: 1em;
	max-width: 62ch;
	margin: 0 0 1.25em;
}

/* ---------- Question label ---------- */

.dbc-field {
	border: 0;
	padding: 0;
	margin: 0 0 1.75rem;
}

.dbc-q {
	display: block;
	color: var(--dbc-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 1.1em;
	padding: 0;
}

.dbc-req {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.05em;
	height: 1.05em;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: var(--dbc-text);
	font-size: 0.55em;
	vertical-align: 0.35em;
	margin-left: 0.35em;
}

.dbc-desc {
	color: var(--dbc-body);
	font-size: 1em;
	margin: 1em 0 0;
	max-width: 62ch;
}

/* ---------- Choice tiles ---------- */

.dbc-choices {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.dbc-choice {
	display: flex;
	align-items: center;
	gap: 0.85em;
	padding: 0.45em 0;
	cursor: pointer;
	color: var(--dbc-text);
	font-size: 1em;
	position: relative;
}

.dbc-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.dbc-box {
	flex: none;
	width: 22px;
	height: 22px;
	border: 2px solid #5b6472;
	border-radius: 5px;
	background: transparent;
	position: relative;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dbc-choice:hover .dbc-box {
	border-color: var(--dbc-muted);
}

.dbc-choice input:checked + .dbc-box {
	background: var(--dbc-accent);
	border-color: var(--dbc-accent);
}

.dbc-choice input:checked + .dbc-box::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.dbc-choice input:focus-visible + .dbc-box {
	outline: 2px solid var(--dbc-accent);
	outline-offset: 3px;
}

/* ---------- Text inputs ---------- */

/* Element + double-class selectors with !important on the contested
   properties: theme and page-builder CSS routinely targets bare
   input[type=text] etc. and out-ranks a lone class. */

.dbc input.dbc-input,
.dbc textarea.dbc-input,
.dbc select.dbc-input {
	display: block;
	width: 100%;
	max-width: var(--dbc-max);
	background-color: var(--dbc-field-bg) !important;
	background-image: none;
	border: 1px solid var(--dbc-line) !important;
	border-radius: var(--dbc-radius) !important;
	color: var(--dbc-text) !important;
	font: inherit;
	font-size: 1em;
	line-height: 1.4;
	padding: 0.8em 1em !important;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dbc input.dbc-input::placeholder,
.dbc textarea.dbc-input::placeholder {
	color: var(--dbc-muted);
	opacity: 1;
}

.dbc input.dbc-input:focus,
.dbc textarea.dbc-input:focus,
.dbc select.dbc-input:focus {
	border-color: var(--dbc-accent) !important;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
	outline: none;
}

/* Browser autofill paints its own white background on name/email
   fields; repaint it to match. */
.dbc input.dbc-input:-webkit-autofill,
.dbc input.dbc-input:-webkit-autofill:hover {
	-webkit-box-shadow: 0 0 0 1000px #2f353f inset !important;
	-webkit-text-fill-color: var(--dbc-text) !important;
	caret-color: var(--dbc-text);
	transition: background-color 999999s ease-out 0s;
}

.dbc input.dbc-input:-webkit-autofill:focus {
	-webkit-box-shadow:
		0 0 0 1000px #2f353f inset,
		0 0 0 3px rgba(59, 130, 246, 0.25) !important;
	-webkit-text-fill-color: var(--dbc-text) !important;
}

.dbc-textarea {
	resize: vertical;
	min-height: 9.5em;
}

.dbc select.dbc-input {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%239aa3b2' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1em center;
	padding-right: 2.75em !important;
}

.dbc select.dbc-input option {
	color: #1f2430;
	background: #fff;
}

.dbc-name-row {
	display: flex;
	gap: 1rem;
	max-width: var(--dbc-max);
}

.dbc-name-row .dbc-input {
	flex: 1;
	min-width: 0;
}

@media (max-width: 540px) {
	.dbc-name-row {
		flex-direction: column;
	}
}

/* ---------- Buttons ---------- */

.dbc-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	background: var(--dbc-accent);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 0.85em 1.5em;
	font: inherit;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	margin-top: 0.5rem;
	transition: filter 0.15s ease, transform 0.1s ease;
}

.dbc-btn:hover {
	filter: brightness(1.1);
}

.dbc-btn:active {
	transform: translateY(1px);
}

.dbc-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.dbc-btn[disabled] {
	opacity: 0.6;
	cursor: default;
}

.dbc-arrow {
	line-height: 1;
	transition: transform 0.15s ease;
}

.dbc-btn:hover .dbc-arrow {
	transform: translateX(3px);
}

/* ---------- Errors, confirmation, honeypot ---------- */

.dbc-error {
	color: var(--dbc-error);
	font-size: 0.94em;
	margin: 0 0 1rem;
}

.dbc-confirmation {
	color: var(--dbc-body);
	font-size: 1em;
	max-width: 62ch;
	animation: dbc-rise 0.35s ease both;
}

.dbc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}
