/* Design Likes
   ---------------------------------------------------------------------------
   Deliberately self-contained: the plugin owns its own visually-hidden helper
   and its own colours rather than reaching into the theme's variables, so it
   still looks sane under a different theme. Where the host theme does define
   the shop tokens (--color-sky-*, --sk-radius-sm), the var() fallbacks below
   quietly defer to them. */

.skdl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skdl-like-wrap {
  display: inline-flex;
  align-items: center;
}

.skdl-like {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  /* 44px tall so it is a comfortable touch target on a product card. */
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  background: transparent;
  border: 1px solid var(--color-sky-300, #B8D2E2);
  border-radius: var(--sk-radius-pill, 999px);
  color: var(--color-sky-600, #3D6F88);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.skdl-like:hover {
  border-color: var(--color-sky-500, #5B8FA8);
  background-color: rgba(91, 143, 168, 0.08);
}

.skdl-like__icon {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.skdl-like svg { display: block; }

/* Liked: the outline fills in. The stroke stays so the shape holds at small
   sizes and in forced-colours mode. */
.skdl-like.is-liked {
  color: #C25E5E;
  border-color: rgba(194, 94, 94, 0.5);
}
.skdl-like.is-liked svg path { fill: currentColor; }
.skdl-like.is-liked .skdl-like__icon { transform: scale(1.08); }

/* Before hydration the button is honest about not being usable yet: it shows
   the public count, but cannot be pressed. */
.skdl-like[disabled] {
  opacity: 0.55;
  cursor: default;
}

.skdl-like.is-busy { opacity: 0.7; }

.skdl-like-wrap.has-error .skdl-like {
  border-color: var(--color-error, #E39B9B);
  color: #B06565;
}

.skdl-like:focus-visible {
  outline: 2px solid var(--color-sky-600, #3D6F88);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(61, 111, 136, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .skdl-like,
  .skdl-like__icon {
    transition: none;
  }
  .skdl-like.is-liked .skdl-like__icon { transform: none; }
}
