/* ==========================================================
   DDGLC CUSTOM CSS
   Greek Loanwords in Coptic – Online Edition

   TABLE OF CONTENTS
   ----------------------------------------------------------
   01. Root Variables (Project Colors)
   02. Globals
   03. Bootstrap Tooltip
   04. Header
   05. Searchbar
   06. Keyboard
   07. Main Section
   08. Index Content
   09. Filter Sidebar
   10. Results – Resbar
   11. Results – Entry Cards
   12. Entry Typography
   13. Lexical Meanings
   14. Pagination
   15. Highlighting
   16. Alphabet Navigation
   17. FOOTER – fixed bottom
   ========================================================== */


/* ==========================================================
   01. ROOT VARIABLES (PROJECT COLORS)
   ========================================================== */

:root {
  --ddglc-blue: #0A2A60;
  --ddglc-blue-dark: #092050;
  --ddglc-light-bg: #F9F9FB;
  --ddglc-search-bg: #EBEEF2;
  --ddglc-border-soft: rgba(0, 0, 0, 0.06);
  --ddglc-border-line: rgba(0, 0, 0, 0.08);
  --ddglc-text-muted: rgba(0, 0, 0, 0.55);
  --ddglc-highlight: rgba(10, 42, 96, 0.12);
  --ddglc-highlight-filter: #D3D1E1;
  /* Sticky Offsets */
  --ddglc-header-h: 100px;     /* entspricht .ddglc-header */
  --ddglc-searchbar-h: 120px;  /* ggf. feinjustieren */
  --ddglc-sticky-gap: -4px;
  --ddglc-resbar-top: calc(
    var(--ddglc-header-h) +
    var(--ddglc-searchbar-h) +
    var(--ddglc-sticky-gap)
  );
  --ddglc-footer-h: 118px; 
  
}


/* ==========================================================
   02. GLOBALS
   ========================================================== */

body {
  padding-top: 0;
  margin: 0;
}


/* ==========================================================
   03. BOOTSTRAP TOOLTIP
   ========================================================== */

.tooltip {
  --bs-tooltip-bg: var(--ddglc-blue);
  --bs-tooltip-color: #ffffff;
  --bs-tooltip-opacity: 1;
  --bs-tooltip-padding-x: 8px;
  --bs-tooltip-padding-y: 4px;
  --bs-tooltip-font-size: 0.8rem;
  --bs-tooltip-border-radius: 4px;
}

.tooltip .tooltip-arrow::before {
  border-color: var(--ddglc-blue) !important;
}


/* ==========================================================
   04. HEADER
   ========================================================== */

.ddglc-header {
  background-color: var(--ddglc-blue);
  height: 100px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
}


/* ==========================================================
   05. SEARCHBAR
   ========================================================== */

.searchbar {
  position: fixed;
  background-color: var(--ddglc-search-bg);
  padding: 15px 10px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  z-index: 9000;
  top: var(--ddglc-header-h);
}

.search-input {
  border-radius: 5px;
  padding: 8px 12px;
  width: 200px;
  max-width: 300px;
  border: 1px solid #ccc;
}

.search-btn {
  border-radius: 5px;
  background-color: var(--ddglc-blue);
  color: white;
  border: none;
  padding: 8px;
  height: 40px;
  transition: 0.2s;
}

.search-btn:hover {
  background-color: var(--ddglc-blue-dark);
}

/* Tastatur-Icon: vertikal mittig, kein Bootstrap-Button-Padding */
.keyboard-btn {
  background: none;
  border: none;
  color: #B2B2B2;
  padding: 0;
  height: 40px;
  width: 40px;
  font-size: 2.2rem;        /* ggf. 2.6rem, wenn größer gewünscht */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
}

.keyboard-btn:hover {
  color: var(--ddglc-blue-dark);
}

/* Bootstrap .btn kann padding reinbringen –  sicherheitshalber überschreiben*/
button.keyboard-btn.btn {
  padding: 0 !important;
}

