/* ============================================
   DYsign Onboarding — Form styles
   Scoped under #dyob-root so theme CSS can't bleed in.
   ============================================ */

#dyob-root {
	--ob-orange: #ff5a1f;
	--ob-orange-hover: #e64e17;
	--ob-orange-soft: #fff0eb;
	--ob-bg: #F2F2F2;
	--ob-card: #ffffff;
	--ob-border: #d4d4d4;
	--ob-border-soft: #e5e5e5;
	--ob-text: #1a1a1a;
	--ob-text-muted: #555555;
	--ob-text-light: #777777;
	--ob-text-faint: #999999;
	--ob-green: #16a34a;
	--ob-red: #dc2626;
	--ob-red-soft: #fee2e2;
	--ob-radius: 12px;
	--ob-radius-sm: 8px;

	max-width: 760px;
	margin: 0 auto;
	padding: 24px 16px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--ob-text);
	background: transparent;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
#dyob-root * { box-sizing: border-box; }
#dyob-root [hidden] { display: none !important; }
#dyob-root h1, #dyob-root h2, #dyob-root h3 {
	font-family: inherit; margin: 0;
	letter-spacing: -0.015em;
}

/* ===== HEADER ===== */
.dyob-header { text-align: center; margin-bottom: 28px; }
.dyob-logo-img {
	display: block; margin: 0 auto 16px;
	height: 40px; width: auto; object-fit: contain;
}
.dyob-header h1 {
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	font-weight: 700;
	margin-bottom: 8px;
	line-height: 1.3;
}
.dyob-header h1 span { color: var(--ob-orange); }
.dyob-lead {
	color: var(--ob-text-muted);
	font-size: 0.95rem;
	max-width: 520px;
	margin: 0 auto;
}
.dyob-lead strong { color: var(--ob-text); }

/* ===== PROGRESS ===== */
.dyob-progress {
	display: flex; align-items: center; justify-content: center;
	margin: 16px auto 8px;
	max-width: 480px;
}
.dyob-progress-step {
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	color: var(--ob-text-faint);
	flex-shrink: 0;
}
.dyob-progress-dot {
	width: 32px; height: 32px;
	border-radius: 50%;
	background: var(--ob-card);
	border: 2px solid var(--ob-border);
	display: flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 700;
	transition: all 0.25s ease;
}
.dyob-progress-label {
	font-size: 11px; font-weight: 600;
	text-transform: uppercase; letter-spacing: 0.05em;
}
.dyob-progress-step.active .dyob-progress-dot {
	background: var(--ob-orange); color: #fff;
	border-color: var(--ob-orange);
	box-shadow: 0 0 0 4px rgba(255,90,31,0.18);
}
.dyob-progress-step.active { color: var(--ob-orange); }
.dyob-progress-step.done .dyob-progress-dot {
	background: var(--ob-green); color: #fff;
	border-color: var(--ob-green);
	font-size: 0;
}
.dyob-progress-step.done .dyob-progress-dot::before { content: '✓'; font-size: 16px; }
.dyob-progress-step.done { color: var(--ob-green); }
.dyob-progress-line {
	flex: 1; max-width: 80px;
	height: 2px; background: var(--ob-border);
	margin: 0 8px 18px;
	transition: background 0.25s ease;
}
.dyob-progress-line.done { background: var(--ob-green); }

/* ===== SAVE STATUS ===== */
.dyob-save-status {
	text-align: center; font-size: 11px;
	color: var(--ob-text-faint);
	margin: 8px 0 16px; min-height: 16px;
	font-style: italic;
}
.dyob-save-status.is-saved { color: var(--ob-green); }
.dyob-save-status.is-error { color: var(--ob-red); font-style: normal; font-weight: 600; }

/* ===== RESUME ===== */
.dyob-resume {
	background: var(--ob-orange-soft);
	border: 1px solid var(--ob-orange);
	border-radius: var(--ob-radius);
	padding: 14px 18px;
	margin-bottom: 16px;
	font-size: 13.5px;
	color: var(--ob-text);
}
.dyob-resume strong { display: block; margin-bottom: 4px; }
.dyob-resume-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== CARD ===== */
.dyob-card {
	background: var(--ob-card);
	border: 1px solid var(--ob-border);
	border-radius: var(--ob-radius);
	padding: 32px 36px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
@media (max-width: 600px) { .dyob-card { padding: 22px 18px; } }

/* ===== PAGES ===== */
.dyob-page { display: none; }
.dyob-page.is-active { display: block; animation: dyob-fade 0.25s ease-out; }
@keyframes dyob-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}
.dyob-page-header {
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ob-border-soft);
}
.dyob-page-tag {
	display: inline-block;
	font-size: 11px; font-weight: 600;
	text-transform: uppercase; letter-spacing: 0.05em;
	color: var(--ob-orange);
	background: var(--ob-orange-soft);
	padding: 3px 9px;
	border-radius: 999px;
	margin-bottom: 8px;
}
.dyob-page-header h2 {
	font-size: 1.4rem; font-weight: 700; margin-bottom: 4px;
}
.dyob-page-header p { color: var(--ob-text-muted); font-size: 0.92rem; margin: 0; }

