﻿/* ==========================================================================
   GrowthWorkbook - the pages a survey respondent sees (gw5-respond.css),
   batch S1, 2026-10-08. Linked by Survey.master: survey.aspx, thankyou.aspx,
   surveypreview.aspx. Works with js/gw5-respond.js.

   The questions are drawn by clsPortal.CreateQuestionGroup (shared with the
   survey builder and other pages, so it is not changed). This file styles
   what it draws as it is:
     div#QG_<id>  > .form-group > .col-lg-12 > h5.question (+ span.color-red-dark *)
       Short / long text      input.form-control / textarea.form-control
       Radio / checkbox       table#ctl00_CP_Q_<id> > tr > td > input + label
       "Others"               the next .form-group (hidden) > textarea#..._Others
       Dropdown               select.form-control
       Multiple textbox       .form-group > label.control-label + .col-lg-8 > input
       Text / radio grid      .no-more-tables > table (row label in the first cell)
       NPS                    table.btn-group-nps, eleven cells in one row
   No Bootstrap, no colour-mix() and no :has() for anything that matters, so
   older phones get the same page. Light colours only (see Survey.master).
   ========================================================================== */
:root {
    --rs-brand: #0B63CE;
    --rs-brand-ink: #0951A9;
    --rs-on-brand: #FFFFFF;
    --rs-tint: #E9F1FB;
    --rs-ring: rgba(11, 99, 206, .28);
    --rs-bg: #F3F6FB;
    --rs-card: #FFFFFF;
    --rs-field: #F9F9FA;
    --rs-head: #F4F6F9;
    --rs-text: #0F172A;
    --rs-t2: #475467;
    --rs-muted: #667085;
    --rs-line: #E1E6EE;
    --rs-fb: #76818F;
    --rs-ob: #C3CAD6;
    --rs-err: #B42318;
    --rs-err-tint: #FEF3F2;
    --rs-r: 12px;
    color-scheme: light;
}
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Nirmala UI", "Noto Sans Gujarati", "Anek Gujarati", Arial, sans-serif; font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; scroll-padding-bottom: 110px; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--rs-text); -webkit-font-smoothing: antialiased; background: radial-gradient(900px 400px at 50% -90px, rgba(11, 99, 206, .15), rgba(11, 99, 206, 0)) no-repeat, var(--rs-bg); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--rs-brand); outline-offset: 2px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.gw-rs-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* top bar: the survey's logo, where you are, the progress */
.gw-rs-top { position: sticky; top: 0; z-index: 10; background: rgba(243, 246, 251, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(225, 230, 238, .7); }
.gw-rs-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 10px 16px 8px; }
.gw-rs-toplogo { display: block; height: 28px; width: auto; max-width: 50%; object-fit: contain; }
.gw-rs-pt { font-size: 13.5px; font-weight: 600; color: var(--rs-muted); text-align: right; }
.gw-rs-bar { height: 4px; background: var(--rs-line); }
.gw-rs-bar i { display: block; width: 0; height: 100%; background: var(--rs-brand); border-radius: 0 4px 4px 0; transition: width .4s ease; }

/* the card */
.gw-rs-wrap { max-width: 760px; margin: 0 auto; padding: 22px 16px 24px; }
.gw-rs-card { background: var(--rs-card); border-radius: 24px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 28px 60px -28px rgba(16, 24, 40, .28); }
.gw-rs-hero { padding: 36px 28px 26px; border-bottom: 1px solid var(--rs-line); text-align: center; }
.gw-rs-logo { display: block; max-width: min(100%, 360px); max-height: 120px; width: auto; height: auto; margin: 0 auto 18px; border-radius: 10px; object-fit: contain; }
.gw-rs-title { margin: 0 0 8px; font-size: clamp(26px, 5vw, 34px); line-height: 1.15; letter-spacing: -.025em; font-weight: 700; overflow-wrap: break-word; }
.gw-rs-desc { margin: 0 auto; max-width: 52ch; color: var(--rs-t2); font-size: 17px; overflow-wrap: break-word; }
.gw-rs-desc:empty, .gw-rs-desc > span:empty { display: none; }
.gw-rs-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.gw-rs-meta:empty { display: none; }
.gw-rs-meta span { padding: 4px 12px; border-radius: 999px; background: var(--rs-tint); color: var(--rs-brand-ink); font-size: 13px; font-weight: 600; }

