/* Compact preview styles for "Your Rated Songs" (left column)
   Scoped to .rated-preview so it doesn't affect the main ratings area.
*/

/* Container visibility */
.rated-preview .ratings-list {
  overflow: visible;
}

/* Force preview rows to use a simple flex layout (override any grid rules). */
.rated-preview .ratings-list .ratings-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  padding-right: 12px; /* Adjusted for better spacing with score pill */
  border-bottom: 1px solid rgba(255,105,180,0.04);
  color: var(--color-muted, #ddd);
  min-height: 68px;
}

/* Song cell: cover + vertical text (left aligned) */
.rated-preview .ratings-list .ratings-list-row .song-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 150px; /* ensure text has enough space to display horizontally */
}

/* Cover thumbnail */
.rated-preview .ratings-list .ratings-list-row .song-cell img,
.rated-preview .ratings-list .ratings-list-row .song-cell .no-cover {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255,255,255,0.02);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Text block: stacked title + artist, left aligned and allowed to shrink */
.rated-preview .ratings-list .ratings-list-row .song-cell .song-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  min-width: 0; /* allow flex children to truncate properly */
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Title */
.rated-preview .ratings-list .ratings-list-row .song-cell .song-text strong {
  display: block;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  max-width: 100%;
  width: auto;
  line-height: 1.3;
  text-align: left;
  font-weight: 700;
  color: #fff;
}

/* Artist text */
.rated-preview .ratings-list .ratings-list-row .song-cell .song-text span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

/* Score sits at the end of the row and stays vertically centered.
   margin-left:auto pushes it to the far right, preventing overlap.
*/
.rated-preview .ratings-list .ratings-list-row .score-cell {
  margin-left: auto;
  margin-right: 0; /* Reset margin to prevent overlap */
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px; /* slightly larger reserved space so pill doesn't push layout */
  z-index: 2;
}

/* Ensure the score pill is in normal flow and not transformed/absolutely positioned */
.rated-preview .ratings-list .ratings-list-row .score-cell .score-pill,
.rated-preview .ratings-list .ratings-list-row .score-cell .preview-score-pill {
  position: relative;
  transform: none;
  margin: 0;
  display: inline-block;
  z-index: 2;
}

/* Keep the preview header simple and left-aligned */
.rated-preview .ratings-list .ratings-list-header {
  display: block;
  padding: 8px 12px;
}

/* Small screens adjustments */
@media (max-width: 480px) {
  .rated-preview .ratings-list .ratings-list-row {
    padding: 8px 6px;
    gap: 8px;
  }
  .rated-preview .ratings-list .ratings-list-row .song-cell img { width:48px; height:48px; flex:0 0 48px; }
  .rated-preview .ratings-list .ratings-list-row .score-cell { margin-left: 8px; min-width: 56px; margin-right: 10px; }
}

/* Polishes for the left-column preview (tighten spacing, center pill) */
.rated-preview .ratings-list .ratings-list-row {
  align-items: center;
  gap: 10px;
}

.rated-preview .ratings-list .ratings-list-row .song-cell .song-text span {
  font-size: 0.82rem;
}
