:root {
  --belivin-motion-fast: 140ms;
  --belivin-motion-panel: 220ms;
  --belivin-motion-ease: cubic-bezier(.2, .75, .25, 1);
}

:root :is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], input[type="image"], a[href]) {
  scale: 1;
  translate: 0 0;
  transition-property: background-color, border-color, color, box-shadow, outline-color, scale, translate;
  transition-duration: var(--belivin-motion-fast);
  transition-timing-function: var(--belivin-motion-ease);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  :root :is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], input[type="image"], a[href]):not(:disabled):not([aria-disabled="true"]):not(.sidebar-backdrop):hover {
    translate: 0 -1px;
  }
}

:root :is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], input[type="image"], a[href]):not(:disabled):not([aria-disabled="true"]):not(.sidebar-backdrop):active {
  scale: .975;
  translate: 0 1px;
  transition-duration: 80ms;
}

:root .primary-button:active { transform: none; }

:root :is(button, [role="button"], input, select, textarea, a[href]):focus-visible {
  outline: 2px solid #238b74;
  outline-offset: 3px;
}

:root :is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], input[type="image"]):is(:disabled, [aria-disabled="true"]) {
  scale: 1;
  translate: 0 0;
  transition-duration: 0ms;
}

.motion-ink {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none !important;
  contain: strict;
}

.motion-ink-wave {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  pointer-events: none !important;
}

html[data-motion="full"] [data-motion-surface] {
  animation: belivin-page-in var(--belivin-motion-panel) var(--belivin-motion-ease);
}

html[data-motion="full"] dialog[open] {
  animation: belivin-dialog-in var(--belivin-motion-panel) var(--belivin-motion-ease);
}

html[data-motion="full"] dialog[open]::backdrop {
  animation: belivin-page-in 180ms ease-out;
}

html[data-motion="full"] :is([role="status"], [role="alert"], .master-success, .master-error):not([hidden]) {
  animation: belivin-notice-in 180ms var(--belivin-motion-ease);
}

html[data-motion="full"] :is([id^="flow-step-"], #customer-tab-content > section, details[open] > :not(summary)):not([hidden]) {
  animation: belivin-panel-in var(--belivin-motion-panel) var(--belivin-motion-ease);
}

html[data-motion="full"] button:is([aria-selected="true"], [aria-pressed="true"]) {
  animation: belivin-selection-in 280ms ease-out;
}

.sidebar-menu .sidebar-link svg {
  transition: translate var(--belivin-motion-fast) var(--belivin-motion-ease);
}

@media (hover: hover) and (pointer: fine) {
  .sidebar-menu .sidebar-link:is(:hover, :focus-visible) svg { translate: 2px 0; }
}

@media (max-width: 900px) {
  .workspace-sidebar {
    transition: transform var(--belivin-motion-panel) var(--belivin-motion-ease);
  }
  html[data-motion="full"] .sidebar-backdrop:not([hidden]) {
    animation: belivin-page-in 180ms ease-out;
  }
}

@keyframes belivin-page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes belivin-dialog-in {
  from { opacity: 0; scale: .985; translate: 0 10px; }
  to { opacity: 1; scale: 1; translate: 0 0; }
}

@keyframes belivin-notice-in {
  from { opacity: 0; translate: 0 3px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes belivin-panel-in {
  from { opacity: .35; translate: 0 5px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes belivin-selection-in {
  from { box-shadow: 0 0 0 0 #238b7430; }
  to { box-shadow: 0 0 0 5px #238b7400; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  :root :is(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], input[type="image"], a[href]),
  .sidebar-menu .sidebar-link svg {
    scale: none !important;
    translate: none !important;
    animation: none !important;
    transition: none !important;
  }
  html :is([data-motion-surface], dialog, [role="status"], [role="alert"], [id^="flow-step-"], #customer-tab-content > section) {
    animation: none !important;
  }
  .motion-ink { display: none !important; }
}
