/* Styled Google Forms — override any variable from your theme, e.g. .sgf { --sgf-accent: #e11d48; } */
.sgf {
	--sgf-accent: #4f46e5;
	--sgf-radius: 14px;
	--sgf-text: #1f2937;
	--sgf-muted: #6b7280;
	--sgf-border: #e5e7eb;
	--sgf-surface: #ffffff;
	--sgf-bg-soft: #f8fafc;
	--sgf-error: #dc2626;
	--sgf-accent-soft: color-mix(in srgb, var(--sgf-accent) 10%, transparent);
	--sgf-ring: 0 0 0 3px color-mix(in srgb, var(--sgf-accent) 25%, transparent);

	max-width: 720px;
	margin: 0 auto;
	color: var(--sgf-text);
	font: inherit;
	line-height: 1.6;
	box-sizing: border-box;
}
.sgf *, .sgf *::before, .sgf *::after { box-sizing: inherit; }
.sgf [hidden] { display: none !important; }

/* ---------- Header ---------- */
.sgf-header {
	position: relative;
	padding: 28px 28px 24px;
	margin-bottom: 20px;
	background: var(--sgf-surface);
	border: 1px solid var(--sgf-border);
	border-radius: var(--sgf-radius);
	overflow: hidden;
}
.sgf-header::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 6px;
	background: var(--sgf-accent);
}
.sgf-title { margin: 0 0 8px; font-size: 1.75rem; line-height: 1.25; font-weight: 700; color: inherit; }
.sgf-desc { color: var(--sgf-muted); font-size: 1rem; }
.sgf-desc a, .sgf-q__desc a, .sgf-section__desc a { color: var(--sgf-accent); }

