/* GeneaFree — main stylesheet */

body {
  background-color: #f8f9fa;
}

/* Navbar */
.navbar-brand {
  font-weight: 600;
  letter-spacing: .3px;
}

/* Cards */
.card {
  border-radius: 10px;
}

.card-header {
  border-radius: 10px 10px 0 0 !important;
}

/* Footer */
.footer {
  background-color: #f8f9fa;
}

/* Tree visualization */
#viz-container {
  position: relative;
  cursor: grab;
}

#viz-container:active {
  cursor: grabbing;
}

.node-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  fill: #212529;
  pointer-events: none;
}

.node-year {
  font-size: 9px;
  fill: #6c757d;
  pointer-events: none;
}

/* Person photo in tree */
.node-photo {
  clip-path: circle(16px at 50% 50%);
}

/* Tooltip */
.tooltip {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

/* Stats charts */
.chart-container {
  position: relative;
}

/* Badge helpers */
.badge.bg-light {
  color: #212529 !important;
}

/* Tables */
.table th {
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #6c757d;
}

/* Progress bar thin */
.progress {
  border-radius: 10px;
}

/* Form labels */
.form-label {
  font-weight: 500;
  font-size: .9rem;
}

/* Alert shrink */
.alert {
  border-radius: 8px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: .875rem;
}

/* Viz toolbar */
.viz-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

/* Radial layout text */
.node--leaf text {
  font-size: 10px;
}

/* Dashed placeholder button */
.btn-dashed {
  border: 2px dashed #adb5bd;
  background: transparent;
}
.btn-dashed:hover {
  border-color: #6c757d;
  background: #f8f9fa;
}

/* Responsive table scroll hint */
@media (max-width: 576px) {
  .table-responsive::after {
    content: '';
    display: block;
  }
}

/* ── Tree context bar ───────────────────────────────────────────────────── */
.tree-context-bar {
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.tree-ctx-link {
  color: #6c757d !important;
  transition: color .15s;
}
.tree-ctx-link:hover,
.tree-ctx-link.active {
  color: #198754 !important;
  font-weight: 600;
}

/* ── Advanced search page ──────────────────────────────────────────────── */
.search-section-header {
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: .3rem .3rem 0 0;
  padding: .45rem .75rem;
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  cursor: pointer;
  user-select: none;
}
.search-section-header:hover { background: #e8e8e8; }
.search-section-body {
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 .3rem .3rem;
  padding: .6rem .75rem .4rem;
  background: #fff;
}
.search-results-table thead th {
  background: #f0f0f0;
  border-bottom: 2px solid #ccc;
  white-space: nowrap;
  font-size: .8rem;
  padding: .4rem .5rem;
  vertical-align: middle;
}
.search-results-table td {
  font-size: .82rem;
  padding: .35rem .5rem;
  vertical-align: top;
  border-color: #e8e8e8;
}
.search-results-table tbody tr:hover { background: #f5f9ff; }
.search-sort-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.search-sort-link:hover { text-decoration: underline; color: #0d6efd; }
