.epoptic-animated-button-wrap {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.epoptic-animated-button {
  --epoptic-animated-text: #4f4f4f;
  --epoptic-animated-icon: #4f4f4f;
  --epoptic-animated-label-bg: #fffaf7;
  --epoptic-animated-icon-bg: #fffaf7;
  --epoptic-animated-border: transparent;
  --epoptic-animated-text-hover: #ffffff;
  --epoptic-animated-icon-hover: #ffffff;
  --epoptic-animated-hover-bg: #555555;
  --epoptic-animated-label-bg-hover: transparent;
  --epoptic-animated-icon-bg-hover: transparent;
  --epoptic-animated-border-hover: var(--epoptic-animated-border);
  --epoptic-animated-focus: #555555;
  --epoptic-animated-radius: 999px;
  --epoptic-animated-height: 48px;
  --epoptic-animated-label-min: 360px;
  --epoptic-animated-label-pad: 28px;
  --epoptic-animated-gap: 8px;
  --epoptic-animated-border-width: 1px;
  --epoptic-animated-icon-size: 19px;
  --epoptic-animated-hover-scale: 0.985;
  --epoptic-animated-text-scale: 0.965;
  --epoptic-animated-duration: 460ms;
  --epoptic-animated-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  min-height: var(--epoptic-animated-height);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--epoptic-animated-gap);
  color: var(--epoptic-animated-text);
  text-decoration: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition:
    gap var(--epoptic-animated-duration) var(--epoptic-animated-ease),
    transform var(--epoptic-animated-duration) var(--epoptic-animated-ease);
}

.epoptic-animated-button,
.epoptic-animated-button * {
  box-sizing: border-box;
}

.epoptic-animated-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--epoptic-animated-radius);
  background: var(--epoptic-animated-hover-bg);
  opacity: 0;
  transform: scale(0.992);
  transform-origin: center;
  transition:
    opacity 340ms var(--epoptic-animated-ease),
    transform var(--epoptic-animated-duration) var(--epoptic-animated-ease);
}

.epoptic-animated-button__label,
.epoptic-animated-button__icon {
  position: relative;
  z-index: 1;
  height: var(--epoptic-animated-height);
  border: var(--epoptic-animated-border-width) solid var(--epoptic-animated-border);
  transition:
    background-color 340ms var(--epoptic-animated-ease),
    border-color 340ms var(--epoptic-animated-ease),
    color 340ms var(--epoptic-animated-ease),
    transform var(--epoptic-animated-duration) var(--epoptic-animated-ease),
    border-radius var(--epoptic-animated-duration) var(--epoptic-animated-ease),
    margin var(--epoptic-animated-duration) var(--epoptic-animated-ease);
  will-change: transform, background-color, border-radius, margin;
}

.epoptic-animated-button__label {
  min-width: var(--epoptic-animated-label-min);
  padding: 0 var(--epoptic-animated-label-pad);
  border-radius: var(--epoptic-animated-radius);
  background: var(--epoptic-animated-label-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--epoptic-animated-text);
  line-height: 1;
  white-space: nowrap;
}

.epoptic-animated-button__label-text {
  display: block;
  transform-origin: center;
  transition: transform var(--epoptic-animated-duration) var(--epoptic-animated-ease);
  will-change: transform;
}

.epoptic-animated-button__icon {
  width: var(--epoptic-animated-height);
  border-radius: 50%;
  background: var(--epoptic-animated-icon-bg);
  display: inline-grid;
  place-items: center;
  flex: 0 0 var(--epoptic-animated-height);
  color: var(--epoptic-animated-icon);
  overflow: hidden;
}

.epoptic-animated-button__icon i,
.epoptic-animated-button__icon i::before,
.epoptic-animated-button__icon svg,
.epoptic-animated-button__icon svg * {
  color: var(--epoptic-animated-icon) !important;
}

.epoptic-animated-button__icon svg {
  width: var(--epoptic-animated-icon-size);
  height: var(--epoptic-animated-icon-size);
  fill: currentColor !important;
}

.epoptic-animated-button__icon svg:not(.epoptic-animated-button__icon-mark) * {
  fill: currentColor !important;
}

.epoptic-animated-button__icon svg.epoptic-animated-button__icon-mark {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.epoptic-animated-button__icon svg.epoptic-animated-button__icon-mark * {
  fill: none !important;
  stroke: currentColor !important;
}

.epoptic-animated-button__icon i,
.epoptic-animated-button__icon svg {
  font-size: var(--epoptic-animated-icon-size);
  transform: rotate(45deg);
  transition:
    transform var(--epoptic-animated-duration) var(--epoptic-animated-ease),
    color 340ms var(--epoptic-animated-ease);
  will-change: transform;
}

.epoptic-animated-button--straight-icon .epoptic-animated-button__icon i,
.epoptic-animated-button--straight-icon .epoptic-animated-button__icon svg {
  transform: rotate(0deg);
}

.epoptic-animated-button:hover,
.epoptic-animated-button:focus-visible {
  gap: 0;
  color: var(--epoptic-animated-text-hover);
  outline: none;
}

.epoptic-animated-button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--epoptic-animated-focus) 42%, transparent);
}