/* ---------- Progress ---------- */
.sgf-progress { display: flex; align-items: center; gap: 12px; margin: 0 4px 20px; }
.sgf-progress__bar { flex: 1; height: 8px; background: var(--sgf-border); border-radius: 99px; overflow: hidden; }
.sgf-progress__bar span { display: block; height: 100%; width: 0; background: var(--sgf-accent); border-radius: inherit; transition: width .35s ease; }
.sgf-progress__label { font-size: .875rem; color: var(--sgf-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Sections & questions ---------- */
.sgf-page { animation: sgf-in .3s ease; }
@keyframes sgf-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sgf-page { animation: none; } .sgf-progress__bar span { transition: none; } }

.sgf-section { margin: 0 4px 16px; }
.sgf-section__title { margin: 0 0 4px; font-size: 1.35rem; font-weight: 700; color: inherit; }
.sgf-section__desc { color: var(--sgf-muted); }

.sgf-q, .sgf-info { margin-bottom: 16px; }
.sgf--cards .sgf-q,
.sgf--cards .sgf-info {
	padding: 22px 24px;
	background: var(--sgf-surface);
	border: 1px solid var(--sgf-border);
	border-radius: var(--sgf-radius);
	transition: border-color .2s, box-shadow .2s;
}
.sgf--cards .sgf-q:focus-within { border-color: color-mix(in srgb, var(--sgf-accent) 45%, var(--sgf-border)); box-shadow: 0 4px 18px rgba(15, 23, 42, .06); }
.sgf--minimal .sgf-q { padding: 18px 0; border-bottom: 1px solid var(--sgf-border); margin: 0; }
.sgf--minimal .sgf-header { border: 0; padding-inline: 0; }
.sgf--minimal .sgf-header::before { inset: auto auto 0 0; width: 56px; height: 4px; border-radius: 4px; }
[dir="rtl"].sgf--minimal .sgf-header::before { inset: auto 0 0 auto; }
.sgf--minimal .sgf-info { padding: 18px 0 4px; }

.sgf-info--muted { opacity: .7; }
.sgf-info__title { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; color: inherit; }

.sgf-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.sgf-legend { padding: 0; width: 100%; }
.sgf-q__title { display: block; font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.sgf-q__desc { color: var(--sgf-muted); font-size: .925rem; margin-bottom: 4px; }
.sgf-req { color: var(--sgf-error); }

/* ---------- Inputs ---------- */
.sgf-input {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 12px 14px;
	font: inherit;
	color: inherit;
	background: var(--sgf-bg-soft);
	border: 1.5px solid var(--sgf-border);
	border-radius: calc(var(--sgf-radius) * .6);
	transition: border-color .15s, box-shadow .15s, background .15s;
	-webkit-appearance: none;
	appearance: none;
}
.sgf-input:hover { border-color: color-mix(in srgb, var(--sgf-accent) 30%, var(--sgf-border)); }
.sgf-input:focus { outline: none; border-color: var(--sgf-accent); background: var(--sgf-surface); box-shadow: var(--sgf-ring); }
textarea.sgf-input { resize: vertical; min-height: 110px; }
[dir="rtl"] .sgf input[dir="ltr"] { text-align: right; }
.sgf-input--auto { width: auto; min-width: 160px; }
.sgf-input--num { width: 110px; }
.sgf-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.sgf-inline .sgf-input { margin-top: 10px; }

.sgf-select { position: relative; }
.sgf-select select { padding-inline-end: 42px; cursor: pointer; }
.sgf-select::after {
	content: "";
	position: absolute;
	inset-inline-end: 16px;
	top: calc(50% + 5px);
	width: 8px; height: 8px;
	border: solid var(--sgf-muted);
	border-width: 0 2px 2px 0;
	transform: translateY(-50%) rotate(45deg);
	pointer-events: none;
}

/* ---------- Radio / checkbox options ---------- */
.sgf-options { display: grid; gap: 8px; margin-top: 12px; }
.sgf-option {
	position: relative;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px 14px;
	border: 1.5px solid var(--sgf-border);
	border-radius: calc(var(--sgf-radius) * .6);
	cursor: pointer;
	transition: border-color .15s, background .15s;
	user-select: none;
}
.sgf-option:hover { border-color: color-mix(in srgb, var(--sgf-accent) 40%, var(--sgf-border)); }
.sgf-option:has(input:checked) { border-color: var(--sgf-accent); background: var(--sgf-accent-soft); }
.sgf-option > input[type="radio"],
.sgf-option > input[type="checkbox"],
.sgf-grid__cell > input,
.sgf-scale__item > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sgf-option__mark {
	flex: none;
	width: 20px; height: 20px;
	border: 2px solid #cbd5e1;
	border-radius: 50%;
	background: var(--sgf-surface);
	display: grid;
	place-items: center;
	transition: border-color .15s, background .15s;
}
input[type="checkbox"] + .sgf-option__mark { border-radius: 6px; }
input:checked + .sgf-option__mark { border-color: var(--sgf-accent); background: var(--sgf-accent); }
input[type="radio"]:checked + .sgf-option__mark { box-shadow: inset 0 0 0 3px var(--sgf-surface); }
input[type="checkbox"]:checked + .sgf-option__mark::after {
	content: "";
	width: 5px; height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translateY(-1px) rotate(45deg);
}
input:focus-visible + .sgf-option__mark { box-shadow: var(--sgf-ring); }
.sgf-option__text { flex: 1; }
.sgf-option--other .sgf-option__text { flex: 0 0 auto; }
.sgf-other-input { flex: 1 1 180px; margin-top: 0; padding: 8px 12px; }

/* ---------- Linear scale / rating ---------- */
.sgf-scale { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.sgf-scale__label { color: var(--sgf-muted); font-size: .9rem; }
.sgf-scale__items { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: center; }
.sgf-scale__item { position: relative; cursor: pointer; }
.sgf-scale__item span {
	display: grid;
	place-items: center;
	min-width: 44px; height: 44px;
	padding: 0 6px;
	border: 1.5px solid var(--sgf-border);
	border-radius: 50%;
	font-weight: 600;
	transition: all .15s;
}
.sgf-scale__item:hover span { border-color: var(--sgf-accent); }
.sgf-scale__item input:checked + span { background: var(--sgf-accent); border-color: var(--sgf-accent); color: #fff; transform: scale(1.06); }
.sgf-scale__item input:focus-visible + span { box-shadow: var(--sgf-ring); }
.sgf-scale--rating .sgf-scale__item span { border: 0; font-size: 1.8rem; color: #d1d5db; min-width: 36px; }
.sgf-scale--rating .sgf-scale__item input:checked + span { background: none; color: var(--sgf-accent); }
.sgf-scale--rating .sgf-scale__items:has(input:checked) .sgf-scale__item:has(~ .sgf-scale__item input:checked) span { color: var(--sgf-accent); }

/* ---------- Grid ---------- */
.sgf-grid-wrap { overflow-x: auto; margin-top: 12px; }
.sgf-grid { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: .95rem; }
.sgf-grid th, .sgf-grid td { padding: 8px; text-align: center; font-weight: 500; border: 0; background: none; }
.sgf-grid thead th { color: var(--sgf-muted); font-size: .85rem; }
.sgf-grid tbody th { text-align: start; font-weight: 600; }
.sgf-grid tbody tr { background: var(--sgf-bg-soft); }
.sgf-grid tbody tr > :first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.sgf-grid tbody tr > :last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.sgf-grid__cell { position: relative; display: inline-grid; cursor: pointer; padding: 4px; }

/* ---------- Errors ---------- */
.sgf-error { color: var(--sgf-error); font-size: .875rem; min-height: 0; }
.sgf-error:not(:empty) { margin-top: 8px; }
.sgf-q.is-invalid { border-color: var(--sgf-error) !important; }
.sgf-q.is-invalid .sgf-input { border-color: var(--sgf-error); }
.sgf-form-error { padding: 12px 16px; margin-bottom: 16px; border-radius: calc(var(--sgf-radius) * .6); background: color-mix(in srgb, var(--sgf-error) 8%, transparent); color: var(--sgf-error); }

/* ---------- Navigation ---------- */
.sgf-nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 8px; }
.sgf-nav .sgf-next, .sgf-nav .sgf-submit { margin-inline-start: auto; }
.sgf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 120px;
	padding: 13px 26px;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--sgf-accent);
	border: 1.5px solid var(--sgf-accent);
	border-radius: calc(var(--sgf-radius) * .6);
	cursor: pointer;
	transition: filter .15s, transform .1s, box-shadow .15s;
	text-decoration: none;
	line-height: 1.2;
}
.sgf-btn:hover { filter: brightness(1.08); }
.sgf-btn:active { transform: translateY(1px); }
.sgf-btn:focus-visible { outline: none; box-shadow: var(--sgf-ring); }
.sgf-btn--ghost { background: transparent; color: var(--sgf-text); border-color: var(--sgf-border); }
.sgf-btn--ghost:hover { border-color: var(--sgf-accent); color: var(--sgf-accent); filter: none; }
.sgf-btn[disabled] { opacity: .65; cursor: progress; }
.sgf-btn.is-loading::before {
	content: "";
	width: 16px; height: 16px;
	border: 2px solid rgba(255,255,255,.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sgf-spin .7s linear infinite;
}
@keyframes sgf-spin { to { transform: rotate(360deg); } }

/* ---------- Success ---------- */
.sgf-success {
	text-align: center;
	padding: 48px 24px;
	background: var(--sgf-surface);
	border: 1px solid var(--sgf-border);
	border-radius: var(--sgf-radius);
	color: var(--sgf-accent);
	animation: sgf-in .4s ease;
	outline: none;
}
.sgf-success__msg { color: var(--sgf-text); font-size: 1.2rem; font-weight: 600; margin: 12px 0 0; white-space: pre-line; }

/* Honeypot */
.sgf-hp { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.sgf { position: relative; }

@media (max-width: 600px) {
	.sgf-header { padding: 22px 18px 18px; }
	.sgf-title { font-size: 1.45rem; }
	.sgf--cards .sgf-q, .sgf--cards .sgf-info { padding: 18px 16px; }
	.sgf-btn { flex: 1; min-width: 0; }
	.sgf-scale__items { justify-content: space-between; }
	.sgf-scale__item span { min-width: 38px; height: 38px; }
}
