/* The existing scroll handlers own visibility, focusability and activation. */
@layer physicum-seitenanfang {
  :is(#pc-membership-scroll-ui .pc-edge-up, #pc-membership-back-top, #physicum-seitenanfang) {
    position: fixed !important;
    inset: auto max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) auto !important;
    box-sizing: border-box !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #191919 !important;
    color: #fff !important;
    font-size: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
  }

  :is(#pc-membership-scroll-ui .pc-edge-up, #pc-membership-back-top, #physicum-seitenanfang)::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    margin: auto !important;
    width: 20px !important;
    height: 20px !important;
    background: currentColor !important;
    --physicum-pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22V2m-5 5 5-5 5 5'/%3E%3C/svg%3E");
    -webkit-mask: var(--physicum-pfeil) center / contain no-repeat;
    mask: var(--physicum-pfeil) center / contain no-repeat;
    pointer-events: none;
  }

  :is(#pc-membership-scroll-ui .pc-edge-up, #pc-membership-back-top, #physicum-seitenanfang):focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px #191919 !important;
  }

  #physicum-seitenanfang { z-index: 9999; }
  #physicum-seitenanfang[hidden],
  body:has(#pc-membership-scroll-ui .pc-edge-up, #pc-membership-back-top) #physicum-seitenanfang {
    display: none !important;
  }
  body:has(#pc-membership-scroll-ui .pc-edge-up, #pc-membership-back-top, #physicum-seitenanfang)
    :is(a.pc-unified-return, button.pc-unified-return, button.backtop, button.pc-final-backtop) {
    display: none !important;
  }

  @media (forced-colors: active) {
    :is(#pc-membership-scroll-ui .pc-edge-up, #pc-membership-back-top, #physicum-seitenanfang) {
      forced-color-adjust: none;
      background: ButtonFace !important;
      color: ButtonText !important;
      border: 1px solid ButtonText !important;
    }
  }
  @media print {
    :is(#pc-membership-scroll-ui .pc-edge-up, #pc-membership-back-top, #physicum-seitenanfang) {
      display: none !important;
    }
  }
}
