/*
 * NeuroClinicians — Expert Second Opinions (nca-second-opinion.js).
 * Shared pieces (header, stepper, grid, cards, filters, clinician list, form
 * fields, order summary, payment, confirmation layout) come from
 * nca-paid-review.css, scoped to #nca-so-app as well. This file adds only the
 * Second Opinion parts: referral-type tiles, search, info popup, FAQ, file
 * upload. Neuro design language: Fraunces headings, Poppins body, brand teal.
 */
#nca-so-app .nca-so-ini{display:inline-flex; align-items:center; justify-content:center; width:100%; height:100%; font-size:14px; font-weight:600; letter-spacing:.5px; color:var(--brand)}
.nca-so-page{padding:8px 0 40px}
#nca-so-app .nca-so-lede{max-width:620px; margin:-6px auto 26px; text-align:center; font-size:13.5px; color:var(--ink-2); line-height:1.65}
#nca-so-app .nca-so-form .field input:disabled{opacity:.7; cursor:not-allowed}
/* ---- screen 1: referral types ---- */
#nca-so-app .nca-so-types{padding:24px}
#nca-so-app .nca-so-types-hd{display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px}
#nca-so-app .nca-so-types-hd .nca-pr-h2{margin:0}
#nca-so-app .nca-so-search{position:relative; display:block; width:100%; max-width:280px; margin:0}
#nca-so-app .nca-so-search input{width:100%; min-height:42px; margin:0; padding:9px 42px 9px 18px; border:1px solid var(--field-line); border-radius:999px; background:var(--field-bg); font-family:inherit; font-size:13px; color:var(--ink); box-shadow:none; outline:none}
#nca-so-app .nca-so-search input:focus{border-color:var(--brand); box-shadow:0 0 0 4px var(--brand-ring)}
#nca-so-app .nca-so-search input::placeholder{color:var(--ink-4); opacity:1}
#nca-so-app .nca-so-search svg{position:absolute; right:16px; top:50%; width:16px; height:16px; transform:translateY(-50%); color:var(--ink-3); pointer-events:none}

#nca-so-app .nca-so-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px}
#nca-so-app .nca-so-span{grid-column:1/-1}
#nca-so-app .nca-so-tile{position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:10px; min-height:132px; padding:18px 16px 16px; background:#fff; border:1px solid var(--line); border-radius:var(--r-box); cursor:pointer; transition:border-color .15s, background .15s}
#nca-so-app .nca-so-tile:hover{border-color:var(--brand-soft)}
#nca-so-app .nca-so-tile:focus-visible, #nca-so-app .nca-so-other:focus-visible{outline:2px solid var(--brand); outline-offset:2px}
#nca-so-app .nca-so-tile.is-selected{border-color:var(--brand); background:var(--brand-tint)}
#nca-so-app .nca-so-tile b{font-size:13px; font-weight:600; line-height:1.35; color:var(--ink); padding-right:22px}
#nca-so-app .nca-so-radio{position:absolute; top:14px; right:14px; width:18px; height:18px; display:flex; align-items:center; justify-content:center; border:1.5px solid #cfcdc7; border-radius:50%; background:#fff; color:#fff}
#nca-so-app .nca-so-tile.is-selected .nca-so-radio{background:var(--brand); border-color:var(--brand)}
#nca-so-app .nca-so-radio svg{width:11px; height:11px}
#nca-so-app .nca-so-tile-ico{display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:12px; background:var(--brand-tint2); color:var(--brand); flex-shrink:0}
#nca-so-app .nca-so-tile-ico svg{width:22px; height:22px}
#nca-so-app .nca-so-info{margin:auto 0 0; min-height:0; padding:0; border:none; background:none; color:var(--brand); font-size:12px; font-weight:500; cursor:pointer}
#nca-so-app .nca-so-info:hover, #nca-so-app .nca-so-info:focus{background:none; color:var(--brand-dk); text-decoration:underline}

#nca-so-app .nca-so-other{display:flex; align-items:center; gap:14px; margin-top:12px; padding:16px 18px; border:1px dashed var(--brand-soft); border-radius:var(--r-box); background:#fff; cursor:pointer}
#nca-so-app .nca-so-other.is-selected{border-style:solid; border-color:var(--brand); background:var(--brand-tint)}
#nca-so-app .nca-so-other b{display:block; font-size:13px; font-weight:600}
#nca-so-app .nca-so-other span:not(.nca-so-tile-ico){display:block; font-size:12px; color:var(--ink-3); line-height:1.5}
#nca-so-app .nca-so-actions{display:flex; justify-content:flex-end; margin-top:20px}

@media (max-width:900px){ #nca-so-app .nca-so-grid{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:640px){
  #nca-so-app .nca-so-types{padding:18px 16px}
  #nca-so-app .nca-so-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #nca-so-app .nca-so-search{max-width:none}
  #nca-so-app .nca-so-actions .nca-pr-cta{width:100%}
}

/* ---- info popup ---- */
#nca-so-app .nca-so-modal{position:fixed; inset:0; z-index:100000; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(20,30,32,.5)}
#nca-so-app .nca-so-modal-card{width:100%; max-width:440px; padding:26px 24px 22px; background:#fff; border-radius:var(--r-card); box-shadow:0 24px 64px rgba(0,40,46,.28)}
#nca-so-app .nca-so-modal-card h3{font-family:'Fraunces',serif; font-optical-sizing:auto; font-size:21px; font-weight:600; margin:14px 0 8px}
#nca-so-app .nca-so-modal-card p{font-size:13px; color:var(--ink-2); line-height:1.65; margin:0 0 14px}
#nca-so-app .nca-so-modal-price b{color:var(--brand); font-size:16px}

