/* Unified favorite/heart button styles across the site */
.btn-favorite,
.heart-btn {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;

  display: inline-flex;
  position: relative;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  flex: 0 0 32px; /* fix width in flex rows */
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 0; /* remove inline baseline gap */
  overflow: hidden; /* keep scaled svg inside */
  contain: layout paint; /* isolate transforms */
  transform: translateZ(0); /* new layer */
  transition: color 0.2s ease;

  color: #dc3545; /* Bootstrap danger red */
}

.btn-favorite:focus,
.btn-favorite:active,
.heart-btn:focus,
.heart-btn:active {
  outline: none;
  box-shadow: none;
  background-color: transparent;
}

.btn-favorite svg,
.heart-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor; /* take from button color */
  display: block; /* avoid inline baseline jitter */
}

.btn-favorite:hover,
.heart-btn:hover {
  color: #f25f73;
}

.btn-favorite:active,
.heart-btn:active {
  color: #c82333;
}

.btn-favorite .spinner-border,
.heart-btn .spinner-border {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Keep visual stable while disabled */
.btn-favorite[disabled],
.heart-btn[disabled] {
  opacity: 1;
}
