.app-star-rating {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--color-border, #d9e0e4);
  border-radius: 1rem;
  background: var(--color-surface, #fff);
}

.app-star-rating legend {
  padding-inline: 0.45rem;
  color: var(--color-text, #17252a);
  font-weight: 700;
}

.app-star-rating__control {
  display: flex;
  direction: ltr;
  gap: clamp(0.35rem, 2vw, 0.75rem);
}

.app-star-rating__control label {
  position: relative;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  margin: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.app-star-rating__control label:hover {
  background: #fff7df;
  transform: translateY(-2px);
}

.app-star-rating__control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.app-star-rating__control i {
  color: #d5d9dc;
  font-size: 1.85rem;
  line-height: 1;
  transition: color 160ms ease, transform 160ms ease;
}

.app-star-rating__control .bi-star-fill {
  color: #f5a623;
  filter: drop-shadow(0 3px 5px rgb(245 166 35 / 22%));
}

.app-star-rating__control input:checked + i {
  transform: scale(1.12);
}

.app-star-rating__control input:focus-visible + i {
  border-radius: 50%;
  outline: 3px solid rgb(8 127 140 / 22%);
  outline-offset: 0.3rem;
}

.app-star-rating__control input:disabled + i {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-star-rating output {
  color: var(--color-text-muted, #68777d);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .app-star-rating__control label,
  .app-star-rating__control i {
    transition: none;
  }
}
