/* Native like/dislike buttons: hidden ONLY once the star bar is really on screen (the client adds this class). */
body.star-rating-active my-video-rate {
  display: none !important;
}

.star-rating {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-right: 12px;
}

.star-rating.is-busy .star-rating-stars {
  opacity: 0.55;
}

.star-rating-stars {
  display: inline-flex;
  align-items: center;
}

.star-rating .star-rating-star {
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0 1px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: rgba(128, 128, 128, 0.45);
  transition: color 0.12s ease, transform 0.12s ease;
}

.star-rating .star-rating-star.is-average {
  color: color-mix(in srgb, var(--mainColor, #f2690d) 55%, rgba(128, 128, 128, 0.45));
}

.star-rating .star-rating-star.is-mine {
  color: var(--mainColor, #f2690d);
}

.star-rating .star-rating-star:hover:not(:disabled) {
  transform: scale(1.15);
}

.star-rating .star-rating-star:disabled {
  cursor: progress;
}

.star-rating.is-readonly .star-rating-star {
  cursor: help;
}

.star-rating .star-rating-star:focus-visible {
  outline: 2px solid var(--mainColor, #f2690d);
  outline-offset: 2px;
  border-radius: 4px;
}

.star-rating .star-rating-summary {
  font-size: 14px;
  opacity: 0.9;
  white-space: nowrap;
}

/* Stars next to the author of a comment */
.star-rating-comment {
  margin-left: 6px;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--mainColor, #f2690d);
  cursor: help;
  white-space: nowrap;
}

/* Average stars next to a video title in the lists. The title container is a flex row. */
.star-rating-miniature {
  flex: 0 0 auto;
  margin-left: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--mainColor, #f2690d);
  cursor: help;
}

/* An estimate (made only from old likes/dislikes) is a little softer than a real rating */
.star-rating-miniature.is-estimate {
  font-weight: 500;
  opacity: 0.85;
}
.comment-votes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-inline-end: 12px;
  vertical-align: middle;
}

.comment-votes .comment-votes-button {
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 90%;
  line-height: 1.4;
  color: var(--fg-300, rgba(128, 128, 128, 0.9));
  cursor: pointer;
  border-radius: 4px;
  filter: grayscale(1);
  opacity: 0.7;
  transition: opacity 0.12s ease, filter 0.12s ease;
}

.comment-votes .comment-votes-button:hover:not(.is-readonly) {
  opacity: 1;
  filter: none;
}

.comment-votes .comment-votes-button.is-mine {
  opacity: 1;
  filter: none;
  font-weight: 600;
  color: var(--mainColor, #f2690d);
}

.comment-votes .comment-votes-button.is-readonly {
  cursor: help;
}

.comment-votes .comment-votes-button:focus-visible {
  outline: 2px solid var(--mainColor, #f2690d);
  outline-offset: 2px;
}

.comment-votes .comment-votes-count:empty {
  display: none;
}

/* ----- the creator's heart (next to the votes) ----- */
.comment-votes .comment-votes-heart {
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 90%;
  line-height: 1.4;
  color: var(--fg-300, rgba(128, 128, 128, 0.9));
  cursor: pointer;
  border-radius: 4px;
}

.comment-votes .comment-votes-heart[hidden] {
  display: none;
}

.comment-votes .comment-votes-heart:not(.is-given) {
  filter: grayscale(1);
  opacity: 0.55;
  transition: opacity 0.12s ease;
}

.comment-votes .comment-votes-heart:not(.is-given):hover {
  opacity: 1;
}

.comment-votes .comment-votes-heart.is-given {
  color: #e0245e;
  font-weight: 600;
}

.comment-votes .comment-votes-heart.is-readonly {
  cursor: help;
}

.comment-votes .comment-votes-heart-label:empty {
  display: none;
}

.comment-votes .comment-votes-heart:focus-visible {
  outline: 2px solid var(--mainColor, #f2690d);
  outline-offset: 2px;
}

/* ----- the notices: "the creator gave a heart to your comment" ----- */
.comment-hearts-notices {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}

.comment-hearts-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-secondary-500, #2a2a2a);
  color: var(--fg, #f2f2f2);
  border: 1px solid var(--border-color, rgba(128, 128, 128, 0.35));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.comment-hearts-notice-icon {
  font-size: 20px;
  line-height: 1;
}

.comment-hearts-notice-link {
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.comment-hearts-notice-link:hover {
  text-decoration: underline;
}

.comment-hearts-notice-close,
.comment-hearts-notices-all {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
}

.comment-hearts-notice-close {
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
}

.comment-hearts-notice-close:hover,
.comment-hearts-notices-all:hover {
  opacity: 1;
}

.comment-hearts-notices-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 85%;
  padding: 0 4px;
  color: var(--fg, #f2f2f2);
}

.comment-hearts-notices-all {
  text-decoration: underline;
  font-size: inherit;
}

/* ----- the notice inside the bell (badge on the button + entries at the top of the list) ----- */
.comment-hearts-badge {
  position: absolute;
  right: 0;
  bottom: 5px;
  background-color: #e0245e;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  border-radius: 16px;
  line-height: 16px;
  padding: 0 4px;
  min-width: 16px;
  text-align: center;
  pointer-events: none; /* the click goes to the bell */
}

.comment-hearts-native {
  margin-bottom: 0.5rem;
}

/* "You have no notifications" must not appear above/below our entries */
.comment-hearts-native ~ .no-notification {
  display: none;
}

.comment-hearts-native-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 2px solid var(--primary, #f2690d);
  background-color: var(--bg, #1c2030);
  color: inherit;
}

.comment-hearts-native-item:hover {
  background-color: var(--bg-secondary-300, rgba(128, 128, 128, 0.25));
}

.comment-hearts-native-item .comment-hearts-notice-icon {
  font-size: 18px;
  line-height: 1;
}

.comment-hearts-native-item .comment-hearts-notice-link {
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* the whole row opens the comment */
.comment-hearts-native-item .comment-hearts-notice-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.comment-hearts-native-item .comment-hearts-notice-time {
  font-size: 80%;
  white-space: nowrap;
  opacity: 0.65;
}

.comment-hearts-native-item .comment-hearts-notice-close {
  position: relative;
  z-index: 1; /* above the stretched link */
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
}

.comment-hearts-native-item .comment-hearts-notice-close:hover {
  opacity: 1;
}

.comment-hearts-native-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 85%;
  padding: 0 4px 0.5rem;
}

.comment-hearts-native-footer .comment-hearts-notices-all {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
}