.search-link {
  color: var(--ddglc-blue);
  text-decoration: none;
  font-weight: 500;
}

.search-link:hover {
  text-decoration: underline;
}


/* ==========================================================
   06. KEYBOARD
   ========================================================== */

#keyboard {
  display: none;
  position: absolute;
  background: #ffffff;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 11000;
}

/* Keyboard – Language Switch */
#lang-switch {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

#lang-switch button {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.75);
  cursor: pointer;
  transition: 0.15s;
}

#lang-switch button:hover {
  background: rgba(0,0,0,0.07);
}

#lang-switch button.selected {
  background: var(--ddglc-blue);
  border-color: var(--ddglc-blue);
  color: #fff;
}

/* Keyboard – Rows/Keys (für dein eigenes Markup) */
#rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#rows .kb-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

/* Tasten: falls JS <button class="key"> erzeugt */
#keyboard .key {
  width: 42px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.04);
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(0,0,0,0.78);
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: 0.12s;
}

#keyboard .key:hover {
  box-shadow: 0 0 0 2px rgba(10,42,96,0.25);
  border-color: rgba(10,42,96,0.45);
}

/* Sondertasten (falls du solche Klassen nutzt) */
#keyboard .key.special { width: 90px; }
#keyboard .key.space   { width: 240px; }


/* ==========================================================
   07. MAIN SECTION
   ========================================================== */

.main-section{
  background-color: var(--ddglc-light-bg);
  padding-top: calc(var(--ddglc-header-h) + var(--ddglc-searchbar-h) + 16px);
  padding-bottom: calc(var(--ddglc-footer-h) + 24px);
  min-height: 100vh;
}

/* Logos auf der Startseite */
.logo-row {
  gap: 16px;            /* sauberer Abstand statt nur me-4 */
  flex-wrap: wrap;      /* auf kleinen Screens umbrechen */
}

.main-logo {
  max-height: 80px;     /* wie vorher “gut” */
  width: auto;
  height: auto;
  max-width: 100%;
  display: block;
}


/* ==========================================================
   08. INDEX CONTENT
   ========================================================== */

.content-box {
  background: #ffffff;
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.main-heading {
  font-size: 1.8rem;
  color: var(--ddglc-blue);
  font-weight: 600;
}

/* ==========================================================
   09. FILTER SIDEBAR (UI only, no logic yet)
   ========================================================== */

#main-filter {
  position: sticky;
  top: calc(var(--ddglc-header-h) + var(--ddglc-searchbar-h) + 16px);
  align-self: flex-start;
}

#main-filter .filter-card{
  position: sticky;
  top: var(--ddglc-sticky-top, 160px);
  max-height: calc(100vh - var(--ddglc-sticky-top, 160px) - var(--ddglc-footer-h, 64px) - 12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#main-filter .filter-head,
#main-filter .filter-chips{
  flex: 0 0 auto;
}

#main-filter .filter-form{
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: calc(var(--ddglc-footer-h, 64px) + 8px); /* wichtig: letzter Eintrag bleibt sichtbar */
  scrollbar-width: none; /* Firefox */
}

#main-filter .filter-form::-webkit-scrollbar{
  width: 0;
  height: 0;
}

.filter-title {
  font-weight: 700;
  color: var(--ddglc-blue);
  letter-spacing: 0.2px;
}

.filter-clear {
  color: var(--ddglc-blue);
  text-decoration: none;
}

.filter-clear:hover {
  text-decoration: underline;
}

/* Chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(10, 42, 96, 0.08);
  border: 1px solid rgba(10, 42, 96, 0.18);
  color: rgba(0,0,0,0.75);
  white-space: nowrap;
}

.chip-x {
  border: none;
  background: transparent;
  color: rgba(0,0,0,0.55);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.chip-x:hover {
  color: var(--ddglc-blue);
}

/* Accordion (compact) */
.filter-acc .accordion-button {
  padding: 8px 10px;
  font-size: 0.9rem;
}

.filter-acc .accordion-body {
  padding: 10px 10px;
}

