:host {
  --size-xs: var(--wa-space-s);
  --size-s: var(--wa-space-m);
  --size-m: var(--wa-space-l);
  --size-l: var(--wa-space-xl);

  --symbol-color: var(--wa-color-neutral-fill-normal);
  --symbol-color-active: var(--wa-color-yellow-70);
  --symbol-size: var(--wa-size);
  --symbol-spacing: var(--wa-space-3xs);

  display: inline-flex;
}

.rating {
  position: relative;
  display: inline-flex;
  border-radius: var(--wa-border-radius-m);
  vertical-align: middle;
}

.rating:focus {
  outline: none;
}

.rating:focus-visible {
  outline: var(--wa-focus-ring);
  outline-offset: var(--wa-focus-ring-offset);
}

.symbols {
  display: inline-flex;
  position: relative;
  line-height: 0;
  color: var(--symbol-color);
  white-space: nowrap;
  cursor: pointer;
}

.symbols > * {
  padding: var(--symbol-spacing);
}

.symbol--active,
.partial--filled {
  color: var(--symbol-color-active);
}

.partial-symbol-container {
  position: relative;
}

.partial--filled {
  position: absolute;
  top: var(--symbol-spacing);
  left: var(--symbol-spacing);
}

.symbol {
  transition: scale var(--wa-transition-normal) var(--wa-transition-easing);
  pointer-events: none;
}

.symbol--hover {
  scale: 1.2;
}

.rating--readonly .symbols {
  cursor: default;
}

:host([disabled]) .symbol--hover,
.rating--readonly .symbol--hover {
  scale: none;
}

:host([disabled]) {
  opacity: 0.5;
}

:host([disabled]) .symbols {
  cursor: not-allowed;
}

/* Forced colors mode */
@media (forced-colors: active) {
  .symbol--active {
    color: SelectedItem;
  }
}
