/* @file    nap-survey.css
   @created 2026-09-22 by Claude
   @updated 2026-09-22 by Claude
   @desc    NAP — public survey/poll pages (list, gate, form, thanks) and the
            shared render_question() macro (app/templates/survey/_question.html).
            Place at: static/css/nap-survey.css
            Task 12: the survey templates were built "minimal but real" with no
            styling at all, and public base.html does not load Bootstrap (its
            <link> is commented out), so bare `class="form-control"` etc. never
            did anything. Built from scratch, mobile-first, reusing only the
            existing design tokens (:root in nap-header-footer.css) — same
            structure/naming approach as nap-contact.css and nap-resources.css.
            All rules scoped under .survey-page so nothing here leaks onto
            other pages (this stylesheet is only linked from survey templates). */

.survey-page{font-family:var(--hf-sans);color:var(--ink)}

/* ---------- shared layout ---------- */
.survey-wrap{width:100%;max-width:var(--maxw);margin:0 auto;padding:22px 16px 56px;box-sizing:border-box}
.survey-eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:var(--green-700)}
.survey-title{margin:10px 0 10px;font-size:24px;font-weight:900;letter-spacing:-.4px;line-height:1.2;color:var(--green-900)}
.survey-line{display:block;width:48px;height:4px;border-radius:3px;background:var(--green-500);margin:0 0 14px}
.survey-desc{margin:0 0 6px;font-size:14.5px;font-weight:500;color:var(--ink-soft);max-width:68ch;line-height:1.55}
.survey-instructions{margin:6px 0 0;font-size:13.5px;font-weight:500;color:var(--ink-soft);max-width:68ch;line-height:1.55}

.survey-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:20px 16px;box-sizing:border-box}
.survey-card + .survey-card{margin-top:18px}

/* ---------- LIST PAGE ---------- */
.survey-grid{display:grid;grid-template-columns:1fr;gap:16px;margin-top:8px}
.survey-item{display:flex;flex-direction:column;gap:10px;background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:20px;text-decoration:none;color:inherit;transition:transform .15s,box-shadow .15s,border-color .15s}
.survey-item:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);border-color:var(--green-100)}
.survey-item h2{margin:0;font-size:17px;font-weight:800;color:var(--green-900);letter-spacing:-.2px;line-height:1.35}
.survey-item p{margin:0;font-size:13.5px;font-weight:500;color:var(--ink-soft);line-height:1.55}
.survey-item .survey-cta{margin-top:2px;display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:800;color:var(--green-700)}
.survey-item .survey-cta svg{width:15px;height:15px;transition:transform .15s}
.survey-item:hover .survey-cta svg{transform:translateX(3px)}
.survey-empty{text-align:center;padding:52px 20px;color:var(--ink-faint)}
.survey-empty b{display:block;color:var(--green-900);font-size:15.5px;font-weight:800;margin-bottom:6px}

/* ---------- META STRIP (province / district / plan period, read-only) ---------- */
.survey-meta{display:flex;flex-wrap:wrap;gap:10px 22px;background:var(--green-50);border:1px solid var(--green-100);border-radius:14px;padding:14px 16px;margin-bottom:18px;font-size:13.5px}
.survey-meta .mi{display:flex;flex-direction:column;gap:2px}
.survey-meta .mi .ml{font-size:10.5px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;color:var(--green-700)}
.survey-meta .mi .mv{font-weight:800;color:var(--ink)}

