.clap-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.clap-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
}

/* --- Button shape modifiers --- */
.clap-btn--circle {
  padding: 8px 18px;
  border: 2px solid #bbb;
  border-radius: 50px;
}
.clap-btn--square {
  padding: 8px 18px;
  border: 2px solid #bbb;
  border-radius: 6px;
}

.clap-btn:hover {
  color: var(--clap-accent, #C11920);
}
.clap-btn--circle:hover,
.clap-btn--square:hover {
  border-color: var(--clap-accent, #C11920);
}

.clap-btn.is-clicked {
  color: var(--clap-accent, #C11920);
}
.clap-btn--circle.is-clicked,
.clap-btn--square.is-clicked {
  border-color: var(--clap-accent, #C11920);
}

/* --- Icon fill modifier --- */
.clap-btn--filled .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

/* --- Animation: pop (rotate + scale) --- */
.clap-btn--anim-pop.is-animating,
.clap-btn:not([class*="clap-btn--anim-"]).is-animating {
  animation: clap-pop 0.45s ease;
}
@keyframes clap-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.35) rotate(-8deg); }
  65%  { transform: scale(0.95) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* --- Animation: bounce --- */
.clap-btn--anim-bounce.is-animating {
  animation: clap-bounce 0.4s ease;
}
@keyframes clap-bounce {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.4); }
  50%  { transform: scale(0.85); }
  75%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* --- Animation: pulse --- */
.clap-btn--anim-pulse.is-animating {
  animation: clap-pulse 0.6s ease;
}
@keyframes clap-pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.25); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Animation: float --- */
.clap-btn--anim-float.is-animating {
  animation: clap-float 0.5s ease-out;
}
@keyframes clap-float {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(-8px) scale(1.2); }
  100% { transform: translateY(0) scale(1); }
}

.clap-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
}

.clap-icon .material-symbols-outlined {
  font-size: inherit;
  line-height: 1;
}

.clap-icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  vertical-align: middle;
}
.clap-icon .material-symbols-outlined {
  vertical-align: middle;
}

.clap-count {
  font-size: 12px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.clap-label {
  font-size: 14px;
  color: #777;
}

.clap-btn.is-rate-limited {
  opacity: 0.4;
  pointer-events: none;
  color: #ccc;
}

@media (max-width: 720px) {
  .clap-icon {
    font-size: 30px;
  }
  .clap-icon-img {
    width: 30px;
    height: 30px;
  }
  .clap-btn {
    min-width: 44px;
    min-height: 44px;
  }
}
