/* ==========================================================
   🔹 Begriff-Detail-Sheet (helle Variante mit Blau)
   ========================================================== */

   #termSheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    color: #111;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.25);
    transition: bottom 0.4s ease;
    z-index: 9999;
    padding: 25px;
    max-height: 90%;
    overflow-y: auto;
  }
  
  /* Desktop Floating */
  #termSheet.desktop {
    width: 420px;
    right: 20px;
    left: auto;
    bottom: -100%;
    border-radius: 16px;
    max-height: 80%;
  }
  #termSheet.active { bottom: 0; }
  #termSheet.desktop.active { bottom: 20px; }
  
  /* Close Button */
  #sheetClose {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #0d6efd;
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
  }
  #sheetClose:hover {
    transform: rotate(90deg);
    color: #0056b3;
  }
  
  /* Inhalt */
  .term-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0d6efd;
  }
  .term-abbrev {
    color: #666;
    margin-bottom: 8px;
  }
  .term-content {
    line-height: 1.55;
    color: #111;
  }
  .term-image {
    display: block;
    max-width: 100%;
    border-radius: 10px;
    margin-top: 15px;
    border: 1px solid #ddd;
  }
  
  /* Links im Content */
  .linked-term {
    color: #0d6efd;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
  }
  .linked-term:hover {
    color: #0056b3;
    text-decoration: none;
  }
  
  .anchor-link {
    color: #0d6efd;
    text-decoration: underline;
    font-weight: 500;
  }
  .anchor-link:hover {
    text-decoration: none;
    color: #0056b3;
  }
  
  /* Dezenter Scrollbar-Stil (hell) */
  #termSheet::-webkit-scrollbar {
    width: 8px;
  }
  #termSheet::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
  }
  #termSheet::-webkit-scrollbar-thumb:hover {
    background: #aaa;
  }
  /* ==========================================================
   🔹 Zwangsweise Farbanpassung (neutralisiert alte DB-Stile)
   ========================================================== */
#termSheet * {
  color: inherit !important;
}

#termSheet strong,
#termSheet b {
  color: #000 !important;
}

.sheet_popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #111;
  color: #fff;
  padding: 1rem;
  border-radius: 8px;
  width: 340px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  z-index: 9999;
}

.sheet_popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .6rem;
}

.sheet_popup-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.sheet_popup-open {
  font-size: 0.85rem;
  color: #6cf;
  text-decoration: none;
  margin-left: auto;
  margin-right: .5rem;
}

.sheet_popup-open:hover {
  text-decoration: underline;
}

.sheet_popup-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

/* 🔹 Link "Im neuen Tab öffnen" – auf Höhe vom X rechts oben */
.sheet_popup-open {
  position: absolute;
  top: 10px;
  right: 45px;          /* etwas Abstand links vom X */
  color: #6cf;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  z-index: 10000;
}

.sheet_popup-open:hover {
  text-decoration: underline;
}


.sheet_nav-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem .8rem;
  font-weight: 600;
  cursor: pointer;
  background: #f9fafa;
  border-bottom: 1px solid #eee;
}

.sheet_nav-category-header:hover {
  background: #f1f3f4;
}

.sheet_nav-category-items {
  padding-left: 1rem;
  background: #fff;
  display: none; /* Standardmäßig zugeklappt */
}

.sheet_arrow {
  transition: transform 0.3s ease;
  font-size: 0.9rem;
  color: #555;
}
