/*
 * UpNrun Helpdesk — Tooltip-Styling (eigene Datei, NICHT styles.css).
 * Bewusst separat gehalten, um Konflikte mit dem laufenden GUI-Restyle zu
 * vermeiden. App-Branding-konform, Akzent #21D4FD.
 */

/* Optionaler "?"-Marker neben komplexen Elementen (per data-help-Helper) */
.upn-help-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid rgba(33, 212, 253, 0.5);
  color: #21d4fd;
  font-size: 11px;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  user-select: none;
}
.upn-help-q:hover { background: rgba(33, 212, 253, 0.14); }

/* Das eine, global wiederverwendete Tooltip-Element */
.upn-help-tip {
  position: absolute;
  z-index: 99999;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(10, 18, 26, 0.98);
  border: 1px solid rgba(33, 212, 253, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(33, 212, 253, 0.06);
  color: #e8f4fb;
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  pointer-events: auto;
  animation: upn-help-fade 0.12s ease;
}
@keyframes upn-help-fade {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.upn-help-tip[hidden] { display: none; }

/* Kleiner Pfeil */
.upn-help-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(10, 18, 26, 0.98);
  border-right: 1px solid rgba(33, 212, 253, 0.32);
  border-bottom: 1px solid rgba(33, 212, 253, 0.32);
}
.upn-help-tip.upn-help-tip--below::after {
  bottom: auto;
  top: -6px;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid rgba(33, 212, 253, 0.32);
  border-top: 1px solid rgba(33, 212, 253, 0.32);
}

.upn-help-tip__title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 3px;
  color: #21d4fd;
}
.upn-help-tip__title[hidden] { display: none; }
.upn-help-tip__body { color: #cfe6f1; }
.upn-help-tip__link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  font-size: 12px;
  color: #21d4fd;
  text-decoration: none;
  border-bottom: 1px solid rgba(33, 212, 253, 0.4);
}
.upn-help-tip__link[hidden] { display: none; }
/* Formatierter Text (Absaetze/Punkte/fett, help-tooltips.js renderBody) */
.upn-help-tip__body p { margin: 0 0 6px; }
.upn-help-tip__body p:last-child { margin-bottom: 0; }
.upn-help-tip__body ul { margin: 4px 0 8px; padding-left: 18px; }
.upn-help-tip__body li { margin: 2px 0; }
.upn-help-tip__body li::marker { color: #21d4fd; }
.upn-help-tip__body b { color: #f2faff; font-weight: 700; }
/* Grosse Variante: Modul-Info am Seitentitel (27.09.2026) */
.upn-help-tip.upn-help-tip--gross {
  max-width: min(460px, calc(100vw - 24px));
  padding: 14px 16px 12px;
  font-size: 13.5px;
  line-height: 1.55;
  border-radius: 12px;
}
.upn-help-tip--gross .upn-help-tip__title {
  font-size: 15px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(33, 212, 253, 0.18);
}
.upn-help-tip__link:hover { color: #6be4ff; border-color: #6be4ff; }

/* ---- Hilfe-Palette (help-palette.js): durchsuchbarer Themen-Index ----- */
/* Oeffnet mit Taste "?" — Overlay + Suchfeld + Trefferliste. Eigenstaendig
   gestylt (kein Branding-Konflikt), Akzent #21D4FD wie der Tooltip. */
.upn-help-pal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 16px 16px;
  background: rgba(4, 10, 16, 0.62);
  backdrop-filter: blur(2px);
  animation: upn-help-fade 0.12s ease;
}
.upn-help-pal[hidden] { display: none; }
.upn-help-pal__box {
  width: 100%;
  max-width: 560px;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: rgba(10, 18, 26, 0.99);
  border: 1px solid rgba(33, 212, 253, 0.32);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(33, 212, 253, 0.06);
  color: #e8f4fb;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
.upn-help-pal__hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
}
.upn-help-pal__title {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #21d4fd;
}
.upn-help-pal__close {
  appearance: none;
  background: transparent;
  border: none;
  color: #8ca9b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.upn-help-pal__close:hover { color: #e8f4fb; }
.upn-help-pal__input {
  margin: 0 14px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(33, 212, 253, 0.28);
  background: rgba(7, 14, 20, 0.9);
  color: #e8f4fb;
  font-size: 14px;
  outline: none;
}
.upn-help-pal__input:focus { border-color: rgba(33, 212, 253, 0.7); }
.upn-help-pal__list {
  list-style: none;
  margin: 0;
  padding: 0 6px 8px;
  overflow-y: auto;
}
.upn-help-pal__row {
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
}
.upn-help-pal__row.has-link { cursor: pointer; }
.upn-help-pal__row.has-link:hover,
.upn-help-pal__row.is-sel {
  background: rgba(33, 212, 253, 0.1);
  border-color: rgba(33, 212, 253, 0.3);
}
.upn-help-pal__rt { font-weight: 700; font-size: 13.5px; color: #e8f4fb; }
.upn-help-pal__rb { font-size: 12.5px; color: #cfe6f1; margin-top: 1px; }
.upn-help-pal__rl {
  display: inline-block;
  margin-top: 5px;
  font-weight: 600;
  font-size: 12px;
  color: #21d4fd;
}
.upn-help-pal__empty {
  padding: 18px 16px 26px;
  text-align: center;
  color: #8ca9b8;
  font-size: 13px;
}
.upn-help-pal__empty[hidden] { display: none; }

/* Modul-Info am Seitentitel (help-tooltips.js modulInfo, 27.09.2026) */
.upn-help-i.upn-modul-i { margin-left: 8px; text-transform: none; letter-spacing: 0; flex: 0 0 auto; }