/* ===== FIELDS ===== */
.dyob-field { margin-bottom: 22px; }
.dyob-field > label {
	display: block;
	font-weight: 600;
	font-size: 0.92rem;
	margin-bottom: 4px;
	color: var(--ob-text);
}
.dyob-field > label .dyob-req {
	color: var(--ob-orange);
	font-weight: 700;
	margin-left: 2px;
}
.dyob-field .dyob-help {
	font-size: 0.82rem;
	color: var(--ob-text-muted);
	margin-bottom: 8px;
	line-height: 1.6;
}
.dyob-field .dyob-help strong { color: var(--ob-text); }
.dyob-field .dyob-help em { font-style: italic; color: var(--ob-text); }
.dyob-field .dyob-help code {
	background: var(--ob-bg);
	padding: 1px 5px;
	border-radius: 3px;
	font-family: ui-monospace, 'SF Mono', Menlo, monospace;
	font-size: 0.78rem;
}

.dyob-field input[type=text],
.dyob-field input[type=tel],
.dyob-field input[type=email],
.dyob-field input[type=url],
.dyob-field textarea,
.dyob-field select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	font-size: 0.95rem;
	font-family: inherit;
	color: var(--ob-text);
	background: var(--ob-card);
	border: 1px solid var(--ob-border);
	border-radius: var(--ob-radius-sm);
	transition: border-color 0.15s, box-shadow 0.15s;
}
.dyob-field input:focus,
.dyob-field textarea:focus {
	outline: none;
	border-color: var(--ob-orange);
	box-shadow: 0 0 0 3px rgba(255,90,31,0.12);
}
.dyob-field textarea {
	resize: vertical;
	line-height: 1.55;
	min-height: 70px;
}

