/* w3d-studio enquiry form. Uses the w3d2-theme tokens, with fallbacks for other themes. Mobile first. */
.w3dst-form,
.w3dst-success {
	--w3dst-text: var(--color-text-primary, #26272C);
	--w3dst-muted: var(--color-text-secondary, #5C5E66);
	--w3dst-border: var(--color-border, #E6E6E8);
	--w3dst-border-strong: var(--color-border-strong, #D0D1D4);
	--w3dst-surface: var(--color-surface, #fff);
	--w3dst-raised: var(--color-surface-raised, #F5F5F5);
	--w3dst-focus: var(--color-secondary, #4387F4);
	--w3dst-accent: var(--color-accent, #F16334);
	--w3dst-error: var(--color-error, #DC2626);
	--w3dst-radius: var(--radius-md, 8px);
	color: var(--w3dst-text);
	font-size: var(--text-base, 1rem);
}

.w3dst-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Sections */
.w3dst-section {
	border: 1px solid var(--w3dst-border);
	border-radius: var(--radius-lg, 12px);
	background: var(--w3dst-surface);
	padding: var(--space-5, 24px) var(--space-4, 16px);
	margin: 0 0 var(--space-5, 24px);
	min-width: 0;
}
.w3dst-section__head {
	display: flex;
	align-items: center;
	gap: var(--space-3, 12px);
	padding: 0;
	font-size: var(--text-xl, 1.35rem);
	font-weight: 700;
	line-height: 1.2;
	float: left;
	width: 100%;
}
.w3dst-section__head + * { clear: both; }
.w3dst-section__num {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--color-primary, #26272C);
	color: #fff;
	font-size: 0.9rem;
	flex: 0 0 auto;
}
.w3dst-section__intro { color: var(--w3dst-muted); margin: var(--space-2, 8px) 0 var(--space-4, 16px); font-size: var(--text-sm, 0.9rem); }

/* Fields */
.w3dst-field { margin-bottom: var(--space-4, 16px); }
.w3dst-field[hidden] { display: none; }
.w3dst-label,
.w3dst-choice > legend {
	display: block;
	font-weight: 600;
	font-size: var(--text-sm, 0.9rem);
	margin-bottom: 6px;
	padding: 0;
}
.w3dst-req { color: var(--w3dst-error); }
.w3dst-input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--w3dst-border-strong);
	border-radius: var(--w3dst-radius);
	background: var(--w3dst-surface);
	color: var(--w3dst-text);
	font: inherit;
	font-size: 16px; /* prevents iOS zoom */
	transition: border-color var(--transition-fast, 160ms ease), box-shadow var(--transition-fast, 160ms ease);
}
textarea.w3dst-input { min-height: 120px; resize: vertical; line-height: 1.55; }
.w3dst-input:focus,
.w3dst-option input:focus-visible + .w3dst-option__text {
	outline: none;
	border-color: var(--w3dst-focus);
	box-shadow: 0 0 0 3px var(--color-focus-ring, rgba(67, 135, 244, 0.25));
}
.w3dst-file { padding: 10px; background: var(--w3dst-raised); }
.w3dst-help { color: var(--w3dst-muted); font-size: var(--text-xs, 0.8rem); margin: 6px 0 0; line-height: 1.5; }
.w3dst-counter { color: var(--w3dst-muted); font-size: var(--text-xs, 0.8rem); text-align: right; margin: 4px 0 0; }
.w3dst-error { color: var(--w3dst-error); font-size: var(--text-sm, 0.875rem); font-weight: 600; margin: 6px 0 0; }
.w3dst-error[hidden] { display: none; }
.has-error .w3dst-input { border-color: var(--w3dst-error); }

/* Choices */
.w3dst-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.w3dst-choice__list { display: flex; flex-wrap: wrap; gap: var(--space-2, 8px); }
.w3dst-option { position: relative; display: inline-flex; cursor: pointer; }
.w3dst-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.w3dst-option__text {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid var(--w3dst-border-strong);
	border-radius: var(--radius-full, 999px);
	background: var(--w3dst-surface);
	font-size: var(--text-sm, 0.9rem);
	transition: border-color var(--transition-fast, 160ms ease), background var(--transition-fast, 160ms ease);
}
.w3dst-option:hover .w3dst-option__text { border-color: var(--w3dst-focus); }
.w3dst-option input:checked + .w3dst-option__text {
	border-color: var(--w3dst-focus);
	background: var(--color-secondary-subtle, #E8F1FE);
	box-shadow: inset 0 0 0 1px var(--w3dst-focus);
}
.w3dst-field--checks .w3dst-option input:checked + .w3dst-option__text .w3dst-option__label::before { content: "✓ "; }

/* Project type cards */
.w3dst-cards { display: grid; grid-template-columns: 1fr; gap: var(--space-2, 8px); }
.w3dst-card { display: block; }
.w3dst-card .w3dst-option__text {
	display: flex;
	width: 100%;
	border-radius: var(--w3dst-radius);
	padding: 12px 16px;
	gap: 2px;
}
.w3dst-option__label { font-weight: 600; }
.w3dst-option__desc { color: var(--w3dst-muted); font-size: var(--text-xs, 0.8rem); font-weight: 400; }

/* Follow-up block */
.w3dst-followup {
	border-left: 3px solid var(--w3dst-accent);
	background: var(--w3dst-raised);
	border-radius: 0 var(--w3dst-radius) var(--w3dst-radius) 0;
	padding: var(--space-4, 16px);
	margin: 0 0 var(--space-4, 16px);
}
.w3dst-followup[hidden] { display: none; }
.w3dst-followup__title { font-weight: 700; margin: 0 0 var(--space-3, 12px); }
.w3dst-form.is-enhanced .w3dst-followup { animation: w3dst-in 200ms ease; }
@keyframes w3dst-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.w3dst-note { font-size: var(--text-sm, 0.875rem); padding: 10px 12px; border-radius: var(--w3dst-radius); margin: 0 0 var(--space-3, 12px); }
.w3dst-note--warn { background: #FFF7E6; border: 1px solid #F3D19C; color: #6B4500; }

.w3dst-examples { margin: 0 0 var(--space-4, 16px); font-size: var(--text-sm, 0.9rem); }
.w3dst-examples summary { cursor: pointer; color: var(--color-secondary, #2F73E0); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.w3dst-examples ul { margin: var(--space-2, 8px) 0 0; padding-left: 1.1em; color: var(--w3dst-muted); }
.w3dst-examples li { margin-bottom: 6px; }

.w3dst-file-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: var(--text-xs, 0.8rem); color: var(--w3dst-muted); }

.w3dst-consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-sm, 0.9rem); line-height: 1.5; cursor: pointer; }
.w3dst-consent input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--w3dst-focus); }

/* Errors summary */
.w3dst-errors {
	border: 2px solid var(--w3dst-error);
	border-radius: var(--w3dst-radius);
	background: #FEF2F2;
	padding: var(--space-4, 16px);
	margin-bottom: var(--space-5, 24px);
}
.w3dst-errors[hidden] { display: none; }
.w3dst-errors:focus { outline: 3px solid var(--color-focus-ring, rgba(220, 38, 38, 0.3)); }
.w3dst-errors__title { font-size: var(--text-lg, 1.1rem); margin: 0 0 var(--space-2, 8px); color: var(--w3dst-error); }
.w3dst-errors ul { margin: 0; padding-left: 1.2em; }
.w3dst-errors a { color: var(--w3dst-error); text-decoration: underline; }

/* Submit */
.w3dst-submit { text-align: center; }
.w3dst-submit__btn { width: 100%; }
.w3dst-submit__btn[disabled] { opacity: 0.7; cursor: progress; }
.w3dst-submit__note { color: var(--w3dst-muted); font-size: var(--text-sm, 0.875rem); margin-top: var(--space-2, 8px); }

/* Success */
.w3dst-success {
	border: 1px solid var(--w3dst-border);
	border-radius: var(--radius-lg, 12px);
	background: var(--w3dst-surface);
	padding: var(--space-6, 32px) var(--space-5, 24px);
	text-align: center;
	box-shadow: var(--shadow-md, 0 8px 24px rgba(0, 0, 0, 0.08));
}
.w3dst-success:focus { outline: none; }
.w3dst-success__icon {
	display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
	background: var(--color-success, #059669); color: #fff; font-size: 28px; margin-bottom: var(--space-3, 12px);
}
.w3dst-success__title { font-size: var(--text-2xl, 1.8rem); margin: 0 0 var(--space-2, 8px); }
.w3dst-success__ref { font-size: var(--text-lg, 1.1rem); }
.w3dst-success__steps { text-align: left; max-width: 460px; margin: var(--space-4, 16px) auto; padding-left: 1.3em; }
.w3dst-success__steps li { margin-bottom: 6px; }
.w3dst-success__more { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2, 8px); }

@media (min-width: 640px) {
	.w3dst-section { padding: var(--space-6, 32px); }
	.w3dst-cards { grid-template-columns: repeat(2, 1fr); }
	.w3dst-submit__btn { width: auto; min-width: 280px; }
}
@media (min-width: 1024px) {
	.w3dst-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.w3dst-form *, .w3dst-form.is-enhanced .w3dst-followup { transition: none !important; animation: none !important; }
}
