/* ===== Info-Popups für die Therapieliste (Leistungen) ===== */

.infotip {
    position: relative;
}

/* Info-Symbol hinter dem Begriff (Kreis mit i, ruhiges Graublau) */
.infotip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0;
    vertical-align: text-bottom;
    border: none;
    background: transparent;
    color: #5e7d99;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.infotip:hover .infotip-btn,
.infotip.open .infotip-btn {
    color: #3b5a76;
    transform: scale(1.12);
}

.infotip-btn:focus-visible {
    outline: 2px solid #5e7d99;
    outline-offset: 3px;
    border-radius: 50%;
}

/* Info-Feld: erscheint rechts neben dem Symbol (Position setzt infotip.js);
   reicht der Platz rechts nicht, weicht es unter das Symbol aus (.below) */
.infotip-panel {
    position: absolute;
    z-index: 60;
    width: 380px;
    padding: 13px 17px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid rgba(94, 125, 153, 0.35);
    border-radius: 13px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.13), 0 3px 10px rgba(0, 0, 0, 0.06);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.6;
    color: #555;
    opacity: 0;
    visibility: hidden;
    transform: translate(-8px, -50%);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    pointer-events: none;
}

.infotip-panel.below {
    transform: translate(0, -6px);
}

/* Öffnen per Klick (alle Geräte) */
.infotip.open .infotip-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
    pointer-events: auto;
}

.infotip.open .infotip-panel.below {
    transform: translate(0, 0);
}

/* Öffnen per Hover (nur Geräte mit Maus) */
@media (hover: hover) and (pointer: fine) {
    .infotip:hover .infotip-panel {
        opacity: 1;
        visibility: visible;
        transform: translate(0, -50%);
        pointer-events: auto;
    }

    .infotip:hover .infotip-panel.below {
        transform: translate(0, 0);
    }
}

/* Mobil: Feld klappt im Textfluss auf statt zu schweben */
@media (max-width: 640px) {
    .infotip-panel,
    .infotip-panel.below {
        position: static;
        display: none;
        width: 100% !important;
        margin: 8px 0 6px 0;
        transform: none;
    }

    .infotip.open .infotip-panel {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}
