/*
 * TOC table look, shared outside the homepage.
 * Copied from the Table of Contents pop-up rules in index.html (.toc-modal-content, .toc-table…).
 * index.html keeps its own copy (compass P0 page: not touched). Used by the dashboard's
 * Journey Cards progress table (js/journey-cards/dashboard-tab.js).
 */

/* The pop-up's box, as an inline panel */
.toc-panel {
  font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid #6699cc;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(102, 153, 204, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}
.toc-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(102, 153, 204, 0.5);
}
.toc-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #6699cc;
  font-family: inherit;
}
.toc-panel-body { padding: 12px 16px; }

.toc-table-wrapper { overflow-x: auto; }
.toc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: #fff;
}
.toc-table th,
.toc-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(102, 153, 204, 0.2);
}
.toc-table th {
  color: #6699cc;
  font-weight: 600;
  white-space: nowrap;
}
.toc-table td { opacity: 0.95; }
.toc-table tbody tr.toc-row-unlocked { cursor: pointer; }
.toc-table tbody tr.toc-row-unlocked:hover { background: rgba(102, 153, 204, 0.15); }
.toc-table tbody tr.toc-row-locked { opacity: 0.45; }

.toc-agreed-col { white-space: nowrap; text-align: center; }
.toc-agreed-pct { font-weight: 600; font-size: 0.85rem; }
.toc-agreed-empty { color: rgba(255, 255, 255, 0.2); text-align: center; }
.toc-level-cell { display: flex; align-items: center; gap: 6px; }
.toc-level-check { display: inline-flex; flex-shrink: 0; }
.toc-level-check .wn-progress-check-svg { width: 16px; height: 16px; vertical-align: middle; }
.toc-empty-msg {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  margin: 0;
  padding: 1rem;
}

/* The pop-up itself (same as the homepage TOC modal) */
.toc-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.toc-modal.show { opacity: 1; visibility: visible; }
.toc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.toc-modal .toc-panel {
  position: relative;
  max-width: 90vw;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.toc-modal .toc-panel-body { overflow-y: auto; flex: 1; min-height: 0; }
.toc-modal-close {
  background: none;
  border: none;
  color: #6699cc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.9;
}
.toc-modal-close:hover { opacity: 1; color: #fff; }
