/**
 * NOVARIC® Case Progress Centre — case-progress.css
 * Extends the existing design-tokens.css. Never overwrites global tokens.
 * Prefix: ncp- (case-progress component namespace)
 */

/* ── Body ─────────────────────────────────────────────────────────────────── */
.ncp-body {
  background: var(--nv-bg, #fff);
  color: var(--nv-text, #1A2433);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.ncp-hero {
  background: var(--nv-navy, #30384B);
  color: #fff;
  padding: 3rem 0 2.5rem;
  border-bottom: 4px solid var(--nv-cyan, #009AE4);
}
.ncp-hero__inner { max-width: 860px; }
.ncp-hero__eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--nv-cyan, #009AE4);
  margin: 0 0 .5rem;
}
.ncp-hero__h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700; color: #fff;
  margin: 0 0 .85rem; line-height: 1.18;
}
.ncp-hero__lead {
  font-size: 1.05rem; color: rgba(255,255,255,.85);
  max-width: 60ch; margin: 0 0 1.5rem; line-height: 1.65;
}
.ncp-hero__assurance {
  display: flex; flex-wrap: wrap; gap: .5rem .75rem;
}
.ncp-hero__assurance span {
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  padding: .2rem .65rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px; color: rgba(255,255,255,.85);
}

/* ── Main wrap ────────────────────────────────────────────────────────────── */
.ncp-main {
  padding: 2.5rem var(--nv-sp-2, 1.5rem);
  display: flex; flex-direction: column; gap: 2rem;
  max-width: 900px;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.ncp-card {
  background: #fff;
  border: 1px solid var(--nv-border, #D9DFE7);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.ncp-card--hidden { display: none !important; }
.ncp-card.is-visible { display: block; }

.ncp-card__title {
  font-size: 1.3rem; font-weight: 700;
  color: var(--nv-navy, #30384B); margin: 0 0 .5rem;
}
.ncp-card__lead {
  font-size: .95rem; color: var(--nv-text-muted, #4D5A6B);
  margin: 0 0 1.5rem; line-height: 1.6;
}

/* ── Audience grid ────────────────────────────────────────────────────────── */
.ncp-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
.ncp-aud-btn {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  padding: 1.5rem 1rem; text-align: center;
  background: var(--nv-surface, #F4F6F8);
  border: 2px solid var(--nv-border, #D9DFE7);
  border-radius: 8px; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  font-family: inherit;
}
.ncp-aud-btn:hover {
  border-color: var(--nv-cyan, #009AE4);
  background: #EBF7FF;
}
.ncp-aud-btn:focus-visible {
  outline: 3px solid var(--nv-focus, #0072A9); outline-offset: 2px;
}
.ncp-aud-btn[aria-pressed="true"] {
  border-color: var(--nv-cyan, #009AE4);
  background: #D6EFFC;
}
.ncp-aud-btn__icon { color: var(--nv-action, #0072A9); }
.ncp-aud-btn__label {
  font-size: 1rem; font-weight: 700;
  color: var(--nv-navy, #30384B);
}
.ncp-aud-btn__desc {
  font-size: .78rem; color: var(--nv-text-muted, #4D5A6B); line-height: 1.5;
}

/* ── Form fields ──────────────────────────────────────────────────────────── */
.ncp-field { margin-bottom: 1.25rem; }
.ncp-label {
  display: block; font-size: .875rem; font-weight: 600;
  color: var(--nv-navy, #30384B); margin-bottom: .35rem;
}
.ncp-label__hint {
  display: block; font-size: .78rem; font-weight: 400;
  color: var(--nv-text-muted, #4D5A6B); margin-top: .2rem;
}
.ncp-input {
  width: 100%; max-width: 480px;
  padding: .65rem .9rem;
  border: 1.5px solid var(--nv-border, #D9DFE7);
  border-radius: 5px; font-size: 1rem; font-family: inherit;
  background: #fff; color: var(--nv-text, #1A2433);
  transition: border-color .12s, box-shadow .12s;
}
.ncp-input:focus {
  outline: none;
  border-color: var(--nv-action, #0072A9);
  box-shadow: 0 0 0 3px rgba(0,114,169,.18);
}
.ncp-input[aria-invalid="true"] {
  border-color: #C62828;
  box-shadow: 0 0 0 3px rgba(198,40,40,.15);
}
.ncp-input--otp {
  font-size: 1.5rem; letter-spacing: .35em; text-align: center;
  max-width: 200px; font-variant-numeric: tabular-nums;
}
.ncp-field__error {
  font-size: .82rem; color: #C62828;
  margin-top: .35rem; display: flex; align-items: center; gap: .3rem;
}
.ncp-field__error::before { content: "⚠ "; }

/* ── Status banner ────────────────────────────────────────────────────────── */
.ncp-status {
  padding: .75rem 1rem;
  border-radius: 5px; font-size: .9rem;
  margin-bottom: 1rem;
}
.ncp-status--error { background: #FDECEA; color: #B71C1C; border-left: 4px solid #C62828; }
.ncp-status--success { background: #E8F5E9; color: #1B5E20; border-left: 4px solid #388E3C; }
.ncp-status--info { background: #E3F2FD; color: #0D47A1; border-left: 4px solid #1976D2; }
.ncp-status--warning { background: #FFF8E1; color: #E65100; border-left: 4px solid #F57C00; }

/* ── Actions row ──────────────────────────────────────────────────────────── */
.ncp-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.ncp-form__note {
  font-size: .8rem; color: var(--nv-text-muted, #4D5A6B);
  margin-top: 1rem; line-height: 1.6;
}
.ncp-submit-btn { min-width: 200px; }

/* ── Illustrative example ─────────────────────────────────────────────────── */
.ncp-example {
  background: var(--nv-surface, #F4F6F8);
  border: 1px solid var(--nv-border, #D9DFE7);
  border-radius: 8px; padding: 1.5rem 2rem;
}
.ncp-example__label {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--nv-action, #0072A9);
  margin: 0 0 .5rem;
}
.ncp-example__title {
  font-size: 1.1rem; font-weight: 700;
  color: var(--nv-navy, #30384B); margin: 0 0 1.25rem;
}

/* ── Dashboard preview ────────────────────────────────────────────────────── */
.ncp-dashboard-preview {
  background: #fff;
  border: 1px solid var(--nv-border, #D9DFE7);
  border-radius: 8px; padding: 1.5rem;
}
.ncp-dash-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 1rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.ncp-dash-ref {
  font-family: ui-monospace, monospace; font-size: .87rem;
  font-weight: 700; color: var(--nv-navy, #30384B); margin: 0 0 .2rem;
}
.ncp-dash-service {
  font-size: .82rem; color: var(--nv-text-muted, #4D5A6B); margin: 0;
}

/* Status badge */
.ncp-status-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .8rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.ncp-status-badge::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.ncp-status-badge--received { background: #E8F5E9; color: #2E7D32; }
.ncp-status-badge--received::before { background: #4CAF50; }
.ncp-status-badge--inprogress { background: #E3F2FD; color: #1565C0; }
.ncp-status-badge--inprogress::before { background: #1976D2; }
.ncp-status-badge--inforeq { background: #FFF8E1; color: #E65100; }
.ncp-status-badge--inforeq::before { background: #FF9800; }
.ncp-status-badge--thirdparty { background: #F3E5F5; color: #6A1B9A; }
.ncp-status-badge--thirdparty::before { background: #9C27B0; }
.ncp-status-badge--onhold { background: #EEEEEE; color: #424242; }
.ncp-status-badge--onhold::before { background: #9E9E9E; }
.ncp-status-badge--completed { background: #E8EAF6; color: #283593; }
.ncp-status-badge--completed::before { background: #3F51B5; }
.ncp-status-badge--closed { background: #EFEBE9; color: #4E342E; }
.ncp-status-badge--closed::before { background: #795548; }

/* ── Timeline ─────────────────────────────────────────────────────────────── */
.ncp-timeline {
  position: relative; padding-left: 2rem;
  margin-bottom: 1.5rem;
}
.ncp-timeline::before {
  content: ''; position: absolute;
  left: .5rem; top: .6rem; bottom: .6rem;
  width: 2px; background: var(--nv-border, #D9DFE7);
}
.ncp-timeline__item {
  position: relative; padding: .5rem 0 .5rem .75rem;
  display: flex; align-items: flex-start; gap: .75rem;
}
.ncp-timeline__marker {
  position: absolute; left: -1.5rem; top: .65rem;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--nv-border, #D9DFE7);
  background: #fff; flex-shrink: 0;
}
.ncp-timeline__item--done .ncp-timeline__marker {
  background: var(--nv-action, #0072A9);
  border-color: var(--nv-action, #0072A9);
}
.ncp-timeline__item--current .ncp-timeline__marker {
  background: var(--nv-cyan, #009AE4);
  border-color: var(--nv-cyan, #009AE4);
  box-shadow: 0 0 0 3px rgba(0,154,228,.25);
}
.ncp-timeline__content { flex: 1; }
.ncp-timeline__content strong { display: block; font-size: .9rem; color: var(--nv-navy, #30384B); }
.ncp-timeline__content span { font-size: .78rem; color: var(--nv-text-muted, #4D5A6B); }
.ncp-timeline__item--pending .ncp-timeline__content strong,
.ncp-timeline__item--pending .ncp-timeline__content span {
  color: var(--nv-text-muted, #4D5A6B);
}

/* ── Dashboard metadata ───────────────────────────────────────────────────── */
.ncp-dash-meta {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem; margin-bottom: 1rem;
}
.ncp-meta-label {
  display: block; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--nv-text-muted, #4D5A6B); margin-bottom: .2rem;
}
.ncp-meta-value { font-size: .9rem; color: var(--nv-navy, #30384B); font-weight: 500; }
.ncp-dash-disclaimer {
  font-size: .78rem; color: var(--nv-text-muted, #4D5A6B);
  border-top: 1px solid var(--nv-border, #D9DFE7); padding-top: .75rem; margin: .75rem 0 0;
  line-height: 1.6;
}

/* ── Notices ──────────────────────────────────────────────────────────────── */
.ncp-notice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ncp-notice {
  background: var(--nv-surface, #F4F6F8);
  border: 1px solid var(--nv-border, #D9DFE7);
  border-radius: 6px; padding: 1.25rem 1.5rem;
}
.ncp-notice--warning {
  border-left: 4px solid #F57C00;
  background: #FFF8E1;
}
.ncp-notice__title {
  font-size: .95rem; font-weight: 700;
  color: var(--nv-navy, #30384B); margin: 0 0 .5rem;
}
.ncp-notice p { font-size: .87rem; color: var(--nv-text-muted, #4D5A6B); margin: 0; line-height: 1.6; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ncp-audience-grid { grid-template-columns: 1fr 1fr; }
  .ncp-notice-row { grid-template-columns: 1fr; }
  .ncp-card { padding: 1.25rem; }
  .ncp-dash-header { flex-direction: column; }
  .ncp-input { max-width: 100%; }
  .ncp-input--otp { max-width: 160px; }
}
@media (max-width: 400px) {
  .ncp-audience-grid { grid-template-columns: 1fr; }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ncp-aud-btn, .ncp-input { transition: none; }
}

/* ── Print ────────────────────────────────────────────────────────────────── */
@media print {
  .ncp-hero { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .ncp-aud-btn, .ncp-card--hidden { display: none; }
  .ncp-dashboard-preview { border: 1px solid #000; }
}
