/* ============================================
   narratorChainIsnad.css — সনদ, বিস্তারিত তথ্য, ইসনাদ তুলনা
   Default site theme (light)
   ============================================ */

/* ── Modal Overlay & Container ── */
.nc-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--scrim-bg); z-index: 10000;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .3s ease;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.nc-modal-overlay.nc-active { opacity: 1; }

.nc-modal {
  width: 100%; max-width: 520px; height: 92vh;
  background: var(--color-surface); color: var(--color-on-surface);
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  box-shadow: var(--sheet-shadow);
}
.nc-modal-overlay.nc-active .nc-modal { transform: translateY(0); }

/* ── Header ── */
.nc-modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--color-surface);
  border-bottom: 1px solid var(--color-outline);
  flex-shrink: 0;
}
.nc-back-btn {
  background: none; border: none; color: var(--color-accent-indigo);
  cursor: pointer; padding: 4px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}
.nc-back-btn:hover { background: rgba(92,107,192,0.08); }
.nc-modal-title { font-size: var(--text-lg); font-weight: 600; color: #333; }

/* ── Body ── */
.nc-modal-body {
  flex: 1; overflow-y: auto; padding: 16px;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface-container);
  scrollbar-width: thin; scrollbar-color: #c4cad6 transparent;
}
.nc-modal-body::-webkit-scrollbar { width: 4px; }
.nc-modal-body::-webkit-scrollbar-thumb { background: #c4cad6; border-radius: 2px; }

/* ── Loading & Error ── */
.nc-loading { display: flex; justify-content: center; padding: 60px 0; }
.nc-spinner {
  width: 36px; height: 36px; border: 3px solid var(--badge-border);
  border-top-color: #5c6bc0; border-radius: var(--radius-full);
  animation: ncSpin .8s linear infinite;
}
@keyframes ncSpin { to { transform: rotate(360deg); } }
.nc-error { text-align: center; color: var(--color-error); padding: 40px 20px; font-size: var(--text-14); }

/* ════════════════════════════════════════════
   NARRATOR CHAIN — Card List
   ════════════════════════════════════════════ */
.nc-chain-list { display: flex; flex-direction: column; gap: 14px; }

.nc-narrator-card {
  background: var(--color-surface); border-radius: 14px;
  padding: 16px; cursor: pointer;
  transition: background .2s, box-shadow .2s;
  border: 1px solid var(--color-outline);
  box-shadow: var(--elevation-2);
}
.nc-narrator-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.nc-narrator-card:active { background: #f8f9ff; }

.nc-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 8px;
}
.nc-narrator-name { font-size: var(--text-lg); font-weight: 700; color: #333; margin: 0; line-height: 1.3; }
.nc-rank-badge {
  font-size: var(--text-xs); color: var(--color-accent-indigo); background: var(--badge-bg);
  padding: 2px 8px; border-radius: 10px; white-space: nowrap;
  font-weight: 600;
}

.nc-narrator-info { font-size: var(--text-sm); color: #666; line-height: var(--lh-content); margin-bottom: 12px; }

/* ── Bar Chart ── */
.nc-bar-chart {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 12px; height: 110px; padding-top: 8px;
}
.nc-bar-col {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; flex: 1; height: 100%;
}
.nc-bar-val { font-size: var(--text-xs); color: var(--color-accent-indigo); font-weight: 600; margin-bottom: 4px; }
.nc-bar {
  width: 26px; background: linear-gradient(180deg, #7986cb, #5c6bc0);
  border-radius: 4px 4px 0 0;
  min-height: 4px; transition: height .4s ease;
}
.nc-bar-label { font-size: var(--text-xs); color: #888; margin-top: 6px; font-weight: 500; }

/* ════════════════════════════════════════════
   SCHOLAR DETAILS
   ════════════════════════════════════════════ */
.nc-scholar-detail { display: flex; flex-direction: column; gap: 12px; }

.nc-detail-header {
  background: var(--color-surface); border-radius: 14px; padding: 20px;
  border: 1px solid var(--color-outline);
  box-shadow: var(--elevation-2);
}
.nc-detail-name { font-size: var(--text-xl); font-weight: 700; color: #333; margin: 0 0 4px; }
.nc-detail-arabic {
  font-size: var(--text-base); color: #888; direction: rtl; margin-bottom: 4px;
  font-family: var(--font-arabic, 'Scheherazade New', serif);
}
.nc-detail-rank {
  display: inline-block; font-size: var(--text-sm); color: var(--color-accent-indigo);
  background: var(--badge-bg); padding: 3px 10px; border-radius: var(--radius-md);
  margin-top: 6px; font-weight: 600;
}

/* ── Sections ── */
.nc-section {
  background: var(--color-surface); border-radius: var(--radius-md);
  padding: 14px 16px; border: 1px solid var(--color-outline);
}
.nc-section-header {
  font-size: var(--text-14); color: var(--color-accent-indigo); font-weight: 600;
  margin-bottom: 8px;
}
.nc-section-text { margin: 0; font-size: var(--text-14); color: var(--color-on-surface); line-height: var(--lh-content); }

.nc-simple-section { display: flex; flex-direction: column; gap: 2px; }
.nc-section-label { font-size: var(--text-root); color: var(--color-accent-indigo); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.nc-section-value { font-size: var(--text-14); color: var(--color-on-surface); }

/* ── Subsections (for Family) ── */
.nc-subsection { margin-top: 10px; }
.nc-subsection:first-child { margin-top: 4px; }
.nc-subsection-label {
  font-size: var(--text-root); color: #888; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
  margin-bottom: 6px;
}

/* ── People List (clickable chips for Teachers/Students/Children/Spouses) ── */
.nc-people-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.nc-person-chip {
  display: inline-block; font-size: var(--text-sm); padding: 4px 10px;
  border-radius: var(--radius-lg); line-height: 1.4;
  transition: background .15s, color .15s;
}
.nc-chip-text {
  background: #f0f2f5; color: #555; border: 1px solid var(--color-outline);
}
.nc-chip-link {
  background: var(--badge-bg); color: #3f51b5; border: 1px solid var(--badge-border);
  cursor: pointer; text-decoration: none;
}
.nc-chip-link:hover {
  background: var(--color-accent-indigo); color: #fff; border-color: var(--color-accent-indigo);
}
.nc-empty { font-size: var(--text-sm); color: #aaa; font-style: italic; }

/* ── Birth/Death Row ── */
.nc-birth-death-row { display: flex; gap: 10px; }
.nc-bd-card {
  flex: 1; background: var(--color-surface); border-radius: var(--radius-md);
  padding: 14px; border: 1px solid var(--color-outline);
}
.nc-bd-label {
  font-size: var(--text-sm); color: var(--color-accent-indigo); font-weight: 600; margin-bottom: 6px;
}
.nc-bd-date { font-size: var(--text-14); color: #333; margin-bottom: 2px; }
.nc-bd-city { font-size: var(--text-sm); color: #888; }
.nc-bd-how { font-size: var(--text-root); color: #e65100; margin-top: 4px; }

/* ════════════════════════════════════════════
   COMPARE ISNAD — vis-network graph
   ════════════════════════════════════════════ */
#nc-vis-graph {
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
}

/* ── Analysis Part Buttons (in hadith footer) ── */
.nc-chain-btn, .nc-isnad-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px; min-width: 28px; height: 30px; padding: 0 8px;
  border: 1px solid var(--badge-border); border-radius: 15px;
  font-family: var(--font-bn); font-size: var(--text-sm);
  font-weight: 600; color: var(--color-accent-indigo);
  background: transparent; cursor: pointer;
  line-height: 1; transition: all .2s;
  text-decoration: none;
}
.nc-chain-btn:hover, .nc-isnad-btn:hover {
  background: rgba(92,107,192,0.08);
  border-color: var(--color-accent-indigo);
}
.nc-chain-btn svg, .nc-isnad-btn svg {
  width: 16px; height: 16px; fill: currentColor; flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .nc-modal { max-width: 100%; height: 95vh; border-radius: 16px 16px 0 0; }
  .nc-bar-chart { height: 90px; gap: 8px; }
  .nc-bar { width: 22px; }
  .nc-birth-death-row { flex-direction: column; }
}
