/* ISQA Survey form. Uses the ISQA theme's colours when present, with fallbacks for any other theme. */

.isqs {
	--s-green: var(--green-600, #1f8a3b);
	--s-green-dark: var(--green-700, #176b2e);
	--s-green-soft: var(--green-50, #edf8ef);
	--s-text: var(--text, #14201a);
	--s-muted: var(--muted, #56625b);
	--s-line: var(--line, #e3e9e5);
	--s-tint: var(--tint, #f5f8f6);
	--s-radius: 14px;
	--s-head: var(--font-head, system-ui, sans-serif);
	margin: 32px 0;
	padding: 28px;
	border: 1px solid var(--s-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(12, 25, 18, .06), 0 8px 24px rgba(12, 25, 18, .06);
	color: var(--s-text);
	font-size: 16px;
	scroll-margin-top: 96px;
}
.isqs *, .isqs *::before, .isqs *::after { box-sizing: border-box; }
.isqs p { color: inherit; }
.isqs [hidden] { display: none !important; }
@media (max-width: 600px) { .isqs { padding: 20px 16px; margin: 24px -4px; border-radius: 14px; } }

.isqs-message { font-size: 17px; }
.isqs-message p { margin: 0; }

.isqs-banner { margin: 0 0 20px; padding: 10px 14px; border-radius: 10px; background: #fff3d6; border: 1px solid #ffe0a3; color: #5b3200; font-size: 14px; font-weight: 600; }

.isqs-progress { height: 6px; border-radius: 99px; background: var(--s-tint); overflow: hidden; }
.isqs-progress span { display: block; height: 100%; background: linear-gradient(90deg, #8dc63f, var(--s-green)); border-radius: 99px; transition: width .3s ease; }
.isqs-step { margin: 10px 0 18px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--s-muted); }

.isqs-section h2 { margin: 0 0 8px; font: 800 clamp(22px, 3vw, 28px)/1.2 var(--s-head); letter-spacing: -.01em; outline: none; }
.isqs-intro { margin: 0 0 12px; color: var(--s-muted); }
.isqs-privacy { margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; background: var(--s-green-soft); font-size: 15px; }
.isqs-req-note { margin: 0 0 8px; font-size: 13px; color: var(--s-muted); }
.isqs-req { color: #be123c; font-weight: 700; }
.isqs-alert { margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: #fee2e2; border: 1px solid #fecaca; color: #7f1d1d; font-weight: 600; }

/* questions */
.isqs-q { margin: 0; padding: 22px 0; border: 0; border-top: 1px solid var(--s-line); min-width: 0; }
.isqs-q legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; font: 700 17px/1.4 var(--s-head); }
.isqs-q legend + * { clear: both; }
.isqs-help { clear: both; margin: 0 0 10px; font-size: 14px; color: var(--s-muted); }
.isqs-q.has-error { padding-left: 14px; border-left: 3px solid #dc2626; }
.isqs-error { margin: 8px 0 0; color: #b91c1c; font-size: 14px; font-weight: 600; }

.isqs-options { clear: both; display: grid; gap: 8px; }
.isqs-option {
	display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border: 1.5px solid var(--s-line); border-radius: 10px;
	cursor: pointer; line-height: 1.4; transition: border-color .15s, background-color .15s;
}
.isqs-option:hover { border-color: #b9d3c1; }
.isqs-option input { margin: 3px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--s-green); }
.isqs-option:has(input:checked) { border-color: var(--s-green); background: var(--s-green-soft); }
.isqs-option:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.isqs-option:has(input:focus-visible) { outline: 3px solid #8dc63f; outline-offset: 2px; }

.isqs-other, .isqs-text {
	width: 100%; margin-top: 10px; padding: 11px 14px; border: 1.5px solid var(--s-line); border-radius: 10px;
	font: inherit; color: inherit; background: #fff;
}
.isqs-other:focus, .isqs-text:focus { outline: none; border-color: var(--s-green); box-shadow: 0 0 0 4px rgba(31, 138, 59, .15); }
.isqs-text { resize: vertical; min-height: 90px; clear: both; display: block; }

/* scale & grid pills */
.isqs-scale, .isqs-grid-pills { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.isqs-pill { position: relative; cursor: pointer; }
.isqs-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.isqs-pill span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--s-line); border-radius: 10px; font-weight: 600; line-height: 1.2; text-align: center; }
.isqs-pill:hover span { border-color: #b9d3c1; }
.isqs-pill input:checked + span { border-color: var(--s-green); background: var(--s-green); color: #fff; }
.isqs-pill input:focus-visible + span { outline: 3px solid #8dc63f; outline-offset: 2px; }
.isqs-scale .isqs-pill span { min-width: 56px; }
.isqs-scale-labels { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0 0; font-size: 13px; color: var(--s-muted); }
.isqs-grid { clear: both; display: grid; gap: 14px; }
.isqs-grid-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; }
.isqs-grid-label { font-weight: 600; }
.isqs-grid-pills .isqs-pill span { font-size: 14px; font-weight: 500; min-height: 40px; }
@media (max-width: 600px) { .isqs-grid-row { grid-template-columns: 1fr; gap: 6px; } }

/* navigation */
.isqs-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--s-line); }
.isqs-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px;
	border: 1.5px solid transparent; font: 600 15px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
}
.isqs-btn-primary { background: var(--s-green); color: #fff; }
.isqs-btn-primary:hover { background: var(--s-green-dark); color: #fff; }
.isqs-btn-primary:disabled { opacity: .6; cursor: wait; }
.isqs-btn-ghost { background: #fff; color: var(--s-text); border-color: var(--s-line); }
.isqs-btn-ghost:hover { border-color: var(--s-green); color: var(--s-green); }
.isqs-saved { margin: 14px 0 0; font-size: 13px; color: var(--s-muted); }

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

/* endings */
.isqs-ending { outline: none; text-align: center; padding: 12px 0; }
.isqs-ending h2 { margin: 0 0 10px; font: 800 clamp(24px, 3.4vw, 32px)/1.2 var(--s-head); }
.isqs-ending p { color: var(--s-muted); max-width: 56ch; margin: 0 auto 16px; }
.isqs-ending.is-complete h2::before { content: ""; display: block; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--s-green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f8a3b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 28px no-repeat; }
.isqs-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
