/* ============================================================
   Globale Tooltip-Klasse (.tt)
   Basis: Wrapper mit Info-Icon + per Hover/Focus sichtbare Bubble
   Verwendung:
     <div class="tt">
         <span class="tt-icon" tabindex="0" aria-label="...">?</span>
         <div class="tt-bubble">... Inhalt ...</div>
     </div>
   ============================================================ */

.tt {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #f1f1f1;
    border: 1px solid #dddddd;
    color: #7a7a7a;
    font-family: var(--font-family, 'Century Gothic', sans-serif);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    box-sizing: border-box;
}

.tt-icon:hover {
    background-color: #e4e4e4;
}

.tt-bubble {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateY(-4px);
    background: #ffffff;
    border: 1px solid #cfcfcf;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 12px 16px;
    font-family: var(--font-family, 'Century Gothic', sans-serif);
    font-size: 13px;
    color: #555555;
    white-space: nowrap;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.tt-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #ffffff;
    margin-top: -1px;
}

.tt-bubble.is-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #ffffff;
    margin-top: 0;
    margin-bottom: -1px;
}

.tt-bubble.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Die Bubble wird per JS auf document.body teleportiert (außerhalb aller
   overflow:hidden/auto-Container) und dort fixed auf Viewport-Ebene
   positioniert -> immer oberste Ebene, nie abgeschnitten. */

/* ============================================================
   Subklasse: Prioritäts-Erklärung (.tt-priority)
   Eine Zeile je Prioritätsstufe: farbiger Punkt + Text
   Farbverlauf je Zahl (0 = grau, 1 = grün -> 6 = rot)
   ============================================================ */

.tt-priority .tt-bubble {
    white-space: normal;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tt-priority__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tt-priority__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tt-priority__dot.is-p0 { background-color: #6c757d; }
.tt-priority__dot.is-p1 { background-color: #23a76b; }
.tt-priority__dot.is-p2 { background-color: #7cd47f; }
.tt-priority__dot.is-p3 { background-color: #ffca3a; }
.tt-priority__dot.is-p4 { background-color: #ff9f1c; }
.tt-priority__dot.is-p5 { background-color: #f26d00; }
.tt-priority__dot.is-p6 { background-color: #d62828; }