:host {
  display: inline-block;
}

.usr-rating {
  --star-size: 24px;

  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.usr-rating--small {
  --star-size: 16px;
}

.usr-rating--large {
  --star-size: 32px;
}

.usr-rating--disabled {
  opacity: 0.5;
}

.usr-rating__group,
.usr-rating__display {
  display: inline-flex;
  gap: 2px;
}

.usr-rating__star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--star-size);
  height: var(--star-size);
  padding: 0;
  border: none;
  background: transparent;
  color: var(--star-inactive-color, #d1d5db);
  font-size: var(--star-size);
  line-height: 1;
}

button.usr-rating__star {
  cursor: pointer;
}

button.usr-rating__star:disabled {
  cursor: not-allowed;
}

button.usr-rating__star:focus-visible {
  outline: 2px solid var(--star-active-color, #ffc107);
  outline-offset: 2px;
}

.usr-rating__star--filled {
  color: var(--star-active-color, #ffc107);
}

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