/* ---- FAQ ---- */
#nca-so-app .nca-so-faq{margin-top:46px; text-align:center}
#nca-so-app .nca-so-eyebrow{display:inline-block; margin:0 0 10px; padding:4px 12px; border-radius:999px; background:var(--brand-tint2); color:var(--brand); font-size:11px; font-weight:500}
#nca-so-app .nca-so-faq-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; text-align:left}
#nca-so-app .nca-so-faq-card{padding:22px; background:#fff; border:1px solid var(--line); border-radius:var(--r-card)}
#nca-so-app .nca-so-faq-card svg{width:26px; height:26px; color:var(--brand); margin-bottom:12px}
#nca-so-app .nca-so-faq-card h3{font-family:'Fraunces',serif; font-optical-sizing:auto; font-size:16px; font-weight:600; line-height:1.35; margin:0 0 8px}
#nca-so-app .nca-so-faq-card p{font-size:12.5px; color:var(--ink-2); line-height:1.65}
@media (max-width:760px){ #nca-so-app .nca-so-faq-grid{grid-template-columns:1fr} }

/* ---- screen 2: clinician summary extras ---- */
#nca-so-app .nca-so-type-line{font-size:12px; color:var(--ink-3); margin:-4px 0 12px}
#nca-so-app .nca-so-type-line b{color:var(--ink); font-weight:600}
#nca-so-app .nca-so-link{min-height:0; padding:0; margin:0 0 0 4px; border:none; background:none; color:var(--brand); font-size:12px; font-weight:500; cursor:pointer; text-decoration:underline}
#nca-so-app .nca-so-link:hover, #nca-so-app .nca-so-link:focus{background:none; color:var(--brand-dk)}

/* ---- screen 3: referral form ---- */
#nca-so-app .nca-so-form .nca-pr-card-sub{margin-bottom:6px}
#nca-so-app .nca-so-sec{font-size:13px; font-weight:600; color:var(--ink); margin:22px 0 14px; padding-top:18px; border-top:1px solid var(--line)}
#nca-so-app .nca-so-hint{font-size:11.5px; color:var(--ink-3); margin:8px 0 0}
#nca-so-app .nca-so-drop{position:relative; display:flex; align-items:center; justify-content:center; gap:10px; min-height:84px; margin:0; padding:16px; border:1.5px dashed var(--brand-soft); border-radius:var(--r-box); background:var(--brand-tint); color:var(--brand); font-size:13px; font-weight:500; cursor:pointer; transition:background .15s, border-color .15s}
#nca-so-app .nca-so-drop:hover, #nca-so-app .nca-so-drop.is-over{border-color:var(--brand); background:var(--brand-tint2)}
#nca-so-app .nca-so-drop:focus-within{outline:2px solid var(--brand); outline-offset:2px}
#nca-so-app .nca-so-drop input{position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer}
#nca-so-app .nca-so-drop svg{width:22px; height:22px}
#nca-so-app .nca-so-drop.is-disabled{opacity:.5; cursor:not-allowed}
#nca-so-app .nca-so-drop.is-disabled input{cursor:not-allowed}
#nca-so-app .field.has-error .nca-so-drop{border-color:var(--err)}
#nca-so-app .nca-so-files{display:flex; flex-direction:column; gap:8px; margin-top:10px}
#nca-so-app .nca-so-files:empty{display:none}
#nca-so-app .nca-so-file{display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#fff}
#nca-so-app .nca-so-file.has-error{border-color:#f3c7c4; background:var(--err-bg)}
#nca-so-app .nca-so-file-ico{display:flex; width:32px; height:32px; align-items:center; justify-content:center; border-radius:10px; background:var(--brand-tint2); color:var(--brand); flex-shrink:0}
#nca-so-app .nca-so-file-ico svg{width:17px; height:17px}
#nca-so-app .nca-so-file-body{flex:1; min-width:0}
#nca-so-app .nca-so-file-body b{display:block; font-size:12.5px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
#nca-so-app .nca-so-file-body span{font-size:11.5px; color:var(--ink-3)}
#nca-so-app .nca-so-file-body .is-ok{display:inline-flex; align-items:center; gap:3px; color:var(--green); font-weight:500}
#nca-so-app .nca-so-file-body .is-ok svg{width:11px; height:11px}
#nca-so-app .nca-so-file-body .is-bad{color:var(--err)}
#nca-so-app .nca-so-file-del{display:flex; align-items:center; justify-content:center; width:30px; height:30px; min-height:0; padding:0; margin:0; border:none; border-radius:50%; background:none; color:var(--ink-3); cursor:pointer}
#nca-so-app .nca-so-file-del:hover, #nca-so-app .nca-so-file-del:focus{background:var(--err-bg); color:var(--err)}
#nca-so-app .nca-so-file-del svg{width:16px; height:16px}

/* ---- screen 5: add more documents ---- */
#nca-so-app .nca-so-more .nca-pr-card-sub{margin-bottom:14px}
#nca-so-app .nca-so-retry{margin-top:12px}
@media (prefers-reduced-motion:reduce){ #nca-so-app *{transition:none !important} }
/* Upload box is a <label> inside .field — beat the shared ".field > label" rule (display:block). */
#nca-so-app .field > label.nca-so-drop{display:flex; align-items:center; justify-content:center; gap:10px; margin:0; font-size:13px; font-weight:500; color:var(--brand); line-height:1.2}
#nca-so-app .field > label.nca-so-drop svg{width:22px; height:22px; flex-shrink:0}
