/**
 * Tikkhun Back To Top 前台样式.
 */

.tkbtt-button {
    position: fixed;
    z-index: 9998;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.24);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.tkbtt-button:hover {
    background: #1f2937;
}

.tkbtt-button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.tkbtt-button.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.tkbtt-button__icon {
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}

.tkbtt-bottom-right {
    right: var(--tkbtt-offset-x, 24px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tkbtt-offset-y, 24px) + var(--tkbtt-runtime-offset-y, 0px));
}

.tkbtt-bottom-left {
    left: var(--tkbtt-offset-x, 24px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tkbtt-offset-y, 24px) + var(--tkbtt-runtime-offset-y, 0px));
}

.tkbtt-top-right {
    right: var(--tkbtt-offset-x, 24px);
    top: calc(env(safe-area-inset-top, 0px) + var(--tkbtt-offset-y, 24px));
}

.tkbtt-top-left {
    left: var(--tkbtt-offset-x, 24px);
    top: calc(env(safe-area-inset-top, 0px) + var(--tkbtt-offset-y, 24px));
}

@media (max-width: 782px) {
    .tkbtt-button {
        width: 44px;
        height: 44px;
    }
}
