/* Birthday overlay on /live — inspired by hbd-template-2 (balloons rise from bottom) */

.tl-hbd-overlay {
    position: fixed;
    inset: 0;
    z-index: 99950;
    pointer-events: none;
    overflow: hidden;
    isolation: isolate;
}

.tl-hbd-overlay__center {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    padding: 16px 22px;
    max-width: min(92vw, 420px);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.85s ease, visibility 0.85s ease, transform 0.85s ease;
    animation: tl-hbd-center-pulse 3s ease-in-out 3;
}

.tl-hbd-overlay--center-gone .tl-hbd-overlay__center {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.96);
    animation: none;
}

.tl-hbd-overlay__banner {
    display: block;
    max-width: min(280px, 72vw);
    height: auto;
    margin: 0 auto 10px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.tl-hbd-overlay__title {
    margin: 0;
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
}

.tl-hbd-overlay__sub {
    margin: 6px 0 0;
    font-size: clamp(0.85rem, 3.2vw, 1rem);
    font-weight: 700;
    color: #ffd47a;
}

.tl-hbd-balloon {
    position: absolute;
    bottom: -140px;
    width: var(--tl-hbd-size, 64px);
    height: auto;
    opacity: 0.92;
    will-change: transform;
    animation: tl-hbd-rise var(--tl-hbd-dur, 14s) linear infinite;
    animation-delay: var(--tl-hbd-delay, 0s);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.tl-hbd-balloon--spin {
    animation-name: tl-hbd-rise-spin;
}

@keyframes tl-hbd-rise {
    0% {
        transform: translate3d(0, 0, 0) scale(0.85);
        opacity: 0;
    }
    8% {
        opacity: 0.95;
    }
    100% {
        transform: translate3d(var(--tl-hbd-drift, 0px), -115vh, 0) scale(1.05);
        opacity: 0.15;
    }
}

@keyframes tl-hbd-rise-spin {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(0.85);
        opacity: 0;
    }
    8% {
        opacity: 0.95;
    }
    100% {
        transform: translate3d(var(--tl-hbd-drift, 0px), -115vh, 0) rotate(18deg) scale(1.05);
        opacity: 0.12;
    }
}

@keyframes tl-hbd-center-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tl-hbd-balloon {
        animation: none;
        display: none;
    }
    .tl-hbd-overlay__center {
        animation: none;
    }
}
