/* Sabit "yukarı çık" — scope: .scroll-to-top (ikon sınıflarıyla çakışmaz) */
.scroll-to-top {
    position: fixed;
    /* bk-tools (.bk-tools right) ile aynı eksende hizalı */
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    z-index: 160;
    width: 52px;
    height: 52px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #16b254;
    color: #ffffff;
    box-shadow:
        0 4px 14px rgba(22, 178, 84, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(0.94);
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        transform 0.22s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    background: #14a04c;
    box-shadow:
        0 6px 20px rgba(22, 178, 84, 0.45),
        0 3px 8px rgba(0, 0, 0, 0.15);
}

.scroll-to-top:focus {
    outline: none;
}

.scroll-to-top:focus-visible {
    outline: 3px solid rgba(22, 178, 84, 0.45);
    outline-offset: 3px;
}

.scroll-to-top:active {
    transform: translateY(1px) scale(0.98);
}

.scroll-to-top.is-visible:active {
    transform: translateY(1px) scale(0.98);
}

.scroll-to-top__icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
}

@media (min-width: 640px) {
    .scroll-to-top {
        right: max(20px, env(safe-area-inset-right, 0px));
    }
}

@media (min-width: 768px) {
    .scroll-to-top {
        right: max(24px, env(safe-area-inset-right, 0px));
    }
}

@media (min-width: 1024px) {
    .scroll-to-top {
        right: max(50px, env(safe-area-inset-right, 0px));
        bottom: max(32px, env(safe-area-inset-bottom, 0px));
        width: 56px;
        height: 56px;
    }

    .scroll-to-top__icon {
        width: 24px;
        height: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-to-top {
        transition-duration: 0.01ms;
    }
}
