/**
 * OSP Neuigkeiten-Badge — Darstellung
 * Traegt nur, was der Baustein selbst braucht. Farben kommen aus den
 * CI-Variablen der App, mit Rueckfallwerten, damit die Pille auch in
 * einer frisch angelegten App sofort richtig aussieht.
 */

.hdr-version-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .14);
    color: inherit;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.hdr-version-pill:hover {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .45);
    transform: translateY(-1px);
}

.hdr-version-pill:focus-visible {
    outline: 2px solid var(--accent, #DC500F);
    outline-offset: 2px;
}

.hdr-version-pill .hdr-version-icon {
    opacity: .7;
    transition: transform .16s ease, opacity .16s ease;
}

.hdr-version-pill:hover .hdr-version-icon {
    transform: translateX(2px);
    opacity: 1;
}

/* Ungelesene Fassung: Akzentfarbe plus ruhiger Puls.
   Der Puls laeuft langsam — er soll auffallen, nicht hetzen. */
.hdr-version-pill.version-new {
    background: var(--akzent-orange, #DC500F);
    border-color: rgba(255, 255, 255, .6);
    color: #fff;
    animation: osp-version-pulse 2.4s ease-in-out infinite;
}

@keyframes osp-version-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 80, 15, .55); }
    50%      { box-shadow: 0 0 0 6px rgba(220, 80, 15, 0); }
}

/* Wer Bewegung im Betriebssystem abgeschaltet hat, bekommt sie nicht. */
@media (prefers-reduced-motion: reduce) {
    .hdr-version-pill.version-new { animation: none; }
    .hdr-version-pill { transition: none; }
}

/* Dunkelmodus: beide Signale des OSP-Umschalters beruecksichtigen. */
html.dark .hdr-version-pill,
[data-theme="dark"] .hdr-version-pill {
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
}

html.dark .hdr-version-pill.version-new,
[data-theme="dark"] .hdr-version-pill.version-new {
    background: var(--akzent-orange, #DC500F);
    border-color: rgba(255, 255, 255, .35);
}
