MediaWiki:Common.css: Difference between revisions

From KB Lexicon
No edit summary
No edit summary
Line 333: Line 333:
}
}


/* =========================
/* === CORE TREE LAYOUT === */
  FAMILY TREE (KBFT SYSTEM)
  ========================= */


.kbft-tree {
.kbft-tree {
  border: 1px solid #cdbfb2;
  background: #f8f4ee;
  padding: 28px 24px;
  margin: 20px 0;
  border-radius: 14px;
  text-align: center;
}
.kbft-title {
   text-align: center;
   text-align: center;
  font-weight: 700;
  font-size: 1.2em;
  margin-bottom: 28px;
  color: #4e4036;
}
}


/* GENERATIONS STACK VERTICALLY */
.kbft-generation {
.kbft-generation {
  display: block;
   margin: 20px 0;
  width: 100%;
  margin: 22px 0;
  position: relative;
}
 
.kbft-connector {
  width: 2px;
  height: 28px;
  background: #b8a79a;
   margin: 0 auto;
}
}


.kbft-row {
/* FOCAL ROW = TRUE GRID */
   display: flex;
.kbft-focal-row,
.kbft-desc-row {
   display: grid;
   justify-content: center;
   justify-content: center;
   align-items: flex-start;
   align-items: start;
   gap: 22px;
   gap: 24px;
  flex-wrap: wrap;
  width: 100%;
}
}


.kbft-card {
/* AUTO-COLUMN COUNT BASED ON CONTENT */
   width: 120px;
.kbft-focal-row {
  min-height: 56px;
   grid-auto-flow: column;
  padding: 8px 10px;
   grid-auto-columns: minmax(140px, auto);
  border: 1px solid #cab8aa;
   background: #fffdf9;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  text-align: center;
  box-sizing: border-box;
  font-size: 0.92em;
  line-height: 1.2;
}
 
.kbft-card a {
  text-decoration: none;
}
}


.kbft-years {
.kbft-desc-row {
   margin-top: 4px;
   grid-auto-flow: column;
   font-size: 0.74em;
   grid-auto-columns: minmax(140px, auto);
  color: #7a6b60;
}
}


.kbft-single {
/* EACH COLUMN */
  display: inline-flex;
.kbft-focal-col,
  align-items: center;
.kbft-branch-col {
  justify-content: center;
}
 
.kbft-couple {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
 
.kbft-marriage {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   align-items: center;
   align-items: center;
  justify-content: center;
  min-width: 40px;
  flex: 0 0 40px;
}
}


.kbft-marriage-year {
/* CARDS */
   font-size: 0.68em;
.kbft-card {
   color: #7a6b60;
   background: #f8f5f0;
   line-height: 1;
   border: 1px solid #c8b79f;
   margin-bottom: 4px;
   border-radius: 10px;
   white-space: nowrap;
  padding: 10px 14px;
   min-width: 120px;
   box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
}


.kbft-marriage-line {
/* FOCAL PERSON */
   width: 40px;
.kbft-focus-card {
  height: 2px;
   border: 2px solid #a88c5a;
  background: #bdaea0;
}
}


/* =========================
/* UNION META (Marriage, Affair, etc) */
  SIBLING GENERATION
.kbft-union-meta {
  ========================= */
   font-size: 12px;
 
   margin-top: 6px;
.kbft-siblings {
   margin-bottom: 6px;
   position: relative;
  color: #6b5a3a;
   width: 100%;
   padding-top: 24px;
}
}


.kbft-sibling-spine {
/* CONNECTOR LINE DOWN */
  position: absolute;
.kbft-child-down {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 72%;
  height: 2px;
  background: #bdaea0;
}
 
.kbft-sibling-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
}
 
.kbft-sibling-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 150px;
  flex: 0 1 auto;
}
 
.kbft-sibling-up {
   width: 2px;
   width: 2px;
   height: 16px;
   height: 20px;
   background: #b8a79a;
   background: #b8a98a;
   margin: 0 auto;
   margin: 6px 0;
}
}


/* =========================
/* CHILD ROW */
  FOCUS CARD