.epoptic-animated-button:hover::before,
.epoptic-animated-button:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.epoptic-animated-button:hover .epoptic-animated-button__label,
.epoptic-animated-button:focus-visible .epoptic-animated-button__label {
  background: var(--epoptic-animated-label-bg-hover);
  border-color: var(--epoptic-animated-border-hover);
  color: var(--epoptic-animated-text-hover);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  transform: scale(var(--epoptic-animated-hover-scale));
  margin-right: -1px;
}

.epoptic-animated-button:hover .epoptic-animated-button__label-text,
.epoptic-animated-button:focus-visible .epoptic-animated-button__label-text {
  transform: scale(var(--epoptic-animated-text-scale));
}

.epoptic-animated-button:hover .epoptic-animated-button__icon,
.epoptic-animated-button:focus-visible .epoptic-animated-button__icon {
  background: var(--epoptic-animated-icon-bg-hover);
  border-color: var(--epoptic-animated-border-hover);
  color: var(--epoptic-animated-icon-hover);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  transform: scale(var(--epoptic-animated-hover-scale));
  margin-left: -1px;
}

.epoptic-animated-button:hover .epoptic-animated-button__icon i,
.epoptic-animated-button:focus-visible .epoptic-animated-button__icon i,
.epoptic-animated-button:hover .epoptic-animated-button__icon i::before,
.epoptic-animated-button:focus-visible .epoptic-animated-button__icon i::before,
.epoptic-animated-button:hover .epoptic-animated-button__icon svg,
.epoptic-animated-button:focus-visible .epoptic-animated-button__icon svg,
.epoptic-animated-button:hover .epoptic-animated-button__icon svg *,
.epoptic-animated-button:focus-visible .epoptic-animated-button__icon svg * {
  color: var(--epoptic-animated-icon-hover) !important;
}

.epoptic-animated-button:hover .epoptic-animated-button__icon i,
.epoptic-animated-button:focus-visible .epoptic-animated-button__icon i,
.epoptic-animated-button:hover .epoptic-animated-button__icon svg,
.epoptic-animated-button:focus-visible .epoptic-animated-button__icon svg {
  transform: rotate(0deg);
}

.epoptic-animated-button:active .epoptic-animated-button__label,
.epoptic-animated-button:active .epoptic-animated-button__icon {
  transform: scale(0.975);
}

@media (max-width: 767px) {
  /*
   * Size the button to its own container instead of the viewport (100vw) so it
   * can never cause horizontal page overflow, whatever gutter the surrounding
   * section uses. The pill drops its fixed 360px min-width and shrinks to fit,
   * truncating the label with an ellipsis; the icon keeps its size.
   */
  .epoptic-animated-button {
    max-width: 100%;
    min-width: 0;
  }

  .epoptic-animated-button__label {
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    padding: 0 min(var(--epoptic-animated-label-pad), 20px);
  }

  .epoptic-animated-button__label-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/*
 * Touch devices: neutralise the hover "fill + split" animation. On a phone or
 * tablet a tap leaves :hover stuck, so the button froze in its dark hover state
 * (and the label clipped). For pointers that cannot truly hover we hold the
 * button in its resting state; the press feedback (:active) and keyboard
 * :focus-visible stay intact, and desktop hover is completely untouched.
 */
@media (hover: none) {
  .epoptic-animated-button:hover {
    gap: var(--epoptic-animated-gap);
    color: var(--epoptic-animated-text);
  }

  .epoptic-animated-button:hover::before {
    opacity: 0;
    transform: scale(0.992);
  }

  .epoptic-animated-button:hover .epoptic-animated-button__label {
    background: var(--epoptic-animated-label-bg);
    border-color: var(--epoptic-animated-border);
    color: var(--epoptic-animated-text);
    border-radius: var(--epoptic-animated-radius);
    transform: none;
    margin-right: 0;
  }

  .epoptic-animated-button:hover .epoptic-animated-button__label-text {
    transform: none;
  }

  .epoptic-animated-button:hover .epoptic-animated-button__icon {
    background: var(--epoptic-animated-icon-bg);
    border-color: var(--epoptic-animated-border);
    color: var(--epoptic-animated-icon);
    border-radius: 50%;
    transform: none;
    margin-left: 0;
  }

  .epoptic-animated-button:hover .epoptic-animated-button__icon i,
  .epoptic-animated-button:hover .epoptic-animated-button__icon svg,
  .epoptic-animated-button:hover .epoptic-animated-button__icon svg * {
    color: var(--epoptic-animated-icon) !important;
  }

  .epoptic-animated-button:hover .epoptic-animated-button__icon i,
  .epoptic-animated-button:hover .epoptic-animated-button__icon svg {
    transform: rotate(45deg);
  }

  .epoptic-animated-button--straight-icon:hover .epoptic-animated-button__icon i,
  .epoptic-animated-button--straight-icon:hover .epoptic-animated-button__icon svg {
    transform: rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .epoptic-animated-button,
  .epoptic-animated-button::before,
  .epoptic-animated-button__label,
  .epoptic-animated-button__icon,
  .epoptic-animated-button__label-text,
  .epoptic-animated-button__icon i,
  .epoptic-animated-button__icon svg {
    transition-duration: 1ms;
  }
}