.dyob-field.is-valid input,
.dyob-field.is-valid textarea {
	border-color: var(--ob-green);
	padding-right: 38px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px 16px;
}
.dyob-field.is-error input,
.dyob-field.is-error textarea {
	border-color: var(--ob-red);
	box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.dyob-field .dyob-error {
	display: none;
	color: var(--ob-red);
	font-size: 0.82rem;
	margin-top: 6px;
	font-weight: 500;
}
.dyob-field.is-error .dyob-error { display: block; }

.dyob-char-counter {
	font-size: 0.75rem;
	color: var(--ob-text-faint);
	margin-top: 4px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* ===== OPTIONS (checkboxes / radios) — alignment fix ===== */
.dyob-options {
	display: flex; flex-direction: column; gap: 8px;
}
.dyob-option {
	display: grid;
	grid-template-columns: 22px 1fr; /* fixed-width checkbox column → labels align */
	align-items: start;
	gap: 12px;
	padding: 11px 14px;
	border: 1px solid var(--ob-border);
	border-radius: var(--ob-radius-sm);
	cursor: pointer;
	transition: border-color 0.12s, background 0.12s;
	background: var(--ob-card);
	font-weight: 500;
}
.dyob-option:hover {
	border-color: var(--ob-orange);
	background: var(--ob-orange-soft);
}
.dyob-option input[type=checkbox],
.dyob-option input[type=radio] {
	width: 18px; height: 18px;
	margin: 2px 0 0 0; /* tiny offset so it lines up with first line of text */
	accent-color: var(--ob-orange);
	flex-shrink: 0;
	cursor: pointer;
}
.dyob-option > span {
	font-size: 0.92rem;
	color: var(--ob-text);
	line-height: 1.45;
}
.dyob-option > span em { font-style: italic; color: var(--ob-text-muted); }
.dyob-option:has(input:checked) {
	border-color: var(--ob-orange);
	background: var(--ob-orange-soft);
}

/* ===== FILE UPLOAD ===== */
.dyob-file-drop {
	display: block;
	border: 2px dashed var(--ob-border);
	border-radius: var(--ob-radius);
	padding: 24px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	background: #fafafa;
}
.dyob-file-drop:hover, .dyob-file-drop.is-drag {
	border-color: var(--ob-orange);
	background: var(--ob-orange-soft);
}
.dyob-file-drop input[type=file] { display: none; }
.dyob-file-drop-icon { font-size: 28px; margin-bottom: 6px; }
.dyob-file-drop-text { font-size: 0.92rem; font-weight: 600; color: var(--ob-text); }
.dyob-file-drop-hint { font-size: 0.78rem; color: var(--ob-text-muted); margin-top: 4px; }
.dyob-link { color: var(--ob-orange); text-decoration: underline; }
.dyob-file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.dyob-file-row {
	display: flex; align-items: center; gap: 8px;
	font-size: 0.82rem;
	background: #fafafa;
	border: 1px solid var(--ob-border-soft);
	padding: 7px 12px; border-radius: 6px;
}
.dyob-file-row strong { color: var(--ob-text); }
.dyob-file-row .dyob-file-size { color: var(--ob-text-muted); }
.dyob-file-row button {
	margin-left: auto;
	border: none; background: none;
	color: var(--ob-red);
	font-size: 0.78rem; cursor: pointer; font-weight: 600;
}

/* ===== CALLOUT ===== */
.dyob-callout {
	background: var(--ob-orange-soft);
	border-left: 3px solid var(--ob-orange);
	border-radius: 0 var(--ob-radius-sm) var(--ob-radius-sm) 0;
	padding: 16px 18px;
	margin-bottom: 22px;
	font-size: 0.9rem;
	line-height: 1.6;
}
.dyob-callout p { margin: 6px 0; }
.dyob-callout ol { margin: 6px 0; padding-left: 22px; }
.dyob-callout code {
	background: #fff;
	padding: 1px 6px;
	border-radius: 3px;
	font-family: ui-monospace, 'SF Mono', Menlo, monospace;
	font-size: 0.82rem;
}
.dyob-callout-hint {
	color: var(--ob-text-muted);
	font-size: 0.82rem;
	margin-top: 6px;
}

/* ===== PAGE NAV ===== */
.dyob-page-nav {
	display: flex; justify-content: space-between; align-items: center;
	margin-top: 26px; padding-top: 22px;
	border-top: 1px solid var(--ob-border-soft);
	gap: 12px;
}

/* ===== BUTTONS ===== */
.dyob-btn {
	padding: 0.75rem 1.6rem;
	border-radius: var(--ob-radius-sm);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
	border: 1px solid var(--ob-border);
	background: var(--ob-card);
	color: var(--ob-text);
	display: inline-flex;
	align-items: center; justify-content: center;
	gap: 6px;
}
.dyob-btn:hover { background: #f5f5f5; }
.dyob-btn-primary {
	background: var(--ob-orange);
	color: #fff;
	border-color: var(--ob-orange);
}
.dyob-btn-primary:hover {
	background: var(--ob-orange-hover);
	border-color: var(--ob-orange-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(255,90,31,0.25);
}
.dyob-btn-primary:disabled {
	background: var(--ob-text-faint);
	border-color: var(--ob-text-faint);
	cursor: not-allowed; opacity: 0.6;
	transform: none; box-shadow: none;
}
.dyob-btn-secondary {
	background: transparent;
	border-color: var(--ob-border);
	color: var(--ob-text-muted);
}
.dyob-btn-secondary:hover {
	border-color: var(--ob-text); color: var(--ob-text); background: transparent;
}
.dyob-btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* ===== THANKS ===== */
.dyob-thanks { text-align: center; padding: 16px 0; }
.dyob-thanks-icon {
	width: 64px; height: 64px;
	background: var(--ob-green); color: #fff;
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 28px;
	margin-bottom: 20px;
	box-shadow: 0 8px 20px rgba(22,163,74,0.3);
}
.dyob-thanks h2 {
	font-size: 1.7rem; font-weight: 700; margin-bottom: 8px;
	letter-spacing: -0.02em;
}
.dyob-thanks-lead { color: var(--ob-text-muted); margin-bottom: 24px; }
.dyob-thanks-steps {
	background: var(--ob-orange-soft);
	border-radius: var(--ob-radius);
	padding: 20px 24px;
	text-align: left;
}
.dyob-thanks-steps h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.dyob-thanks-steps ol { padding-left: 22px; font-size: 0.92rem; }
.dyob-thanks-steps li { margin: 6px 0; }

.dyob-footer {
	text-align: center;
	color: var(--ob-text-faint);
	font-size: 0.78rem;
	padding: 24px 16px 8px;
}
