/* Independent draggable refresh control with one approved legacy-home override. */
/* Hide only the explicitly superseded home floater after this module is ready. */
html.creator-floating-refresh-ready .ce-app[data-exchange-page="home"] .ce-home-refresh[data-refresh] {
  display: none !important;
}

#creator-floating-refresh {
  position: fixed;
  inset: auto;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ce-refresh-bg, #282828);
  color: var(--ce-card, #fff);
  box-shadow: 0 3px 12px rgba(19, 32, 51, .24);
  appearance: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  transition: box-shadow 150ms ease, background-color 150ms ease;
}

#creator-floating-refresh[data-ready="true"] {
  opacity: 1;
  visibility: visible;
}

#creator-floating-refresh svg {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#creator-floating-refresh:focus-visible {
  outline: 3px solid var(--ce-ink, #08775f);
  outline-offset: 4px;
}

#creator-floating-refresh:active,
#creator-floating-refresh.creator-floating-refresh-dragging {
  cursor: grabbing;
  box-shadow: 0 5px 16px rgba(19, 32, 51, .32);
}

#creator-floating-refresh[aria-busy="true"] svg {
  animation: creator-floating-refresh-spin 900ms linear infinite;
}

.creator-floating-refresh-safe-area {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  visibility: hidden;
  pointer-events: none;
}

.creator-floating-refresh-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes creator-floating-refresh-spin {
  to { transform: rotate(360deg); }
}

@media (hover: hover) {
  #creator-floating-refresh:hover {
    background: var(--ce-refresh-hover, #3a3a3a);
    box-shadow: 0 4px 14px rgba(19, 32, 51, .3);
  }
}

@media (prefers-reduced-motion: reduce) {
  #creator-floating-refresh { transition: none; }
  #creator-floating-refresh[aria-busy="true"] svg { animation: none; opacity: .6; }
}
