/* Animação de duas setas da MissaciWeb, com as cores da Salmasso & Coelho. */
.btn-motion:is(.btn, .map-button) {
  --motion-fill: var(--gold-bright);
  --motion-ink: var(--ink);
  --motion-ease: cubic-bezier(.16, 1, .3, 1);
  position: relative;
  isolation: isolate;
  overflow: clip;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding-inline: 34px;
  transition: color 180ms var(--motion-ease);
}

.btn-motion:is(.btn-gold, .map-button) {
  --motion-fill: var(--ink);
  --motion-ink: var(--gold-bright);
}

.btn-motion:is(.btn, .map-button):is(:hover, :active, :focus-visible) { transform: none; }

.btn-motion > .btn-motion-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-width: 0;
  overflow-wrap: break-word;
  transform: translateX(-8px);
  transition: transform 520ms var(--motion-ease);
}

.btn-motion-label > svg { flex: 0 0 auto; }

.btn-motion > .btn-motion-arrow {
  position: absolute;
  z-index: 2;
  top: calc(50% - 9px);
  width: 18px;
  height: 18px;
  fill: currentColor;
  pointer-events: none;
  transition: transform 520ms var(--motion-ease);
}

.btn-motion > .btn-motion-out { right: 12px; }
.btn-motion > .btn-motion-in { left: 12px; transform: translateX(-56px); }

.btn-motion > .btn-motion-circle {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: calc(100% + 64px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--motion-fill);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.03);
  transition: transform 620ms var(--motion-ease), opacity 160ms var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
  .btn-motion:is(.btn, .map-button):hover:not(:focus-visible) { color: var(--motion-ink); }
  .btn-motion.btn-ink:hover:not(:focus-visible) { background: var(--ink); }
  .btn-motion.btn-outline:hover:not(:focus-visible) { background: transparent; border-color: var(--gold); }
  .btn-motion:hover:not(:focus-visible) > .btn-motion-label { transform: translateX(8px); }
  .btn-motion:hover:not(:focus-visible) > .btn-motion-out { transform: translateX(56px); }
  .btn-motion:hover:not(:focus-visible) > .btn-motion-in { transform: translateX(0); }
  .btn-motion:hover:not(:focus-visible) > .btn-motion-circle {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.btn-motion:is(.btn, .map-button):focus-visible,
.btn-motion:focus-visible > :is(.btn-motion-label, .btn-motion-arrow, .btn-motion-circle) { transition: none; }

@media (hover: none), (pointer: coarse) {
  .btn-motion:is(.btn, .map-button):active {
    color: var(--motion-ink);
    background: var(--motion-fill);
  }
  .btn-motion:active > .btn-motion-circle { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-motion:is(.btn, .map-button),
  .btn-motion > :is(.btn-motion-label, .btn-motion-arrow, .btn-motion-circle) { transition: none !important; }
  .btn-motion > :is(.btn-motion-label, .btn-motion-out) { transform: none !important; }
  .btn-motion > :is(.btn-motion-in, .btn-motion-circle) { display: none; }
  .btn-motion:is(.btn, .map-button):hover:not(:focus-visible) {
    color: var(--motion-ink);
    background: var(--motion-fill);
  }
}

@media (forced-colors: active) {
  .btn-motion:is(.btn, .map-button) { border: 2px solid ButtonText; }
  .btn-motion > .btn-motion-circle { display: none; }
}
