/* Ring Facet shared interaction layer for the React pages (PBtn and friends).
   These pages style with inline props, which cannot express :hover, :active or
   :focus-visible; this file carries those states only. Press feedback is a
   transform and hover lift a drop-shadow filter, so neither fights the inline
   background / box-shadow a PBtn already sets.
   App surfaces (<html data-surface="app">: account, Ring Builder app, dashboard)
   get press feedback but no hover lift: those buttons are used many times a day. */
:root { --rf-ease-out: cubic-bezier(.23,1,.32,1); }

::selection { background: #0A0B0D; color: #F5F5F4; }
footer ::selection, .rf-dark ::selection { background: #F5F5F4; color: #0A0B0D; }

.rf-btn { transition: transform 160ms var(--rf-ease-out), filter 200ms ease; }
.rf-mini { transition: transform 140ms var(--rf-ease-out), filter 200ms ease; }
/* Several dashboard PBtns disable while saving with no visual cue. Callers that
   set their own inline opacity keep it (inline wins). */
.rf-btn:disabled { cursor: not-allowed; opacity: .55; }
.rf-btn:not(:disabled):active { transform: scale(.97); filter: none; transition-duration: 100ms; }
.rf-mini:not(:disabled):active { transform: scale(.96); transition-duration: 100ms; }

@media (hover: hover) and (pointer: fine) {
  html:not([data-surface="app"]) .rf-btn:not(:disabled):hover { transform: translateY(-1px); filter: drop-shadow(0 4px 10px rgba(10,11,13,.14)); }
  html[data-surface="app"] .rf-btn:not(:disabled):hover { filter: drop-shadow(0 1px 3px rgba(10,11,13,.14)); }
  .rf-mini:not(:disabled):hover { filter: drop-shadow(0 2px 5px rgba(10,11,13,.12)); }
}

:is(.rf-btn, .rf-mini):focus-visible { outline: 2px solid #0A0B0D; outline-offset: 2px; }
:is(footer, .rf-dark) :is(.rf-btn, .rf-mini):focus-visible { outline-color: #F5F5F4; }

@media (prefers-reduced-motion: reduce) {
  .rf-btn, .rf-mini { transition-property: filter; }
  .rf-btn:not(:disabled):active, .rf-mini:not(:disabled):active,
  html:not([data-surface="app"]) .rf-btn:not(:disabled):hover { transform: none; }
}