/* ---------- CALLOUTS ---------- */
.survey-callout{display:flex;gap:12px;align-items:flex-start;border-radius:14px;padding:14px 16px;margin-bottom:18px;font-size:13.5px;font-weight:600;line-height:1.55}
.survey-callout .sci{flex:0 0 auto;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;margin-top:1px}
.survey-callout .sci svg{width:14px;height:14px}
.survey-callout.warn{background:#fff8e8;border:1.5px solid #f3d98b;color:#7a5b06}
.survey-callout.warn .sci{background:#f3d98b;color:#7a5b06}
.survey-callout.error{background:#fdecec;border:1.5px solid #f3b7b7;color:#8a1f1f}
.survey-callout.error .sci{background:#f3b7b7;color:#8a1f1f}
.survey-callout ul{margin:0;padding-left:18px}
.survey-callout li{margin:2px 0}

/* ---------- FORM ---------- */
.survey-section-h{margin:26px 0 4px;padding-top:20px;border-top:1px solid var(--line);font-size:16px;font-weight:900;color:var(--green-900)}
.survey-card > .survey-section-h:first-child{margin-top:0;padding-top:0;border-top:none}
.survey-section-help{margin:0 0 4px;font-size:13px;color:var(--ink-soft)}

.survey-field{margin-bottom:20px}
.survey-field:last-child{margin-bottom:0}
.survey-label{display:block;font-size:14px;font-weight:800;color:var(--ink);margin-bottom:8px;line-height:1.4}
.survey-required{color:#c23b3b;margin-left:2px}
.survey-help{margin:0 0 8px;font-size:12.5px;color:var(--ink-soft)}

.survey-input,.survey-select,.survey-textarea{
  width:100%;font-family:inherit;font-size:15px;color:var(--ink);
  background:var(--paper);border:1.5px solid var(--line);border-radius:11px;
  padding:12px 14px;box-sizing:border-box;transition:border-color .15s,box-shadow .15s;
  min-height:46px;
}
.survey-textarea{min-height:104px;resize:vertical;line-height:1.5}
.survey-select{appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' fill='none' stroke='%2346554d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:38px}
.survey-input:focus,.survey-select:focus,.survey-textarea:focus{
  outline:none;border-color:var(--green-500);box-shadow:0 0 0 3px rgba(42,168,115,.16)}
.survey-input::placeholder,.survey-textarea::placeholder{color:var(--ink-faint)}

/* radios / checkboxes — comfortable tap targets for a form filled on a phone */
.survey-options{display:flex;flex-direction:column;gap:8px}
.survey-choice{display:flex;align-items:flex-start;gap:11px;padding:11px 13px;border:1.5px solid var(--line);border-radius:12px;cursor:pointer;transition:border-color .15s,background .15s;min-height:44px;box-sizing:border-box}
.survey-choice:hover{border-color:var(--green-400);background:var(--green-50)}
.survey-choice input[type="radio"],.survey-choice input[type="checkbox"]{
  flex:0 0 auto;width:20px;height:20px;margin:2px 0 0;accent-color:var(--green-700);cursor:pointer}
.survey-choice .ct{font-size:14.5px;font-weight:600;color:var(--ink);line-height:1.45;padding-top:1px}
.survey-choice:has(input:checked){border-color:var(--green-500);background:var(--green-50)}
.survey-other-input{margin-top:8px;margin-left:31px;max-width:calc(100% - 31px)}

.survey-readonly-value{margin:0;font-size:14.5px;color:var(--ink);line-height:1.55;padding:10px 0}
.survey-readonly-value.muted{color:var(--ink-faint)}

.survey-actions{margin-top:26px;display:flex;flex-wrap:wrap;gap:12px}
.survey-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:inherit;
  font-size:14.5px;font-weight:800;color:#fff;background:var(--green-700);border:1.5px solid var(--green-700);
  padding:13px 24px;border-radius:12px;cursor:pointer;transition:.15s;text-decoration:none;width:100%;box-sizing:border-box}
.survey-btn:hover{background:var(--green-800);border-color:var(--green-800)}
.survey-btn-outline{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:inherit;
  font-size:13.5px;font-weight:800;color:var(--green-700);background:var(--green-50);border:1.5px solid var(--green-100);
  padding:12px 20px;border-radius:12px;cursor:pointer;transition:.15s;text-decoration:none}
.survey-btn-outline:hover{background:var(--green-700);border-color:var(--green-700);color:#fff}

/* thanks page */
.survey-thanks{text-align:center;padding:38px 20px}
.survey-thanks .si{width:58px;height:58px;border-radius:50%;background:var(--green-50);color:var(--green-700);display:grid;place-items:center;margin:0 auto 18px}
.survey-thanks .si svg{width:28px;height:28px}
.survey-thanks p{font-size:14.5px;color:var(--ink-soft);max-width:52ch;margin:0 auto 22px;line-height:1.6}
.survey-thanks-links{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}

/* ---------- responsive: desktop enhancements (mobile-first base above) ---------- */
@media (min-width:640px){
  .survey-wrap{padding:34px 32px 64px}
  .survey-title{font-size:30px}
  .survey-card{padding:32px 36px}
  .survey-actions{justify-content:flex-start}
  .survey-btn{width:auto}
  .survey-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
}