.filter-group + .filter-group {
  margin-top: 12px;
}

.filter-label {
  font-size: 0.78rem;
  color: rgba(0,0,0,0.55);
  margin-bottom: 6px;
}

.filter-options {
  display: grid;
  gap: 6px;
}

.filter-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(0,0,0,0.80);
}

.filter-opt input[type="checkbox"] {
  transform: translateY(-0.5px);
}






/* ==========================================================
   10. RESULTS – RESBAR
   ========================================================== */

.resbar {
  position: sticky;
  top: var(--ddglc-resbar-top);
  z-index: 8500;
  isolation: isolate;

  background: #ffffff;
  background-image: linear-gradient(to bottom, var(--ddglc-search-bg) 0px, #ffffff 14px);
  background-repeat: no-repeat;
  padding: 8px 14px;          /* kompakter */
  border-radius: 10px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: 1px solid var(--ddglc-border-soft);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  margin-bottom: 14px;
}

/* Abdichtung zwischen Searchbar und Resbar */
.resbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;        /* entspricht verkürztem Abstand */
  height: 10px;
  background: var(--ddglc-light-bg);   /* NICHT search-bg */
  z-index: -1;
}

.resbar-top {
  border-bottom: 1px solid var(--ddglc-border-line);
  padding-bottom: 5px;
  margin-bottom: 4px;
}

.resbar-dictline {
  font-size: 0.8rem;
  color: var(--ddglc-text-muted);
  letter-spacing: 0.06em;
  font-variant-caps: small-caps;
  text-transform: lowercase;
}

.resbar-dict-right {
  text-align: right;
}

/* per page als Links (10 | 20 | 50) */
.resbar-right {
  white-space: nowrap;
}

.resbar-mid .btn.btn-sm {
  padding: 0px 4px;
  font-size: 0.75rem;
  min-width: 22px;
}

.perpage-label,.perpage-link,
.perpage-sep {
  font-size: 0.75rem;
  color: rgba(0,0,0,0.65);
}

.perpage-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
}

.perpage-link {
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--ddglc-blue);
  padding: 1px 4px;
  border-radius: 4px;
}

.perpage-link:hover {
  background: rgba(10, 42, 96, 0.10);
  text-decoration: none;
}

.perpage-link.active {
  background: var(--ddglc-blue);
  color: #ffffff;
}

.perpage-sep {
  color: rgba(0,0,0,0.35);
  font-size: 0.75rem;
  user-select: none;
}

/* Ultra-kompakte Pagination Buttons */
.resbar-mid .btn.btn-sm {
  padding: 1px 5px;
  font-size: 0.8rem;
  line-height: 1.1;
  min-width: 26px;
  border-radius: 5px;
}


/* ==========================================================
   11. RESULTS – ENTRY CARDS
   ========================================================== */

.entry-block {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--ddglc-border-soft);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: box-shadow 0.18s ease;
}

.entry-block:hover {
  background: #fcfcfc;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.entry-header-main {
  min-width: 0;
  flex: 1 1 auto;
}

.entry-header-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.cl-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
   line-height: 1.45;
  gap: 12px;
}

.cl-row-main {
  min-width: 0;
  flex: 1 1 auto;
}

.cl-row-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.entry-header-meta,
.cl-row-meta {
  font-size: 0.95em;
  align-items: center;
  gap: 0.4rem;
}

/* Copy Citation btn*/
/*.copy-cite-btn {
  border: none;
  background: transparent;
  color: var(--ddglc-blue);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  vertical-align: middle;
}*/

.copy-cite-btn {
  border: none;
  background: transparent;
  color: #8a8a8a;
  font-size: 0.95rem;
  vertical-align: -0.05em;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.12s ease;
}

.copy-cite-btn:hover {
  color: var(--ddglc-blue);
  transform: translateY(-1px);
  background: rgba(0,0,0,0.04);
  border-radius: 4px;
}

.copy-cite-btn:active {
  transform: translateY(0);
}

