/**
 * Back To Top Button – Stylesheet
 * HumHub Module | Author: Torsten Bojahr & Claude | Version 1.0.0
 * Compatible with HumHub 1.18.1+ (Bootstrap 5)
 */

/* ── Base button ─────────────────────────────────────────────────── */
.btt-btn {
    position: fixed;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition:
        opacity var(--btt-animation-speed, 600ms) ease,
        background-color 0.2s ease,
        transform 0.2s ease,
        visibility var(--btt-animation-speed, 600ms) ease;

    /* Hidden by default – JS shows it on scroll */
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
}

/* ── Visible state (added by JS) ─────────────────────────────────── */
.btt-btn.btt-visible {
    opacity: var(--btt-opacity, 0.85) !important;
    visibility: visible;
    pointer-events: auto;
}

/* ── Hover ───────────────────────────────────────────────────────── */
.btt-btn:hover {
    background-color: var(--btt-hover-color, #2c6fad) !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.30);
}

.btt-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ── Focus ring (accessibility) ──────────────────────────────────── */
.btt-btn:focus-visible {
    outline: 3px solid var(--btt-hover-color, #2c6fad);
    outline-offset: 3px;
}

/* ── SVG icon ────────────────────────────────────────────────────── */
.btt-btn svg {
    display: block;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.btt-btn:hover svg {
    transform: translateY(-2px);
}

/* ── Mobile hide class ───────────────────────────────────────────── */
@media (max-width: 767px) {
    .btt-hide-mobile {
        display: none !important;
    }
}

/* ── Print: always hidden ────────────────────────────────────────── */
@media print {
    .btt-btn {
        display: none !important;
    }
}
