/* ==========================================================================
   CSS: CURATORS CATALOG / CURATOR CARDS
   ========================================================================== */

.curators-catalog-panel {
  position: relative;
  z-index: 3;
  overflow: visible;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: rgba(53, 53, 60, 0.55);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  background-image: var(--grain-bg);
  background-size: 20px 20px;
  background-blend-mode: overlay;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}

.curators-catalog-panel .search-input,
.curators-catalog-panel .custom-select,
.curators-catalog-panel .custom-select .selected,
.curators-catalog-panel .curators-genre-trigger,
.curators-catalog-panel .curators-follower-range-box {
  height: 42px;
}

.curators-catalog-panel .custom-select .selected,
.curators-catalog-panel .curators-genre-trigger,
.curators-catalog-panel .search-input,
.curators-catalog-panel .curators-follower-range-box {
  box-sizing: border-box;
}

.curators-catalog-row {
  display: contents;
}

.curators-sort-field {
  flex: 0 0 240px;
  min-width: 240px;
}

.curators-genres-field {
  flex: 0 0 140px;
  min-width: 140px;
}

.curators-followers-field {
  flex: 0 0 auto;
  min-width: 0;
}

.curators-search-field {
  flex: 0 0 220px;
  width: 220px;
  max-width: 220px;
  min-width: 220px;
  margin-left: auto;
}

.curators-genres-field .field-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curators-search-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.curators-search-wrap .search-input {
  padding-right: 78px;
}

.curators-search-inline-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.68);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.curators-search-inline-btn::before,
.curators-search-inline-btn::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.curators-search-inline-btn::before {
  transform: rotate(45deg);
}

.curators-search-inline-btn::after {
  transform: rotate(-45deg);
}

.curators-search-wrap.has-value .curators-search-inline-btn {
  opacity: 1;
  pointer-events: auto;
}

.curators-search-inline-btn:hover,
.curators-search-inline-btn:focus-visible {
  color: #f3f3f3;
  background: rgba(132, 170, 251, 0.14);
  outline: none;
}


.saved-search-open-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  cursor: pointer;
  transition: right 0.18s ease, color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
  z-index: 7;
}

.curators-search-wrap.has-value .saved-search-open-btn {
  right: 38px;
}

.saved-search-open-btn:hover,
.saved-search-open-btn:focus-visible,
.saved-search-open-btn.is-active {
  color: #f3f3f3;
  background: rgba(132, 170, 251, 0.14);
  outline: none;
}

.saved-search-open-btn .ti {
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 1;
}


.saved-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(370px, calc(100vw - 24px));
  max-height: min(480px, calc(100vh - 145px));
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(132, 170, 251, 0.18);
  background: rgba(36, 35, 39, 0.98);
  background-image: var(--grain-bg);
  background-size: 20px 20px;
  background-blend-mode: overlay;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(-6px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60;
}

.saved-search-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.saved-search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.saved-search-panel-title {
  font-size: 14px;
  line-height: 1.2;
  color: var(--text);
}

.saved-search-panel-count {
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

.saved-search-list {
  max-height: min(405px, calc(100vh - 210px));
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #282828 transparent;
}

.saved-search-list::-webkit-scrollbar {
  width: 4px;
}

.saved-search-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.saved-search-list::-webkit-scrollbar-thumb {
  background: #282828;
  border-radius: 999px;
}

.saved-search-empty {
  padding: 18px 14px 20px;
  text-align: center;
}

.saved-search-empty-title {
  font-size: 14px;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 6px;
}

.saved-search-empty-note {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.saved-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
  user-select: none;
  position: relative;
  max-height: 64px;
  transition: background-color 0.16s ease, border-color 0.16s ease, opacity 0.18s ease, transform 0.18s ease, max-height 0.2s ease, height 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}

.saved-search-item + .saved-search-item {
  margin-top: 4px;
}

.saved-search-item:hover,
.saved-search-item:focus-within {
  background: rgba(132, 170, 251, 0.09);
  border-color: rgba(132, 170, 251, 0.18);
}

.saved-search-list.is-reordering .saved-search-item:hover,
.saved-search-list.is-reordering .saved-search-item:focus-within {
  background: transparent;
  border-color: transparent;
}

.saved-search-list.is-reordering .saved-search-item:not(.is-dragging) {
  transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease, transform 0.12s ease;
}

.saved-search-item.is-dragging {
  opacity: 0.42;
  background: transparent;
  border-color: transparent;
  transform: scale(0.995);
}

.saved-search-drop-gap {
  height: 12px;
  margin: 3px 8px;
  border-radius: 999px;
  background: rgba(132, 170, 251, 0.16);
  border: 1px solid rgba(132, 170, 251, 0.26);
  pointer-events: none;
  transition: height 0.12s ease, margin 0.12s ease, opacity 0.12s ease;
}

 .saved-search-item.is-removing {
  opacity: 0;
  transform: none;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.08s ease;
}

.saved-search-item.is-removing > * {
  opacity: 0;
  transition: opacity 0.06s ease;
}

.saved-search-item.is-removing.is-collapsing {
  visibility: hidden;
  min-height: 0;
  max-height: 0 !important;
  height: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  transition: max-height 0.18s ease, height 0.18s ease, margin 0.18s ease, padding 0.18s ease, border-width 0.18s ease;
}

.saved-search-item-thumb,
.saved-search-item-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(132, 170, 251, 0.14);
  color: rgba(243,243,243,0.9);
}

.saved-search-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.saved-search-item-thumb.is-curator,
.saved-search-item-icon.is-curator {
  border-radius: 50%;
}

.saved-search-item-icon .ti {
  width: 18px;
  height: 18px;
}

.saved-search-item-main {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.saved-search-item-title {
  font-size: 13px;
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-search-item-sub {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-search-item-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.saved-search-drag-handle,
.saved-search-delete-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.52);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.saved-search-drag-handle {
  cursor: grab;
  touch-action: none;
}

.saved-search-drag-handle:active {
  cursor: grabbing;
}

.saved-search-drag-handle:hover,
.saved-search-delete-btn:hover,
.saved-search-drag-handle:focus-visible,
.saved-search-delete-btn:focus-visible {
  color: #f3f3f3;
  background: rgba(132, 170, 251, 0.12);
  outline: none;
}

