/* =========================
   TNG Modern Layer – FINAL FIXED
   ========================= */

:root{
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6c757d;
  --border: #e5e7eb;

  --primary: #0d6efd;
  --primary-soft: rgba(13,110,253,.10);
  --primary-soft-strong: rgba(13,110,253,.18);

  --radius: 10px;
}

/* ================= Base ================= */

body{
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a{
  color: var(--primary);
  text-decoration: none;
}
a:hover{
  text-decoration: underline;
}

body{ padding-top: 0 !important; padding-bottom: 0 !important; }
.container{ padding-top: 0 !important; }

/* ================= DETAIL TABLES ================= */

.is-person table,
.is-family table,
.is-media table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin-bottom: 2rem;
  border-radius: var(--radius);
}

.is-person td,
.is-family td,
.is-media td {
  padding: .6rem .75rem !important;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: .9rem;
  color: var(--text) !important;
}

/* ================= LINKER TABELLENBEREICH ================= */

.is-person td.fieldname,
.is-family td.fieldname,
.is-media td.fieldname,
.is-person td.fieldnameback,
.is-family td.fieldnameback,
.is-media td.fieldnameback {

  background: linear-gradient(
    90deg,
    var(--primary-soft-strong) 0%,
    var(--primary-soft) 100%
  ) !important;

  font-size: .78rem !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;

  color: #0f2a4a !important;   /* ← DUNKLE SCHRIFT */

  border-right: 1px solid var(--border) !important;
  width: 220px !important;
}

/* Harter Override gegen TNG */
.is-person .fieldname,
.is-family .fieldname,
.is-media .fieldname {
  color: #0f2a4a !important;
}

/* ================= EXTRASTREE ================= */

.is-extrastree table tr > td:nth-child(1),
.is-extrastree table tr > td:nth-child(3) {
  width: 50% !important;
  vertical-align: top;
}

.is-extrastree table tr > td:nth-child(2) {
  width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 0 !important;
}

.is-extrastree td.fieldname,
.is-extrastree td.fieldnameback {
  background: transparent !important;
  border-right: none !important;
  font-weight: normal !important;
}

/* ================= MAIN NAV ================= */

#tngnav {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: .5rem;
}

#tngnav a {
  color: var(--muted) !important;
  padding: .35rem .65rem !important;
  border-radius: 6px;
  font-weight: 500;
  font-size: .9rem;
}

#tngnav a.here {
  background: var(--primary-soft-strong) !important;
  color: #0f2a4a !important;
}

/* ================= SECOND NAV ================= */

.bar {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  padding: 3px 6px !important;
  white-space: nowrap;
}

.bar a {
  color: var(--muted) !important;
  padding: .25rem .45rem !important;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 500;
}

.bar a.here,
.lightlink3 {
  background: var(--primary-soft-strong) !important;
  color: #0f2a4a !important;
  padding: .25rem .5rem !important;
  border-radius: 6px;
  font-weight: 600 !important;
}

.bar a:hover {
  background: var(--primary-soft) !important;
  color: var(--text) !important;
}

/* ================= UTILITY ================= */

#pub-innermenu {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  padding: .35rem .6rem !important;
  font-size: .8rem;
}

#pub-innermenu,
#pub-innermenu a {
  color: var(--text) !important;
}

#pub-innermenu a:hover {
  background: var(--primary-soft) !important;
  color: var(--text) !important;
}

/* ================= TYPOGRAPHY ================= */

h1, .header{
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: .9rem;
  color: #111827;
}

.smallheader{
  font-size: .9rem;
  color: #6b7280;
}

h2, .subhead{
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: .6rem;
  color: #374151;
}

img{
  border-radius: 8px;
}
/* ================= FIX LIGHTLINK WHITE TEXT ================= */

/* überschreibt TNG lightlink-Varianten */
.is-person .lightlink,
.is-person .lightlink3,
.is-family .lightlink,
.is-family .lightlink3,
.is-media .lightlink,
.is-media .lightlink3,
.fieldnameback .lightlink,
.fieldnameback .lightlink3 {

  color: #0f2a4a !important;  /* dunkle Schrift */
}

/* ================= HISTOGRAM PROGRESSBARS ================= */

.table-histogram .bar-holder {
  background: rgba(13,110,253,.08);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.table-histogram .bar {
  background: linear-gradient(
    90deg,
    var(--primary-soft-strong) 0%,
    var(--primary) 100%
  ) !important;

  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}

/* Optional: leicht abgerundetes Ende */
.table-histogram .bar.rightound {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

/* =========================
   LITBox – Stable Modal Version
   ========================= */

/* Overlay */
.LB_overlay {
  position: fixed !important;
  inset: 0;
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 9998 !important;
}

/* Window */
.LB_window {
  position: fixed !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  box-shadow: 0 30px 80px rgba(0,0,0,.35) !important;
  overflow: hidden !important;
  z-index: 9999 !important;
}

/* Title bar */
.LB_closeAjaxWindow {
  background: linear-gradient(
    90deg,
    rgba(13,110,253,.18),
    rgba(13,110,253,.10)
  ) !important;

  padding: .75rem 1rem !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border: none !important;
}

/* Titeltext */
#LB_titletext {
  font-size: .95rem !important;
  font-weight: 600 !important;
  letter-spacing: .04em;
  color: #0f2a4a !important;
}

/* Close button */
#LB_close img {
  width: 16px;
  height: 16px;
  opacity: .6;
}

#LB_close img:hover {
  opacity: 1;
}

/* Content */
.LB_content {
  padding: 1.25rem !important;
  overflow-y: auto !important;
  max-height: calc(100vh - 160px);
  font-size: .9rem;
  color: #1f2937 !important;
  background: #ffffff !important;
}

/* Entfernt feste Höhen aus JS */
.LB_window,
.LB_content {
  height: auto !important;
}