.cl-status-bullet {
  display: inline-block;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  vertical-align: middle;
  cursor: help;
  border: 1px solid rgba(0,0,0,0.10);
}

.cl-status-bullet.status-0,
.cl-status-bullet.status-1 {
  background: #9a9a9a;
}

.cl-status-bullet.status-2 {
  background: #9b8665;
}

.cl-status-bullet.status-3 {
  background: #47772e;
}

/* ==========================================================
   12. ENTRY TYPOGRAPHY
   ========================================================== */

.cl-hiera {
  color: var(--ddglc-text-muted);
}

.cl-ufc {
  font-size: 0.65em;
  color: rgba(0,0,0,0.6);
}

/*.cl-id,
.grl-id {
  font-size: 0.7rem;
  color: var(--ddglc-blue);
  margin-left: 0;
  text-align: right;
}*/

.cl-id,
.grl-id {
  font-size: 0.68rem;
  color: #7a7a7a;
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
}

.cl-dialect {
  font-size: 0.76rem;
  font-variant: small-caps;
  letter-spacing: 0.07em;
  color: #7a7a7a;
}

.cl-dialect::before {
  content: "· ";
  color: #b5b5b5;
}

.cl-hapax {
  color: var(--ddglc-blue);
}

.cl-hypo {
  color: rgba(0,0,0,0.75);
}

.cl-lem-graeco strong {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cl-lem-post::before {
  content: " ";
}

.cl-pos,
.cl-pos-caus {
  font-size: 0.92em;
  color: #4a4a4a;
}

.cl-pos {
  margin-left: 0.45rem;
}

.cl-lexref {
  font-size: 0.88em;
  color: #6a6a6a;
  letter-spacing: 0.02em;
  opacity: 0.9;
}




/* ==========================================================
   13. LEXICAL MEANINGS
   ========================================================== */

.lm-line {
  font-size: 0.95rem;
  line-height: 1.4;
}

.lm-line em {
  font-style: italic;
}


/* ==========================================================
   14. PAGINATION
   ========================================================== */

.resbar-mid .btn-outline-secondary {
  --bs-btn-color: var(--ddglc-blue);
  --bs-btn-border-color: rgba(10,42,96,0.55);
  --bs-btn-hover-bg: var(--ddglc-blue);
  --bs-btn-hover-color: #ffffff;
}


/* ==========================================================
   15. HIGHLIGHTING
   ========================================================== */

mark.hl {
  background: var(--ddglc-highlight);
  padding: 0 2px;
  border-radius: 3px;
}

mark.hl-filter {
  background: var(--ddglc-highlight-filter);
  padding: 0 2px;
  border-radius: 3px;
}


/* ==========================================================
   16. ALPHABET NAVIGATION
   ========================================================== */

.alphabet-letter.active-letter {
  background-color: rgba(10, 42, 96, 0.15);
  color: var(--ddglc-blue);
}

.alphabet-letters {
  gap: 6px;                 /* Abstand zwischen Buchstaben */
}

.alphabet-letter {
  font-weight: 600;         /* wieder leicht fett */
  padding: 4px 6px;         /* wieder “Button”-Gefühl */
  border-radius: 6px;
  text-decoration: none;    /* keine Standard-Unterstreichung */
  user-select: none;
}

.alphabet-letter:hover {
  background-color: rgba(0,0,0,0.06);
  text-decoration: none;
}


/* ==========================================================
   17. FOOTER – fixed bottom
   ========================================================== */

:root{
  --ddglc-footer-h: 64px;
}

.ddglc-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--ddglc-footer-h);
  z-index: 9500;
  background: #ffffff;
  border-top: 1px solid var(--ddglc-border-soft);
  box-shadow: 0 -2px 6px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
}

.ddglc-footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ddglc-footer-left{ flex: 2; }
.ddglc-footer-mid{  flex: 8; }

.ddglc-footer-right{
  flex: 2;
  display: flex;
  justify-content: center;  /* mittig im Bereich */
}

.ddglc-footer-logo{
  width: 120px;
  height: auto;
}

