/* BB Mobile Sticky Buttons v1.0.2 */

.bb-mobile-buttons {
    display: none;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998; /* Unter fixierter Top-Nav (meist 999/9999), über Content */
    flex-direction: column;
    gap: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.4s ease;
}

/* Nur auf Mobile zeigen */
@media (max-width: 980px) {
    .bb-mobile-buttons {
        display: flex;
    }
}

/* ---------- Hidden States ---------- */

/* Persistent hidden (vom FOUC-Guard gesetzt wenn User vorher Close geklickt hat) */
html.bb-buttons-hidden .bb-mobile-buttons {
    display: none !important;
}

/* Animated hidden (Close-Klick während laufender Session) */
.bb-mobile-buttons.bb-hidden {
    transform: translateY(-50%) translateX(100%);
    opacity: 0;
    pointer-events: none;
}

/* ---------- Buttons ---------- */

.bb-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
    border: none;
    padding: 0;
}

.bb-mobile-btn--tickets,
.bb-mobile-btn--staedte,
.bb-mobile-btn--biertiere,
.bb-mobile-btn--shop,
.bb-mobile-btn--faq {
    background: #ff9858;
}

.bb-mobile-btn--close {
    background: #ffb080;
    color: #fff;
}

/* Icons — einheitlich 28x28 und weiß, egal ob <img> oder inline SVG */
.bb-mobile-btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.bb-mobile-btn svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
    transition: transform 0.3s ease;
}

.bb-mobile-btn:active {
    transform: scale(0.95);
}

.bb-mobile-btn:active img,
.bb-mobile-btn:active svg {
    transform: scale(1.1);
}

/* Erste und letzte Button abrunden */
.bb-mobile-btn:first-child {
    border-radius: 12px 0 0 0;
}

.bb-mobile-btn:last-child {
    border-radius: 0 0 0 12px;
}

/* Shine Effect */
.bb-mobile-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.bb-mobile-btn:active::before {
    left: 100%;
}

/* Tooltip Label */
.bb-mobile-btn-label {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-right: 8px;
}

.bb-mobile-btn:active .bb-mobile-btn-label {
    opacity: 1;
}

/* Separator */
.bb-mobile-btn:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Slide-In Animation ---------- */
/* Läuft nur beim ersten Page-Load pro Session (Klasse vom FOUC-Guard gesetzt) */

@keyframes bb-slide-in {
    from {
        transform: translateY(-50%) translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

html.bb-buttons-first-visit .bb-mobile-buttons {
    animation: bb-slide-in 0.5s ease 0.3s both;
}

/* ---------- Wenn Mobile-Nav offen ist ---------- */
body.mobile-nav-open          .bb-mobile-buttons,
body.et-mobile-menu-visible   .bb-mobile-buttons,
body.mobile-menu-open         .bb-mobile-buttons,
.et_mobile_menu_visible       .bb-mobile-buttons,
body.et_pb_slide_menu_active  .bb-mobile-buttons {
    display: none !important;
}
