.tvd-sr-widget {
  --tvd-sr-active: #f59e0b;
  --tvd-sr-inactive: #cbd5e1;
  --tvd-sr-hover: #fbbf24;
  --tvd-sr-size: 24px;
  --tvd-sr-gap: 4px;
  --tvd-sr-text: var(--tvdm-text, #1f2937);
  --tvd-sr-muted: var(--tvdm-text-muted, #64748b);
  --tvd-sr-bg: var(--tvdm-surface-soft, rgba(248, 250, 252, 0.72));
  --tvd-sr-border: var(--tvdm-border, rgba(15, 23, 42, 0.1));

  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 14px 0;
  padding: 10px 14px;
  border: 1px solid var(--tvd-sr-border);
  border-radius: 10px;
  background: var(--tvd-sr-bg);
  color: var(--tvd-sr-text);
  font-size: 14px;
  line-height: 1.4;
  max-width: 100%;
  box-sizing: border-box;
}

html.tvd-theme-dark .tvd-sr-widget,
body.tvd-theme-dark .tvd-sr-widget {
  --tvd-sr-inactive: #475569;
  --tvd-sr-text: var(--tvdm-text, #f8fafc);
  --tvd-sr-muted: var(--tvdm-text-muted, #aeb8c7);
  --tvd-sr-bg: var(--tvdm-surface-soft, rgba(30, 41, 59, 0.78));
  --tvd-sr-border: var(--tvdm-border, rgba(226, 232, 240, 0.16));
}

.tvd-sr-widget.tvd-sr-size-sm {
  --tvd-sr-size: 18px;
  padding: 6px 10px;
  font-size: 13px;
}

.tvd-sr-widget.tvd-sr-size-md {
  --tvd-sr-size: 24px;
}

.tvd-sr-widget.tvd-sr-size-lg {
  --tvd-sr-size: 30px;
  padding: 12px 16px;
  font-size: 15px;
}

.tvd-sr-stars {
  display: inline-flex;
  align-items: center;
  gap: var(--tvd-sr-gap);
}

.tvd-sr-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tvd-sr-size);
  height: var(--tvd-sr-size);
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.14s ease;
  color: inherit;
}

.tvd-sr-widget.is-readonly .tvd-sr-star,
.tvd-sr-widget.is-loading .tvd-sr-star {
  cursor: default;
}

.tvd-sr-widget:not(.is-readonly):not(.is-loading) .tvd-sr-star:hover {
  transform: scale(1.12);
}

.tvd-sr-star:focus-visible {
  outline: 2px solid var(--tvd-sr-active);
  outline-offset: 2px;
  border-radius: 4px;
}

.tvd-sr-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tvd-sr-stop-active {
  stop-color: var(--tvd-sr-active);
}

.tvd-sr-stop-inactive {
  stop-color: var(--tvd-sr-inactive);
}

.tvd-sr-star.is-hover .tvd-sr-stop-active,
.tvd-sr-star.is-hover .tvd-sr-stop-inactive {
  stop-color: var(--tvd-sr-hover);
}

.tvd-sr-star.is-dimmed .tvd-sr-stop-active,
.tvd-sr-star.is-dimmed .tvd-sr-stop-inactive {
  stop-color: var(--tvd-sr-inactive);
}

.tvd-sr-legend {
  font-weight: 500;
  color: var(--tvd-sr-text);
  white-space: nowrap;
}

.tvd-sr-status {
  font-size: 13px;
  color: var(--tvd-sr-muted);
}

.tvd-sr-status:empty {
  display: none;
}

.tvd-sr-status.is-success {
  color: #059669;
}

html.tvd-theme-dark .tvd-sr-status.is-success,
body.tvd-theme-dark .tvd-sr-status.is-success {
  color: #34d399;
}

.tvd-sr-status.is-error {
  color: #dc2626;
}

html.tvd-theme-dark .tvd-sr-status.is-error,
body.tvd-theme-dark .tvd-sr-status.is-error {
  color: #f87171;
}

@media (max-width: 600px) {
  .tvd-sr-widget {
    width: 100%;
    justify-content: space-between;
    padding: 10px 12px;
  }

  .tvd-sr-legend {
    white-space: normal;
  }
}