/* ==========================================================
   18. FILTER SIDEBAR
   ========================================================== */

   /* Active chips placeholder */
.filter-chip-empty{
  opacity: .55;
}

/* Active accordion group highlight */
.filter-acc .accordion-item.is-active {
  border-color: rgba(10, 42, 96, 0.25);
}

.filter-acc .accordion-item.is-active .accordion-button {
  color: var(--ddglc-blue);
  font-weight: 700;
}

/* Wenn aktiv aber zugeklappt: trotzdem blau lassen */
.filter-acc .accordion-item.is-active .accordion-button.collapsed {
  color: var(--ddglc-blue);
}

/* dezenter Marker links */
.filter-acc .accordion-item.is-active .accordion-button::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ddglc-blue);
  margin-right: 8px;
  transform: translateY(-1px);
  opacity: .85;
}

/* Clear Button (DDGLC blue style) */
.ddglc-btn-clear {
  background-color: var(--ddglc-blue);
  color: #fff;
  border: 1px solid var(--ddglc-blue);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 6px;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.ddglc-btn-clear:hover {
  background-color: #08306b; /* leicht dunkler */
  border-color: #08306b;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(10,42,96,0.25);
}

.ddglc-btn-clear:active {
  transform: translateY(1px);
}

/* ==========================================================
   17. FOOTER – expanded bottom
   ========================================================== */

.ddglc-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: var(--ddglc-footer-h);
  z-index: 9500;
  background: #ffffff;
  border-top: 1px solid var(--ddglc-border-soft);
  box-shadow: 0 -2px 6px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
}

.ddglc-footer-wrap{
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

.ddglc-footer-row{
  min-height: var(--ddglc-footer-h);
  padding-top: 10px;
  padding-bottom: 10px;
}

.ddglc-footer-left,
.ddglc-footer-mid,
.ddglc-footer-right{
  display: flex;
  align-items: center;
}

.ddglc-footer-left{
  justify-content: flex-start;
}

.ddglc-footer-mid{
  justify-content: center;
}

.ddglc-footer-right{
  justify-content: flex-end;
}

.ddglc-footer-dios{
  display: flex;
  align-items: center;
  gap: 14px;
}

.ddglc-footer-brand{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.ddglc-footer-dios-logo{
  max-height: 18px;
  width: auto;
  display: block;
}

.ddglc-footer-dios-links{
  display: flex;
  /*flex-direction: column;*/
  gap: 12px;
}

.ddglc-footer-notice{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ddglc-footer-link{
  color: var(--ddglc-blue);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.25;
  white-space: nowrap;
}

.ddglc-footer-link:hover{
  text-decoration: underline;
}

.footer-main-link{
  font-weight: 700;
}

.ddglc-footer-logos{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
}

.ddglc-footer-logo{
  max-height: 40px;
  width: auto;
  display: block;
}

.ddglc-footer-logo-main{
  max-height: 40px;
}

/* responsive */
@media (max-width: 991.98px){
  :root{
    --ddglc-footer-h: 180px;
  }

  .ddglc-footer-left,
  .ddglc-footer-mid,
  .ddglc-footer-right{
    justify-content: center;
    margin-bottom: 8px;
  }

  .ddglc-footer-dios{
    justify-content: center;
    text-align: center;
  }

  .ddglc-footer-dios-links{
    align-items: flex-start;
  }

  .ddglc-footer-notice{
    align-items: center;
    text-align: center;
  }

  .ddglc-footer-logos{
    gap: 20px;
  }

  .ddglc-footer-logo{
    max-height: 56px;
  }

  .ddglc-footer-logo-main{
    max-height: 64px;
  }
}

@media (max-width: 575.98px){
  :root{
    --ddglc-footer-h: 210px;
  }

  .ddglc-footer-wrap{
    padding-left: 12px;
    padding-right: 12px;
  }

  .ddglc-footer-dios{
    flex-direction: column;
    gap: 8px;
  }

  .ddglc-footer-dios-links{
    align-items: center;
  }
}