/*
 * GalyamStudio client questionnaire: the layout of Keren's brief (top bar, step list, one stage per screen, fixed bottom
 * bar, summary and consent), in the CRM's visual language (Heebo, navy and blue, the tokens of crm-base.css when the CRM
 * plugin is installed, with the same values as fallbacks).
 */
html.gsb-open, body.gsb-open { margin: 0 !important; overflow: hidden !important; }
body.gsb-open > :not(#gsb-brief):not(script):not(style):not(link) { display: none !important; }

#gsb-brief {
	--ink: var(--gs-ink, #122044); --navy: var(--gs-navy, #0d1b3e); --muted: var(--gs-muted-on-soft, #5f6b82);
	--line: var(--gs-border, #d8e2ef); --accent: var(--gs-blue, #1554db); --accent-hover: var(--gs-blue-hover, #1148bd);
	--soft: var(--gs-soft, #f4f7fd); --pale: var(--gs-pale, #eaf2ff); --danger: var(--gs-danger, #b42318);
	position: fixed; inset: 0; z-index: 2147483000; overflow: auto; overscroll-behavior: contain; isolation: isolate;
	background: var(--soft); color: var(--ink); font: 16px/1.7 var(--gs-font, 'Heebo', Arial, sans-serif); direction: rtl; text-align: right;
}
#gsb-brief *, #gsb-brief *::before, #gsb-brief *::after { box-sizing: border-box; }
#gsb-brief h1, #gsb-brief h2, #gsb-brief p { font-family: inherit; margin: 0; padding: 0; }
#gsb-brief h1 { font-size: clamp(27px, 3vw, 38px); line-height: 1.3; font-weight: 800; color: var(--navy); }
#gsb-brief h2 { font-size: 18px; line-height: 1.5; font-weight: 800; color: var(--navy); }
#gsb-brief p { white-space: pre-line; overflow-wrap: anywhere; }
#gsb-brief small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
#gsb-brief button, #gsb-brief input, #gsb-brief textarea { font: inherit; box-shadow: none; text-shadow: none; letter-spacing: 0; }
#gsb-brief button { cursor: pointer; background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: 12px; padding: 12px 22px; min-height: 46px; font-size: 15px; font-weight: 700; line-height: 1.5; }
#gsb-brief button:hover { background: var(--accent-hover); }
#gsb-brief button:disabled { opacity: .6; cursor: wait; }
#gsb-brief .gsb-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
#gsb-brief .gsb-secondary:hover { background: var(--pale); }
#gsb-brief .gsb-link { background: transparent; color: var(--accent); font-size: 13px; padding: 4px 0; min-height: 32px; text-decoration: underline; border: 0; }
#gsb-brief .gsb-link:hover { background: transparent; color: var(--accent-hover); }
#gsb-brief :focus-visible { outline: 3px solid rgba(21, 84, 219, .45); outline-offset: 2px; }

#gsb-brief .gsb-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 5vw; min-height: 72px; border-bottom: 1px solid var(--line); background: #fff; }
#gsb-brief .gsb-logo { display: inline-flex; align-items: center; gap: 10px; direction: ltr; color: var(--navy); font-size: 21px; font-weight: 800; line-height: 1.2; }
#gsb-brief .gsb-logo img { width: 32px; height: 32px; }
#gsb-brief .gsb-top-side { text-align: left; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
#gsb-brief .gsb-progress { height: 4px; background: var(--pale); }
#gsb-brief .gsb-progress i { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }

#gsb-brief .gsb-layout { display: grid; grid-template-columns: 220px minmax(0, 780px); gap: 44px; max-width: 1110px; padding: 36px 26px 150px; margin: auto; }
#gsb-brief aside nav { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; }
#gsb-brief aside nav button { display: flex; align-items: center; gap: 12px; background: transparent; color: var(--muted); text-align: right; font-weight: 500; padding: 8px 12px; min-height: 42px; }
#gsb-brief aside nav button:hover { background: #fff; }
#gsb-brief aside nav button[aria-current] { background: var(--pale); color: var(--accent); font-weight: 700; }
#gsb-brief aside nav span { border: 1px solid var(--line); border-radius: 50%; width: 26px; height: 26px; flex: none; display: grid; place-items: center; font-size: 12px; background: #fff; }
#gsb-brief aside nav button[data-done] span { background: var(--accent); border-color: var(--accent); color: #fff; }
#gsb-brief .gsb-side-note { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
#gsb-brief main { min-width: 0; }
#gsb-brief .gsb-eyebrow { color: var(--accent); font-size: 13px; font-weight: 700; margin-bottom: 10px; }
#gsb-brief .gsb-intro { color: var(--muted); margin-top: 14px; line-height: 1.85; }
#gsb-brief form { margin-top: 28px; }

#gsb-brief .gsb-field { display: block; border: 0; padding: 0; margin: 0 0 30px; min-width: 0; }
#gsb-brief .gsb-label { display: block; float: none; width: 100%; padding: 0; font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 11px; }
#gsb-brief .gsb-label small { display: inline; margin-right: 8px; font-weight: 400; font-size: 12px; }
#gsb-brief .gsb-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#gsb-brief .gsb-choice { border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; background: #fff; display: flex; align-items: center; gap: 11px; font-size: 15px; cursor: pointer; min-height: 58px; }
#gsb-brief .gsb-choice:hover { border-color: #b9c7da; }
#gsb-brief .gsb-choice:has(input:checked) { border-color: var(--accent); background: var(--pale); }
#gsb-brief input[type=radio], #gsb-brief input[type=checkbox] { appearance: auto; -webkit-appearance: auto; accent-color: var(--accent); width: 18px; height: 18px; min-width: 18px; padding: 0; margin: 0; flex-shrink: 0; }
#gsb-brief input[type=text], #gsb-brief input[type=number], #gsb-brief textarea { width: 100%; display: block; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); line-height: 1.6; min-height: 48px; }
#gsb-brief textarea { min-height: 110px; resize: vertical; }
#gsb-brief input[type=number] { max-width: 160px; }
#gsb-brief input:focus, #gsb-brief textarea:focus { border-color: var(--accent); outline: 3px solid rgba(21, 84, 219, .25); outline-offset: 1px; }
#gsb-brief .gsb-help { margin-top: 6px; }
#gsb-brief .gsb-desc { margin: -4px 0 12px; color: var(--ink); font-size: 15px; line-height: 1.8; }

/* matrix: one card per row, the choices as pills */
#gsb-brief .gsb-row { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; margin-bottom: 9px; }
#gsb-brief .gsb-row.gsb-answered { border-color: #b9cdf3; }
#gsb-brief .gsb-row-label { display: block; font-weight: 700; font-size: 15px; color: var(--navy); margin-bottom: 9px; }
#gsb-brief .gsb-pills { display: flex; flex-wrap: wrap; gap: 7px; }
#gsb-brief .gsb-pill { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
#gsb-brief .gsb-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
#gsb-brief .gsb-pill span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; line-height: 1.5; background: #fff; color: var(--ink); min-height: 34px; }
#gsb-brief .gsb-pill:hover span { border-color: #b9c7da; }
#gsb-brief .gsb-pill input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
#gsb-brief .gsb-pill input:focus-visible + span { outline: 3px solid rgba(21, 84, 219, .45); outline-offset: 2px; }
#gsb-brief .gsb-count { color: var(--muted); font-size: 13px; margin: -4px 0 10px; }

#gsb-brief .gsb-error { color: var(--danger); font-size: 13.5px; line-height: 1.8; }
#gsb-brief [aria-invalid=true] { border-color: var(--danger) !important; }
#gsb-brief .gsb-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

#gsb-brief .gsb-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255, 255, 255, .98); border-top: 1px solid var(--line); padding: 14px max(24px, calc((100vw - 1060px) / 2)); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
#gsb-brief .gsb-bottom b { color: var(--navy); }
#gsb-brief .gsb-actions { display: flex; gap: 10px; flex-wrap: wrap; }

#gsb-brief .gsb-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 16px; }
#gsb-brief .gsb-card-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 6px; }
#gsb-brief .gsb-answer { margin-top: 14px; font-size: 14px; }
#gsb-brief .gsb-answer p { margin-top: 3px; color: var(--muted); }
#gsb-brief .gsb-group { margin-top: 6px; font-size: 14px; }
#gsb-brief .gsb-group b { color: var(--navy); }
#gsb-brief .gsb-consent { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.8; margin-top: 6px; }
#gsb-brief .gsb-consent input { margin-top: 6px; }

#gsb-brief .gsb-center { max-width: 720px; margin: 60px auto; padding: 24px; }
#gsb-brief .gsb-center p { margin: 16px 0; color: var(--muted); }
#gsb-brief .gsb-check { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--gs-success-bg, #e9f7f1); color: var(--gs-success, #145c43); font-size: 28px; margin-bottom: 20px; }
#gsb-brief .gsb-admin { background: #fff8e6; border: 1px solid #f3dfa8; border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; font-size: 13.5px; }

@media (max-width: 860px) {
	#gsb-brief .gsb-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
	#gsb-brief .gsb-options { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
	#gsb-brief .gsb-top { padding: 12px 18px; gap: 10px; min-height: 64px; }
	#gsb-brief .gsb-logo { font-size: 18px; }
	#gsb-brief .gsb-logo img { width: 28px; height: 28px; }
	#gsb-brief .gsb-top small { font-size: 11px; }
	#gsb-brief .gsb-top-side { max-width: 150px; }
	#gsb-brief .gsb-layout { display: block; padding: 26px 18px 170px; }
	#gsb-brief aside { display: none; }
	#gsb-brief h1 { font-size: 27px; }
	#gsb-brief .gsb-intro { font-size: 15px; }
	#gsb-brief .gsb-pill span { font-size: 13px; padding: 6px 11px; }
	#gsb-brief .gsb-bottom { display: block; padding: 10px 18px max(12px, env(safe-area-inset-bottom)); }
	#gsb-brief .gsb-bottom > div:first-child { font-size: 13px; margin-bottom: 8px; }
	#gsb-brief .gsb-actions { flex-wrap: nowrap; }
	#gsb-brief [data-next] { flex: 1; }
	#gsb-brief .gsb-card { padding: 17px; }
	#gsb-brief .gsb-center { margin: 30px auto; }
}
@media (prefers-reduced-motion: reduce) { #gsb-brief * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { #gsb-brief { position: static; overflow: visible; } #gsb-brief .gsb-bottom, #gsb-brief aside { display: none; } }