.kbft-children {
  ========================= */
 
.kbft-focus-card {
  border: 2px solid #a88f6a;
  background: #efe7d6;
}
 
/* =========================
  BRANCH GENERATION
  ========================= */
 
.kbft-branches-generation {
  margin-top: 12px;
}
 
.kbft-branch-row {
   display: flex;
   display: flex;
  justify-content: center;
   gap: 10px;
  align-items: flex-start;
   gap: 28px;
   flex-wrap: wrap;
   flex-wrap: wrap;
  width: 100%;
}
.kbft-branch-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 140px;
  max-width: 220px;
  gap: 6px;
}
.kbft-branch-top {
  min-height: 56px;
  display: flex;
  align-items: center;
   justify-content: center;
   justify-content: center;
}
}


.kbft-branch-spacer {
/* EMPTY META PLACEHOLDER (keeps rows aligned) */
  width: 120px;
.kbft-union-meta-empty {
  min-height: 56px;
   visibility: hidden;
   visibility: hidden;
}
   height: 14px;
 
.kbft-branch-drop {
  width: 2px;
   height: 16px;
  background: #b8a79a;
  margin: 0 auto;
}
 
.kbft-children {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  max-width: none;
  margin-top: 4px;
}
 
/* =========================
  RESPONSIVE
  ========================= */
 
@media (max-width: 768px) {
  .kbft-tree {
    padding: 18px 14px;
  }
 
  .kbft-row,
  .kbft-sibling-row,
  .kbft-branch-row {
    gap: 14px;
  }
 
  .kbft-card {
    width: 108px;
    font-size: 0.88em;
  }
 
  .kbft-marriage {
    min-width: 32px;
    flex-basis: 32px;
  }
 
  .kbft-marriage-line {
    width: 32px;
  }
 
  .kbft-sibling-unit,
  .kbft-branch-unit {
    min-width: 132px;
  }
 
  .kbft-children {
    flex-wrap: wrap;
  }
 
  .kbft-sibling-spine {
    width: 86%;
  }
 
  .kbft-branch-spacer {
    width: 108px;
  }
 
.kbft-child-down {
  width: 2px;
  height: 16px;
  background: #b8a79a;
  margin: 0 auto;
}
 
.kbft-branch-spacer {
  width: 120px;
  height: 20px;
}
}

Revision as of 14:22, 30 March 2026

/* Layout + float */
.infobox.infobox-character .infobox-table {
  width: 100%;
  max-width: 320px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #ddd;
  float: right;
  margin: 0 0 1em 1em;
  font-size: 0.95rem;
  line-height: 1.35;
}

/* Title row */
.infobox.infobox-character .infobox-title {
  background: linear-gradient(to right, #f5f5f7, #ece7f1);
  color: #111;
  font-weight: 700;
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

/* Image + caption */
.infobox.infobox-character .infobox-image { text-align: center; padding: 8px; border-bottom: 1px solid #eee; }
.infobox.infobox-character .infobox-image img { max-width: 100%; height: auto; border-radius: 6px; }
.infobox.infobox-character .infobox-caption { color: #666; font-size: 0.85em; margin-top: 4px; }

/* Rows */
.infobox.infobox-character .infobox-label {
  width: 42%;
  vertical-align: top;
  padding: 8px 10px;
  background: #fafafa;
  color: #333;
  border-top: 1px solid #eee;
  font-weight: 600;
}
.infobox.infobox-character .infobox-data {
  width: 58%;
  padding: 8px 10px;
  border-top: 1px solid #eee;
}

/* Hide empty rows using :has() */
.infobox.infobox-character tr:has(.infobox-data .val:empty) { display: none; }

/* Hide empty caption block */
.infobox.infobox-character .infobox-image:has(.infobox-caption:empty) .infobox-caption { display: none; }

/* Mobile: stack it */
@media (max-width: 700px) {
  .infobox.infobox-character .infobox-table { float: none; margin: 0 auto 1em; }
}

/* ===== UNIVERSAL INFOBOX STYLES ===== */

/* Wrapper floats box to the right */
.mw-parser-output .infobox {
  float: right;
  margin: 0 0 1em 1em;
  clear: right;
  max-width: 320px;
  font-size: 0.95rem;
  line-height: 1.35;
  background: #fff;
  border: 1px solid #ddd;
}

/* Table basics */
.mw-parser-output .infobox .infobox-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

/* Title row */
.mw-parser-output .infobox .infobox-title {
  background: linear-gradient(to right, #f7f5f5, #f1ece7);
  color: #111;
  font-weight: 700;
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  font-family: "Georgia", "Times New Roman", serif;
}

/* Image + caption */
.mw-parser-output .infobox .infobox-image {
  text-align: center;
  padding: 8px;
  border-bottom: 1px solid #eee;
}
.mw-parser-output .infobox .infobox-image img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.mw-parser-output .infobox .infobox-caption {
  color: #666;
  font-size: 0.85em;
  margin-top: 4px;
}

/* Quote (for character boxes) */
.mw-parser-output .infobox .infobox-quote {
  font-style: italic;
  color: #444;
  padding: 10px;
  border-bottom: 1px solid #eee;
  background: #faf9fb;
}

/* Label + data cells */
.mw-parser-output .infobox .infobox-label {
  width: 40%;
  vertical-align: top;
  padding: 8px 10px;
  background: #fafafa;
  color: #333;
  font-weight: 600;
}
.mw-parser-output .infobox .infobox-data {
  width: 60%;
  padding: 8px 10px;
}

/* Row dividers */
.mw-parser-output .infobox .infobox-table td,
.mw-parser-output .infobox .infobox-table th {
  border-bottom: 1px solid #ddd;
}
.mw-parser-output .infobox .infobox-table tr:last-child td,
.mw-parser-output .infobox .infobox-table tr:last-child th {
  border-bottom: none;
}

/* Hide empty rows gracefully */
.mw-parser-output .infobox tr:has(.infobox-data .val:empty) {
  display: none;
}
.mw-parser-output .infobox .infobox-image:has(.infobox-caption:empty) .infobox-caption {
  display: none;
}

/* Mobile responsiveness */
@media (max-width: 700px) {
  .mw-parser-output .infobox {
    float: none;
    margin: 0 auto 1em;
  }
}

/* ----------------------------- */
/*      INGREDIENT INFOBOX       */
/* ----------------------------- */

.ingredient-infobox {
  float: right;
  width: 320px;
  margin: 0 0 20px 25px;
  padding: 0;
  background: #f9f5ec; /* warm parchment */
  border: 1px solid #8b6f47; /* old gold-brown */
  box-shadow: 0 0 6px rgba(0,0,0,0.25);
  font-family: Georgia, "Times New Roman", serif;
}

.ingredient-title {
  background: #d8c8a5; /* darker parchment header */
  color: #3a2d1f;
  font-size: 1.25em;
  font-weight: bold;
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid #8b6f47;
}

.ingredient-image {
  text-align: center;
  padding: 10px;
}

.ingredient-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86em;
}

.ingredient-table th {
  width: 40%;
  text-align: left;
  background: #e9dfc9;
  padding: 6px 8px;
  border-bottom: 1px solid #c6b79b;
  color: #3a2d1f;
  font-weight: bold;
}

.ingredient-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #d7cbb4;
  color: #2f251a;
}

.ingredient-table tr:last-child td,
.ingredient-table tr:last-child th {
  border-bottom: none;
}

/* ---------- THEME VARIANTS FOR INGREDIENT BOXES ---------- */

/* Default (what you already have) */
.ingredient-infobox.ingredient-theme-default {
  border-color: #8b6f47;
}
.ingredient-infobox.ingredient-theme-default .ingredient-title {
  background: #d8c8a5;
  border-bottom-color: #8b6f47;
}

/* Healing / herbal: soft green */
.ingredient-infobox.ingredient-theme-healing,
.ingredient-infobox.ingredient-theme-botanical {
  border-color: #5c7e4b;
}
.ingredient-infobox.ingredient-theme-healing .ingredient-title,
.ingredient-infobox.ingredient-theme-botanical .ingredient-title {
  background: #cfdcc2;
  border-bottom-color: #5c7e4b;
}

/* Poisons / venoms: moody purple-green */
.ingredient-infobox.ingredient-theme-poison {
  border-color: #4b2f5c;
}
.ingredient-infobox.ingredient-theme-poison .ingredient-title {
  background: linear-gradient(to right, #3c234e, #234031);
  color: #f4eefc;
  border-bottom-color: #2b1a38;
}

/* Catalysts / amplifiers: rich gold */
.ingredient-infobox.ingredient-theme-catalyst {
  border-color: #b6862e;
}
.ingredient-infobox.ingredient-theme-catalyst .ingredient-title {
  background: linear-gradient(to right, #f1d48d, #e9b956);
  color: #402b0e;
  border-bottom-color: #b6862e;
}

/* Dark / necromantic: deep burgundy */
.ingredient-infobox.ingredient-theme-dark {
  border-color: #5b1f26;
}
.ingredient-infobox.ingredient-theme-dark .ingredient-title {
  background: #7b2e36;
  color: #f9f2f3;
  border-bottom-color: #5b1f26;
}

/* ---------- FAKE PARCHMENT CURLS ---------- */

.ingredient-infobox {
  position: relative;
  border-radius: 4px;
  overflow: visible; /* let curls peek out */
}

/* bottom-right curl */
.ingredient-infobox::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  right: -1px;
  bottom: -1px;
  background:
    radial-gradient(circle at 0 0, rgba(0,0,0,0.25) 0, rgba(0,0,0,0.25) 40%, transparent 41%) ,
    linear-gradient(135deg, #f9f5ec 0, #d8c8a5 60%, #c2aa80 100%);
  border-bottom-right-radius: 4px;
  box-shadow: -2px -2px 4px rgba(0,0,0,0.25);
  transform: translate(4px,4px) rotate(3deg);
  pointer-events: none;
}

/* top-left curl */
.ingredient-infobox::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: -1px;
  top: -1px;
  background:
    radial-gradient(circle at 100% 100%, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 40%, transparent 41%) ,
    linear-gradient(315deg, #f9f5ec 0, #d8c8a5 60%, #c2aa80 100%);
  border-top-left-radius: 4px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
  transform: translate(-3px,-3px) rotate(-2deg);
  pointer-events: none;
}

/* ---------- INGREDIENT CATEGORY HEADER BOX ---------- */

.ingredient-category-header {
  background: #f9f5ec;
  border: 1px solid #8b6f47;
  box-shadow: 0 0 6px rgba(0,0,0,0.25);
  padding: 12px 16px;
  margin: 0 0 1em 0;
  font-family: Georgia, "Times New Roman", serif;
  max-width: 720px;
}

/* Let it share the same theme colors as ingredient boxes */
.ingredient-category-header.ingredient-theme-healing,
.ingredient-category-header.ingredient-theme-botanical {
  border-color: #5c7e4b;
}

.ingredient-category-header.ingredient-theme-poison {
  border-color: #4b2f5c;
}

.ingredient-category-header.ingredient-theme-catalyst {
  border-color: #b6862e;
}

.ingredient-category-header.ingredient-theme-dark {
  border-color: #5b1f26;
}

/* === CORE TREE LAYOUT === */

.kbft-tree {
  text-align: center;
}

/* GENERATIONS STACK VERTICALLY */
.kbft-generation {
  margin: 20px 0;
}

/* FOCAL ROW = TRUE GRID */
.kbft-focal-row,
.kbft-desc-row {
  display: grid;
  justify-content: center;
  align-items: start;
  gap: 24px;
}

/* AUTO-COLUMN COUNT BASED ON CONTENT */
.kbft-focal-row {
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, auto);
}

.kbft-desc-row {
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, auto);
}

/* EACH COLUMN */
.kbft-focal-col,
.kbft-branch-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* CARDS */
.kbft-card {
  background: #f8f5f0;
  border: 1px solid #c8b79f;
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 120px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* FOCAL PERSON */
.kbft-focus-card {
  border: 2px solid #a88c5a;
}

/* UNION META (Marriage, Affair, etc) */
.kbft-union-meta {
  font-size: 12px;
  margin-top: 6px;
  margin-bottom: 6px;
  color: #6b5a3a;
}

/* CONNECTOR LINE DOWN */
.kbft-child-down {
  width: 2px;
  height: 20px;
  background: #b8a98a;
  margin: 6px 0;
}

/* CHILD ROW */
.kbft-children {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* EMPTY META PLACEHOLDER (keeps rows aligned) */
.kbft-union-meta-empty {
  visibility: hidden;
  height: 14px;
}