/* one question */
form div[id^="QG_"] { padding: 28px 36px; border-bottom: 1px solid var(--rs-line); transition: background-color .2s; }
form div[id^="QG_"]:focus-within { background: linear-gradient(90deg, var(--rs-tint), rgba(233, 241, 251, 0) 60%); }
form .col-lg-12, form .col-lg-8, form .col-lg-4, form .col-md-12 { min-width: 0; }
form h5.question { display: inline; margin: 0; font-size: 19px; line-height: 1.4; font-weight: 650; letter-spacing: -.01em; overflow-wrap: break-word; }
.gw-rs-qh { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; }
.gw-rs-qt { flex: 1; min-width: 0; padding-top: 1px; }
.gw-rs-qt h5.question { display: inline; }
.gw-rs-n { display: grid; place-items: center; flex: none; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 9px; background: var(--rs-line); color: var(--rs-t2); font-size: 13.5px; font-weight: 700; transition: background-color .2s, color .2s; }
.gw-rs-q.is-ok .gw-rs-n { background: var(--rs-brand); color: var(--rs-on-brand); }
form .color-red-dark { color: var(--rs-err); font-weight: 700; }
.gw-rs-req { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--rs-muted); white-space: nowrap; vertical-align: 2px; }
.gw-rs-q .gw-rs-star { display: none !important; }
.gw-rs-err { margin: 12px 0 0; color: var(--rs-err); font-size: 14.5px; font-weight: 600; }
.gw-rs-q.is-bad h5.question { color: var(--rs-err); }
/* without the script the heading and the answers still stack */
form div[id^="QG_"] > .form-group > .col-lg-12 > .form-group { margin-top: 14px; }
.gw-rs-qh + .form-group, .gw-rs-qh + .no-more-tables { margin-top: 0 !important; }

