/* NCG Consult — client front end. Theme-aware via --ncg-color-* fallbacks. */
.ncg-consult-client { max-width: 760px; margin: 0 auto; font-family: 'Inter', -apple-system, sans-serif; color: var(--ncg-color-body, #23312C); }
.ncg-cx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ncg-cx-loading { color: #888; padding: 40px; text-align: center; }

/* Honeypot — off-screen, not tabbable, hidden from assistive tech. */
.ncg-cx-hp { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* Tool-disabled notice */
.ncg-cx-unavailable { max-width: 560px; margin: 30px auto; background: var(--ncg-color-bg-surface, #fff); border: 1px solid var(--ncg-color-border, #eee); border-left: 5px solid #C89B7B; border-radius: 10px; padding: 30px 34px; }
.ncg-cx-unavailable h2 { font-family: 'Playfair Display', serif; color: var(--ncg-color-heading, #23312C); margin: 0 0 10px; }
.ncg-cx-unavailable p { color: var(--ncg-color-body, #444); line-height: 1.6; margin: 0; }

/* Buttons / links */
.ncg-cx-btn { background: #23312C; color: #fff; border: none; border-radius: 6px; padding: 13px 24px; font-weight: 700; font-size: 15px; cursor: pointer; }
.ncg-cx-btn:hover { background: #C89B7B; }
.ncg-cx-btn:disabled { opacity: 0.6; cursor: default; }
.ncg-cx-btn:focus-visible, .ncg-cx-link:focus-visible, .ncg-consult-client input:focus-visible, .ncg-consult-client textarea:focus-visible, .ncg-cx-list-item:focus-visible { outline: 3px solid #C89B7B; outline-offset: 2px; }
.ncg-cx-link { background: none; border: none; color: #C89B7B; font-weight: 700; cursor: pointer; padding: 6px 0; text-decoration: underline; }

/* Auth */
.ncg-cx-auth { max-width: 420px; margin: 40px auto; background: var(--ncg-color-bg-surface, #fff); border: 1px solid var(--ncg-color-border, #eee); border-radius: 10px; padding: 36px; }
.ncg-cx-auth h2 { font-family: 'Playfair Display', serif; color: var(--ncg-color-heading, #23312C); margin: 0 0 8px; }
.ncg-cx-auth-sub { color: var(--ncg-color-muted, #666); margin: 0 0 22px; line-height: 1.5; }
.ncg-cx-auth form { display: flex; flex-direction: column; gap: 8px; }
.ncg-cx-auth label { font-weight: 700; font-size: 13px; }
.ncg-cx-auth input { padding: 13px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px; }
.ncg-cx-auth .ncg-cx-btn { margin-top: 8px; }
.ncg-cx-msg { margin-top: 16px; padding: 10px 14px; background: #f5f1e9; border-radius: 6px; font-size: 14px; }

/* Home / list */
.ncg-cx-home-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0; gap: 12px; flex-wrap: wrap; }
.ncg-cx-home-head h2 { font-family: 'Playfair Display', serif; color: var(--ncg-color-heading, #23312C); margin: 0; }
.ncg-cx-start { background: var(--ncg-color-bg-surface, #fff); border: 1px solid var(--ncg-color-border, #eee); border-radius: 10px; padding: 22px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.ncg-cx-start label { font-weight: 700; font-size: 13px; margin-top: 6px; }
.ncg-cx-start input, .ncg-cx-start textarea { padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 15px; font-family: inherit; }
.ncg-cx-start textarea { min-height: 90px; resize: vertical; }
.ncg-cx-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ncg-cx-list-item { width: 100%; text-align: left; background: var(--ncg-color-bg-surface, #fff); border: 1px solid var(--ncg-color-border, #eee); border-left: 4px solid #C89B7B; border-radius: 8px; padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.ncg-cx-list-item:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.ncg-cx-list-title { font-weight: 700; color: var(--ncg-color-heading, #23312C); }
.ncg-cx-list-meta { font-size: 12px; color: var(--ncg-color-muted, #888); text-transform: capitalize; }
.ncg-cx-hint { color: var(--ncg-color-muted, #999); font-style: italic; }

/* Thread */
.ncg-cx-thread { display: flex; flex-direction: column; gap: 12px; }
.ncg-cx-messages { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--ncg-color-bg-paper, #F9F8F4); border: 1px solid var(--ncg-color-border, #eee); border-radius: 10px; min-height: 300px; max-height: 60vh; overflow-y: auto; }
.ncg-cx-msg { max-width: 85%; padding: 12px 16px; border-radius: 12px; line-height: 1.55; }
.ncg-cx-msg.mine { align-self: flex-end; background: #23312C; color: #fff; }
.ncg-cx-msg.them { align-self: flex-start; background: var(--ncg-color-bg-surface, #fff); border: 1px solid var(--ncg-color-border, #e2e2e4); }
.ncg-cx-msg-meta { font-size: 11px; opacity: 0.75; margin-bottom: 4px; }
.ncg-cx-msg-body { white-space: pre-wrap; word-wrap: break-word; }
.ncg-cx-listen { margin-top: 8px; background: none; border: none; font-size: 12px; font-weight: 700; color: inherit; opacity: 0.8; cursor: pointer; padding: 2px 0; }
.ncg-cx-msg.mine .ncg-cx-listen { color: #C8B9A8; }
.ncg-cx-compose { display: flex; flex-direction: column; gap: 8px; }
.ncg-cx-compose textarea { width: 100%; min-height: 80px; resize: vertical; border: 1px solid #ccc; border-radius: 8px; padding: 12px; font-size: 15px; font-family: inherit; box-sizing: border-box; }

/* Session banners */
.ncg-cx-banner { background: #f0ece1; border: 1px solid #e0d5bf; color: var(--ncg-color-heading, #23312C); border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.ncg-cx-banner.ended { background: var(--ncg-color-bg-surface, #f3f3f3); font-weight: 600; }
.ncg-cx-live { background: #1b3a2a; color: #fff; border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 700; }
.ncg-cx-typing { font-size: 13px; color: var(--ncg-color-muted, #888); font-style: italic; padding: 2px 4px; }
.ncg-cx-cal { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; }
.ncg-cx-cal a { color: #C89B7B; font-weight: 700; text-decoration: underline; margin: 0 4px; }

/* Session recap card */
.ncg-cx-recap { background: var(--ncg-color-bg-surface, #fff); border: 1px solid var(--ncg-color-border, #e0d5bf); border-left: 5px solid #2e8b57; border-radius: 10px; padding: 18px 20px; }
.ncg-cx-recap h3 { margin: 0 0 8px; font-family: 'Playfair Display', serif; color: var(--ncg-color-heading, #23312C); font-size: 1.15rem; }
.ncg-cx-recap-body { white-space: pre-wrap; line-height: 1.6; color: var(--ncg-color-body, #333); }
.ncg-cx-recap-at { margin-top: 8px; font-size: 12px; color: var(--ncg-color-muted, #888); }

/* Feedback poll */
.ncg-cx-feedback { background: var(--ncg-color-bg-surface, #fff); border: 1px solid var(--ncg-color-border, #e0d5bf); border-left: 5px solid #C89B7B; border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.ncg-cx-feedback.done { border-left-color: #2e8b57; color: var(--ncg-color-body, #1d3d2a); font-weight: 600; }
.ncg-cx-feedback h3 { margin: 0; font-family: 'Playfair Display', serif; color: var(--ncg-color-heading, #23312C); font-size: 1.15rem; }
.ncg-cx-rating { display: flex; gap: 8px; }
.ncg-cx-rate { width: 44px; height: 44px; border-radius: 8px; border: 2px solid var(--ncg-color-border, #ccc); background: var(--ncg-color-bg-paper, #fff); color: var(--ncg-color-body, #23312C); font-size: 17px; font-weight: 700; cursor: pointer; }
.ncg-cx-rate:hover { border-color: #C89B7B; }
.ncg-cx-rate.on { background: #23312C; color: #fff; border-color: #23312C; }
.ncg-cx-rate:focus-visible { outline: 3px solid #C89B7B; outline-offset: 2px; }
.ncg-cx-rate-word { margin: 0; font-weight: 700; color: var(--ncg-color-heading, #23312C); }
.ncg-cx-feedback textarea { width: 100%; min-height: 60px; resize: vertical; border: 1px solid #ccc; border-radius: 8px; padding: 10px; font-size: 15px; font-family: inherit; box-sizing: border-box; }
.ncg-cx-feedback .ncg-cx-btn { align-self: flex-start; }

/* Credits note */
.ncg-cx-credits { background: #f5f1e9; border: 1px solid #e0d5bf; border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--ncg-color-heading, #23312C); }

/* SLAT deliverable link */
.ncg-cx-deliverable { display: inline-block; background: #23312C; color: #fff; text-decoration: none; font-weight: 700; padding: 12px 20px; border-radius: 8px; }
.ncg-cx-deliverable:hover { background: #C89B7B; color: #23312C; }

/* Closed notice */
.ncg-cx-closed { background: var(--ncg-color-bg-surface, #f6f6f6); border: 1px dashed var(--ncg-color-border, #ccc); border-radius: 8px; padding: 16px 18px; color: var(--ncg-color-body, #555); font-size: 14px; text-align: center; }

/* Attachments */
.ncg-cx-att { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ncg-cx-att-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.05); color: inherit; border: 1px solid rgba(0,0,0,0.15); border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; text-decoration: none; word-break: break-all; }
.ncg-cx-att-chip:hover { border-color: #C89B7B; }
.ncg-cx-msg.mine .ncg-cx-att-chip { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); color: #fff; }

/* Attach row (compose) */
.ncg-cx-attach-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ncg-cx-attach-row .ncg-cx-btn { margin-left: auto; }
.ncg-cx-file-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ncg-color-body, #50575e); cursor: pointer; border: 1px dashed #b9bcc0; border-radius: 8px; padding: 8px 12px; }
.ncg-cx-file-btn:hover { border-color: #C89B7B; }
.ncg-cx-file-btn input { display: none; }
.ncg-cx-file-name { font-size: 13px; display: inline-flex; align-items: center; gap: 5px; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ncg-cx-file-x { background: none; border: none; color: #b32d2e; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
