.qfb-form-wrap {
	--qfb-bg: #14141c;
	--qfb-card: #1c1c28;
	--qfb-text: #f1f1f6;
	--qfb-muted: #9494a6;
	--qfb-radius: 14px;
	--qfb-gradient: linear-gradient(135deg, var(--qfb-accent, #8b5cf6), var(--qfb-accent-2, #ec4899));
	max-width: 560px;
	margin: 0 auto;
	background: var(--qfb-bg);
	border: 1px solid rgba(255,255,255,.06);
	border-radius: calc(var(--qfb-radius) + 6px);
	padding: 32px;
	color: var(--qfb-text) !important;
	font-family: inherit;
}

/* progress bar */
.qfb-progress { margin-bottom: 22px; }
.qfb-progress-bar { background: rgba(255,255,255,.08); border-radius: 999px; height: 8px; overflow: hidden; }
.qfb-progress-bar span { display: block; height: 100%; background: var(--qfb-gradient); border-radius: 999px; transition: width .4s ease; }
.qfb-progress-label { font-size: 12px; color: var(--qfb-muted); margin-top: 8px; }

.qfb-step-title { margin: 0 0 16px; font-size: 18px; color: var(--qfb-text) !important; }

/* fields */
.qfb-field { margin-bottom: 18px; opacity: 0; transform: translateY(8px); animation: qfb-fade-in .4s ease forwards; }
.qfb-field:nth-child(1) { animation-delay: .02s; }
.qfb-field:nth-child(2) { animation-delay: .06s; }
.qfb-field:nth-child(3) { animation-delay: .10s; }
.qfb-field:nth-child(4) { animation-delay: .14s; }
.qfb-field:nth-child(5) { animation-delay: .18s; }
.qfb-field:nth-child(n+6) { animation-delay: .2s; }
@keyframes qfb-fade-in { to { opacity: 1; transform: translateY(0); } }

.qfb-field label { display: block; font-weight: 600; font-size: 16px; margin-bottom: 7px; letter-spacing: .01em; color: var(--qfb-text) !important; }
.qfb-req { color: var(--qfb-accent-2, #ec4899); margin-left: 2px; font-size: 18px; line-height: 1; }
.qfb-req-legend { margin: 14px 0 0; font-size: 14px; color: var(--qfb-muted); }
.qfb-req-legend .qfb-req { margin-left: 0; }

.qfb-field input[type="text"],
.qfb-field input[type="email"],
.qfb-field input[type="number"],
.qfb-field input[type="tel"],
.qfb-field textarea,
.qfb-field select {
	width: 100% !important;
	max-width: none !important;
	box-sizing: border-box !important;
	background: var(--qfb-card);
	color: var(--qfb-text) !important;
	border: 1px solid rgba(255,255,255,.09);
	border-radius: var(--qfb-radius);
	padding: 13px 16px !important;
	font-size: 16px !important;
	transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.qfb-field input[type="number"] {
	/* Some themes shrink number inputs to fit their default spinner
	   width, leaving barely any room for the digits themselves. */
	min-height: 48px !important;
	font-size: 17px !important;
}
.qfb-field textarea { min-height: 110px; resize: vertical; }
.qfb-field input::placeholder, .qfb-field textarea::placeholder { color: var(--qfb-muted); }
.qfb-field input:hover, .qfb-field textarea:hover, .qfb-field select:hover { border-color: rgba(255,255,255,.18); }
.qfb-field input:focus, .qfb-field textarea:focus, .qfb-field select:focus {
	outline: none;
	border-color: var(--qfb-accent, #8b5cf6);
	box-shadow: 0 0 0 4px rgba(139,92,246,.22);
	transform: translateY(-1px);
}
.qfb-field select {
	appearance: none; -webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, var(--qfb-muted) 50%), linear-gradient(135deg, var(--qfb-muted) 50%, transparent 50%);
	background-position: calc(100% - 22px) center, calc(100% - 17px) center;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 40px;
	/* Some themes/browsers clip the selected option's text vertically
	   without an explicit min-height and line-height on the <select>
	   itself, especially once appearance is overridden above. */
	min-height: 52px !important;
	line-height: 1.4 !important;
}

.qfb-help { color: var(--qfb-muted); font-size: 14px; margin: 6px 0 0; }

/* radio / checkbox groups */
.qfb-choice-group { display: flex; flex-direction: column; gap: 8px; }
.qfb-choice { display: flex; align-items: center; gap: 10px; background: var(--qfb-card); border: 1px solid rgba(255,255,255,.08); border-radius: var(--qfb-radius); padding: 11px 14px; cursor: pointer; font-size: 14px; transition: border-color .15s ease; color: var(--qfb-text) !important; }
.qfb-choice:hover { border-color: rgba(255,255,255,.2); }
.qfb-choice input[type="checkbox"], .qfb-choice input[type="radio"] {
	appearance: none; -webkit-appearance: none;
	width: 19px; height: 19px; min-width: 19px;
	border: 2px solid rgba(255,255,255,.25);
	background: var(--qfb-bg);
	position: relative;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.qfb-choice input[type="checkbox"] { border-radius: 6px; }
.qfb-choice input[type="radio"] { border-radius: 50%; }
.qfb-choice input:checked { background: var(--qfb-gradient); border-color: transparent; transform: scale(1.05); }
.qfb-choice input[type="checkbox"]:checked::after {
	content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
	border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(40deg);
}
.qfb-choice input[type="radio"]:checked::after {
	content: ""; position: absolute; left: 4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: #fff;
}

/* file dropzone */
.qfb-dropzone {
	position: relative;
	border: 2px dashed rgba(255,255,255,.15);
	border-radius: var(--qfb-radius);
	padding: 24px 16px;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
	background: var(--qfb-card);
}
.qfb-dropzone:hover, .qfb-dropzone.qfb-dragover { border-color: var(--qfb-accent, #8b5cf6); background: rgba(139,92,246,.06); }
.qfb-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.qfb-dropzone-text { color: var(--qfb-muted); font-size: 13px; }
.qfb-dropzone-filename { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--qfb-text); }

/* shown under a photo field when the photo was sized down automatically */
.qfb-resize-note { margin: 8px 0 0; padding: 8px 12px; font-size: 13px; line-height: 1.4; border-radius: 8px; background: rgba(34,197,94,.12); color: var(--qfb-text); border: 1px solid rgba(34,197,94,.35); }
.qfb-resize-note[hidden] { display: none; }

/* honeypot - hidden from humans, visible to bots */
.qfb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* nav + buttons */
.qfb-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.qfb-btn {
	border: none; border-radius: var(--qfb-radius); padding: 13px 26px; font-weight: 700; font-size: 15px;
	cursor: pointer; transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
}
.qfb-btn-submit, .qfb-btn-next {
	background: var(--qfb-gradient); color: #fff; margin-left: auto;
	box-shadow: 0 6px 20px rgba(139,92,246,.35);
	display: flex; align-items: center; gap: 8px;
}
.qfb-btn-submit:hover, .qfb-btn-next:hover { transform: translateY(-2px); filter: brightness(1.08); }
.qfb-btn-back { background: transparent; color: var(--qfb-text); border: 1px solid rgba(255,255,255,.15); }

.qfb-spinner {
	display: none;
	width: 15px; height: 15px;
	border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: qfb-spin .6s linear infinite;
}
.qfb-form.qfb-submitting .qfb-spinner { display: inline-block; }
.qfb-form.qfb-submitting .qfb-btn-submit { pointer-events: none; opacity: .85; }
@keyframes qfb-spin { to { transform: rotate(360deg); } }

.qfb-errors {
	margin-top: 16px; padding: 12px 16px; border-radius: var(--qfb-radius);
	background: rgba(236,72,153,.12); border: 1px solid var(--qfb-accent-2, #ec4899); color: var(--qfb-text); font-size: 15px;
}

/* success state */
.qfb-success { text-align: center; padding: 30px 10px; }
.qfb-success-check svg { width: 72px; height: 72px; }
.qfb-success-check circle { fill: none; stroke: var(--qfb-accent, #8b5cf6); stroke-width: 2; stroke-dasharray: 166; stroke-dashoffset: 166; animation: qfb-circle .5s ease forwards; }
.qfb-success-check path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: qfb-check .3s .5s ease forwards; }
@keyframes qfb-circle { to { stroke-dashoffset: 0; } }
@keyframes qfb-check { to { stroke-dashoffset: 0; } }
.qfb-success-message { margin-top: 16px; font-size: 15px; color: var(--qfb-text); }

@media (prefers-reduced-motion: reduce) {
	.qfb-form-wrap * { animation: none !important; transition: none !important; }
}

/* section headers */
.qfb-section-header { margin: 28px 0 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.qfb-section-header:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.qfb-section-header h3 { margin: 0 0 4px; font-size: 16px; color: var(--qfb-text) !important; }

/* calendar date picker */
.qfb-cal { position: absolute; left: 0; z-index: 50; width: 292px; max-width: 100%; box-sizing: border-box; background: var(--qfb-card, #1c1c28); color: var(--qfb-text, #f1f1f6); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.qfb-cal-head { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.qfb-cal-head select { flex: 1; min-width: 0; width: auto !important; padding: 7px 6px !important; font-size: 14px !important; border-radius: 8px !important; background: var(--qfb-bg, #14141c); }
.qfb-cal-head .qfb-cal-year { flex: 0 0 82px; }
.qfb-cal-nav { flex: 0 0 30px; height: 32px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.qfb-cal-nav:hover, .qfb-cal-day:hover { background: var(--qfb-accent, #8b5cf6); }
.qfb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.qfb-cal-dow { font-size: 11px; color: var(--qfb-muted, #9494a6); padding: 4px 0; }
.qfb-cal-day { border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 13px; padding: 7px 0; cursor: pointer; }
.qfb-cal-day.qfb-cal-sel { background: var(--qfb-gradient, #8b5cf6); font-weight: 700; }

/* Number fields: a small box, not the full width. */
.qfb-field.qfb-field-number input[type="number"] { width: 140px !important; max-width: 100%; }
/* "Other" choice with its own text box. */
.qfb-choice-other { flex-wrap: wrap; }
.qfb-choice-other .qfb-other-text { flex: 1 1 200px; min-width: 160px; margin: 0; padding: 7px 10px; }