/* text answers, dropdowns */
form .form-control { display: block; width: 100%; max-width: 100%; padding: 13px 14px; border: 1.5px solid var(--rs-fb); border-radius: var(--rs-r); background: var(--rs-field); color: var(--rs-text); font-size: 16px; line-height: 1.4; transition: border-color .15s, box-shadow .15s, background-color .15s; }
form .form-control:focus { outline: 2px solid transparent; border-color: var(--rs-brand); background: var(--rs-card); box-shadow: 0 0 0 4px var(--rs-ring); }
form textarea.form-control { min-height: 110px; resize: vertical; width: 100% !important; }
form select.form-control { -webkit-appearance: none; appearance: none; padding-right: 42px; background: var(--rs-field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; cursor: pointer; }
form select.form-control[multiple] { padding-right: 14px; background-image: none; }
.gw-rs-q.is-bad .form-control { border-color: var(--rs-err); }

/* "Others (please specify:)": its box */
.gw-rs-other { margin-top: 10px; }
.gw-rs-other textarea.form-control { min-height: 84px; }

/* radio and checkbox lists: each answer a card (a table the server draws) */
form table.gw-rs-opts, form table.gw-rs-opts > tbody { display: block; width: 100%; }
form table.gw-rs-opts tr { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
form table.gw-rs-opts tr:last-child { margin-bottom: 0; }
form table.gw-rs-opts td { position: relative; display: block; flex: 1 1 100%; padding: 0; }
form table.gw-rs-opts.is-inline td { flex: 1 1 12rem; }
form table.gw-rs-opts td:empty { display: none; }
form table.gw-rs-opts td > input { position: absolute; top: 0; left: 0; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
form table.gw-rs-opts td > label { display: flex; align-items: center; gap: 12px; min-height: 50px; margin: 0; padding: 12px 16px; border: 1.5px solid var(--rs-ob); border-radius: var(--rs-r); background: var(--rs-card); line-height: 1.4; overflow-wrap: break-word; transition: border-color .15s, background-color .15s; }
form table.gw-rs-opts td > label::before { content: ""; flex: none; width: 22px; height: 22px; border: 2px solid var(--rs-fb); border-radius: 50%; background: var(--rs-card) no-repeat center; transition: background-color .15s, border-color .15s; }
form table.gw-rs-opts td > input[type=checkbox] + label::before { border-radius: 7px; }
form table.gw-rs-opts td:hover > label { border-color: var(--rs-brand); }
form table.gw-rs-opts td > input:checked + label { border-color: var(--rs-brand); background: var(--rs-tint); }
form table.gw-rs-opts td > input[type=radio]:checked + label::before { border-color: var(--rs-brand); background-color: var(--rs-brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='4' fill='white'/%3E%3C/svg%3E"); background-size: 100%; }
form table.gw-rs-opts td > input[type=checkbox]:checked + label::before { border-color: var(--rs-brand); background-color: var(--rs-brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E"); background-size: 14px; }
form table.gw-rs-opts td > input:focus + label { outline: 2px solid var(--rs-brand); outline-offset: 2px; }
form table.gw-rs-opts td > input:focus:not(:focus-visible) + label { outline: 0; }
.gw-rs-q.is-bad table.gw-rs-opts td > label { border-color: var(--rs-err); }

/* NPS: 0 to 10 in one row (two on a phone) */
form table.btn-group-nps, form table.btn-group-nps > tbody { display: block; width: 100%; }
form table.btn-group-nps tr { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
form table.btn-group-nps td { position: relative; display: block; padding: 0; }
form table.btn-group-nps td > input { position: absolute; top: 0; left: 0; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
form table.btn-group-nps td > label { display: grid; place-items: center; height: 50px; margin: 0; border: 1.5px solid var(--rs-ob); border-radius: var(--rs-r); background: var(--rs-card); font-weight: 650; transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s; }
form table.btn-group-nps td:hover > label { border-color: var(--rs-brand); }
form table.btn-group-nps td > input:checked + label { border-color: var(--rs-brand); background: var(--rs-brand); color: var(--rs-on-brand); transform: translateY(-2px); box-shadow: 0 8px 16px -6px rgba(11, 99, 206, .6); }
form table.btn-group-nps td > input:focus + label { outline: 2px solid var(--rs-brand); outline-offset: 2px; }
form table.btn-group-nps td > input:focus:not(:focus-visible) + label { outline: 0; }
.gw-rs-q.is-bad table.btn-group-nps td > label { border-color: var(--rs-err); }
.gw-rs-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--rs-muted); font-size: 13.5px; }

/* multiple textboxes: label above each box */
.gw-rs-q[data-kind=multi] .col-lg-12 > .form-group { max-width: 540px; }
.gw-rs-q[data-kind=multi] .col-lg-12 > .form-group + .form-group { margin-top: 14px; }
form .control-label { display: block; margin: 0 0 6px; color: var(--rs-t2); font-size: 14.5px; font-weight: 600; text-align: left; }
form .col-lg-12 > .form-group + .form-group > .control-label { margin-top: 2px; }

/* text and radio grids: scroll sideways on a phone, the row label stays */
form .no-more-tables { margin-top: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1.5px solid var(--rs-ob); border-radius: var(--rs-r); }
form .no-more-tables table { width: 100%; min-width: 480px; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 15px; }
form .no-more-tables th, form .no-more-tables td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--rs-line); text-align: left; vertical-align: middle; }
form .no-more-tables tbody tr:last-child > * { border-bottom: 0; }
form .no-more-tables thead th { background: var(--rs-head); color: var(--rs-muted); font-size: 13px; font-weight: 650; }
form .no-more-tables tbody td:first-child { position: sticky; left: 0; z-index: 1; background: var(--rs-card); font-weight: 650; box-shadow: 1px 0 0 var(--rs-line); }
form .no-more-tables thead th:first-child { position: sticky; left: 0; z-index: 2; }
form .no-more-tables .form-control { min-width: 130px; padding: 9px 10px; border-radius: 9px; }
form .no-more-tables.is-radio thead th, form .no-more-tables.is-radio tbody td { text-align: center; }
form .no-more-tables.is-radio thead th:first-child, form .no-more-tables.is-radio tbody td:first-child { text-align: left; }
form .no-more-tables input[type=radio] { -webkit-appearance: none; appearance: none; display: inline-block; width: 22px; height: 22px; margin: 5px; border: 2px solid var(--rs-fb); border-radius: 50%; background: var(--rs-card) no-repeat center / 100%; vertical-align: middle; cursor: pointer; transition: background-color .15s, border-color .15s; }
form .no-more-tables input[type=radio]:hover { border-color: var(--rs-brand); }
form .no-more-tables input[type=radio]:focus { outline: 2px solid var(--rs-brand); outline-offset: 2px; }
form .no-more-tables input[type=radio]:focus:not(:focus-visible) { outline: 0; }
form .no-more-tables input[type=radio]:checked { border-color: var(--rs-brand); background-color: var(--rs-brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='4' fill='white'/%3E%3C/svg%3E"); }
.gw-rs-q.is-bad .no-more-tables { border-color: var(--rs-err); }

/* footer note, the buttons */
.gw-rs-fdesc { margin: 0; padding: 18px 36px 0; color: var(--rs-muted); font-size: 14.5px; text-align: center; overflow-wrap: break-word; }
.gw-rs-fdesc:empty, .gw-rs-fdesc > span:empty { display: none; }
.gw-rs-actions { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 16px 36px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rs-line); border-radius: 0 0 24px 24px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gw-rs-sum { flex: 1; color: var(--rs-err); font-size: 14.5px; font-weight: 650; text-align: center; }
.gw-rs-sum.is-note { color: var(--rs-t2); }
.gw-rs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 28px; border: 1.5px solid var(--rs-line); border-radius: var(--rs-r); background: var(--rs-card); color: var(--rs-text); font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer; -webkit-appearance: none; appearance: none; transition: filter .15s, transform .1s, background-color .15s; }
.gw-rs-btn:hover { background: var(--rs-head); }
.gw-rs-btn.is-pri { min-width: 140px; border-color: var(--rs-brand); background: var(--rs-brand); color: var(--rs-on-brand); box-shadow: 0 8px 20px -8px rgba(11, 99, 206, .7); }
.gw-rs-btn.is-pri:hover { filter: brightness(1.07); background: var(--rs-brand); }
.gw-rs-btn:active { transform: scale(.98); }
.gw-rs-btn.is-busy { cursor: progress; filter: saturate(.7) brightness(.95); }
.gw-rs-foot { margin: 6px 0 28px; color: var(--rs-muted); font-size: 13px; text-align: center; }

/* a page with something to say instead of questions; the thank-you page */
.gw-rs-state { padding: 60px 28px 52px; text-align: center; }
.gw-rs-state h1 { margin: 20px 0 8px; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; }
.gw-rs-state > p { margin: 0 auto; max-width: 44ch; color: var(--rs-t2); font-size: 17px; }
.gw-rs-state .gw-rs-btn { margin-top: 22px; }
.gw-rs-ico { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: var(--rs-tint); }
.gw-rs-ico svg { width: 44px; height: 44px; fill: none; stroke: var(--rs-brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gw-rs-ico.is-ok { animation: gw-rs-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.gw-rs-ico.is-ok path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: gw-rs-draw .5s .15s ease forwards; }
.gw-rs-ty { margin-top: 20px; color: var(--rs-t2); font-size: 17px; overflow-wrap: break-word; }
.gw-rs-ty p { margin: 0 0 .5em; max-width: none; }
.gw-rs-ty > br { display: none; }
.gw-rs-ty h1, .gw-rs-ty h2, .gw-rs-ty h3 { margin: 0 0 .4em; color: var(--rs-text); line-height: 1.2; letter-spacing: -.02em; }
.gw-rs-ty h1 { font-size: 28px; }
.gw-rs-ty h2 { font-size: 22px; }
.gw-rs-ty h3 { font-size: 19px; }
.gw-rs-ty img { height: auto; border-radius: 10px; }
.gw-rs-ty a { color: var(--rs-brand-ink); }
.gw-rs-ty .ql-align-center { text-align: center; }
.gw-rs-ty .ql-align-right { text-align: right; }
.gw-rs-ty .ql-align-justify { text-align: justify; }
.gw-rs-ty .ql-size-small { font-size: .75em; }
.gw-rs-ty .ql-size-large { font-size: 1.5em; }
.gw-rs-ty .ql-size-huge { font-size: 2.5em; }
@keyframes gw-rs-draw { to { stroke-dashoffset: 0; } }
@keyframes gw-rs-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes gw-rs-up { from { opacity: 0; transform: translateY(10px); } }
.gw-rs-card { animation: gw-rs-up .35s ease; }

@media (max-width: 600px) {
    .gw-rs-hero { padding: 28px 18px 22px; }
    form div[id^="QG_"] { padding: 24px 18px; }
    form h5.question { font-size: 18px; }
    form table.btn-group-nps tr { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .gw-rs-fdesc { padding: 16px 18px 0; }
    .gw-rs-actions { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
    .gw-rs-sum { flex-basis: 100%; order: -1; }
    .gw-rs-sum:empty, .gw-rs-sum:not(.is-note) { display: none; }
    .gw-rs-btn.is-pri { flex: 1; }
    .gw-rs-state { padding: 48px 20px 40px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
    body { background: #fff; }
    .gw-rs-top, .gw-rs-actions { position: static; }
}

#gwRsMeta { display: none !important; }