/* =========================================================
   Theta Smart Catalog merged
========================================================= */

.theta-smart-similar-btn {
  position: absolute;
  right: 58px;
  bottom: 12px;
  z-index: 7;
  border: 1px solid rgba(155,232,255,.22);
  background: rgba(3,3,5,.64);
  color: rgba(255,255,255,.76);
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: .22s ease;
}

.theta-track-row:hover .theta-smart-similar-btn {
  opacity: 1;
  transform: translateY(0);
}

.theta-smart-similar-btn:hover {
  color: #9be8ff;
  border-color: rgba(155,232,255,.7);
  box-shadow: 0 0 20px rgba(155,232,255,.14);
}

.theta-smart-similar-panel {
  position: fixed;
  right: 24px;
  top: 108px;
  z-index: 9998;
  width: min(420px, calc(100vw - 48px));
  max-height: calc(100vh - 180px);
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(155,232,255,.12), transparent 34%),
    rgba(8,8,14,.94);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 34px 120px rgba(0,0,0,.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: .25s ease;
}

.theta-smart-similar-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.theta-smart-similar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}

.theta-smart-similar-head span {
  display: block;
  color: #9be8ff !important;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.theta-smart-similar-head strong {
  display: block;
  color: #fff !important;
  font-size: 22px;
  letter-spacing: -.04em;
}

.theta-smart-similar-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
}

.theta-smart-similar-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.theta-smart-similar-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: .22s ease;
}

.theta-smart-similar-item:hover {
  background: rgba(155,232,255,.08);
  border-color: rgba(155,232,255,.18);
}

.theta-smart-similar-cover {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #111 center/cover no-repeat;
}

.theta-smart-similar-info {
  min-width: 0;
}

.theta-smart-similar-info strong {
  display: block;
  color: #fff !important;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theta-smart-similar-info small {
  display: block;
  color: #aeb0c2 !important;
  font-size: 11px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theta-smart-similar-score {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #030305 !important;
  background: linear-gradient(135deg, #9be8ff, #b49cff);
  font-size: 10px;
  font-weight: 900;
}

.theta-smart-empty {
  color: #aeb0c2 !important;
  padding: 18px;
  margin: 0;
}

@media(max-width: 900px) {
  .theta-smart-similar-btn {
    opacity: 1;
    transform: none;
    right: 52px;
    bottom: 10px;
  }

  .theta-smart-similar-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 92px;
    width: auto;
    max-height: 54vh;
  }
}


/* =========================================================
   v10 layout refinements
========================================================= */

/* Play button becomes a mini album-cover button */
.theta-track-row-play.theta-track-play-cover,
.theta-track-play.theta-track-play-cover {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(3,3,5,.36), rgba(3,3,5,.36)),
    var(--theta-track-cover) center/cover no-repeat !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.18) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

.theta-track-row-play.theta-track-play-cover::before,
.theta-track-play.theta-track-play-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(155,232,255,.10), rgba(0,0,0,.28));
  pointer-events: none;
}

.theta-track-row-play.theta-track-play-cover:hover,
.theta-track-play.theta-track-play-cover:hover {
  transform: scale(1.06);
  border-color: rgba(155,232,255,.72) !important;
  box-shadow: 0 0 24px rgba(155,232,255,.18), 0 12px 32px rgba(0,0,0,.45);
}

/* Similar button is now inline between title and tags */
.theta-track-row .theta-smart-similar-btn {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  opacity: 1 !important;
  transform: none !important;
  justify-self: start;
  align-self: center;
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  min-height: 32px;
}

/* Queue button appears after duration/timecode */
.theta-track-row .theta-add-to-queue {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  opacity: 1 !important;
  transform: none !important;
  justify-self: center;
  align-self: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

/* Add two columns when Similar + Queue are present */
.theta-track-row {
  grid-template-columns: auto 1fr auto minmax(160px, auto) 60px auto !important;
}

@media(max-width: 900px) {
  .theta-track-row {
    grid-template-columns: auto 1fr auto !important;
  }

  .theta-track-row .theta-smart-similar-btn,
  .theta-track-row .theta-track-row-tags,
  .theta-track-row .theta-track-row-duration {
    display: none !important;
  }

  .theta-track-row .theta-add-to-queue {
    display: inline-flex !important;
  }
}
