/* Yukarı çık — chat/cookie çakışması önlenir */
.ik-top-btn {
    position: fixed;
    right: 1.25rem;
    bottom: calc(var(--float-edge, 1.25rem) + var(--float-widgets-height, 0px) + 0.75rem);
    z-index: var(--z-float-back-top, 9800);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: var(--theme-button-radius, 999px);
    background: var(--site-bg, #fff);
    color: var(--theme-primary, #2563eb);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

.ik-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ik-top-btn:hover {
    background: color-mix(in srgb, var(--theme-primary, #2563eb) 10%, #fff);
}

body.ikrabot-panel-open .ik-top-btn {
    opacity: 0;
    pointer-events: none;
}

body.has-ikramedya-cookie-shortcut-bar .ik-top-btn {
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0) + 3.5rem);
}

body.has-ikrabot .ik-top-btn {
    bottom: calc(var(--float-edge, 1.25rem) + var(--float-widgets-height, 0px) + var(--float-ikrabot-h, 3.75rem) + 1.25rem);
}

body.has-cookie-banner-visible .ik-top-btn {
    bottom: calc(var(--float-edge, 1.25rem) + var(--float-widgets-height, 0px) + var(--float-cookie-offset, 5rem) + 0.75rem);
}

body.has-ikrabot.has-cookie-banner-visible .ik-top-btn {
    bottom: calc(var(--float-edge, 1.25rem) + var(--float-widgets-height, 0px) + var(--float-ikrabot-h, 3.75rem) + var(--float-cookie-offset, 5rem) + 0.75rem);
}

@media (max-width: 768px) {
    .ik-top-btn {
        right: var(--float-edge, 1rem);
        bottom: calc(var(--float-edge, 1rem) + var(--float-back-top-reserve, 3.5rem) + var(--float-widget-edge-stack, 0px));
        width: var(--ds-control-height, 2.5rem);
        height: var(--ds-control-height, 2.5rem);
    }

    body.has-cookie-banner-visible .ik-top-btn {
        bottom: calc(var(--float-edge, 1rem) + var(--float-cookie-reserve, var(--float-cookie-offset, 5rem)) + 0.5rem);
    }

    body.has-ikramedya-cookie-shortcut-bar .ik-top-btn {
        bottom: calc(var(--float-edge, 1rem) + var(--float-back-top-reserve, 3.5rem) + var(--float-cookie-offset, 3rem));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ik-top-btn {
        transition: none;
    }
}
