.wsp-overlay {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.42);
  box-sizing: border-box;
}

.wsp-card {
  width: min(440px, 100%);
  max-height: min(560px, 90vh);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.wsp-header,
.wsp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
}

.wsp-header {
  border-bottom: 1px solid #f0f0f0;
}

.wsp-title {
  margin: 0;
  color: #1d1d1f;
  font-size: 16px;
  font-weight: 600;
}

.wsp-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}

.wsp-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1d1d1f;
  cursor: pointer;
  text-align: left;
}

.wsp-item:hover {
  background: #f7f7f8;
}

.wsp-item.is-selected,
.wsp-item.is-selected:hover {
  background: #f1eeff;
  box-shadow: inset 3px 0 0 #6c5cff;
}

.wsp-item.is-selected .wsp-item-thumb {
  box-shadow: 0 0 0 2px #6c5cff;
}

.wsp-item-thumb {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #ece9ff, #d9d2ff);
  background-position: center;
  background-size: cover;
}

.wsp-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 100%;
  height: 100%;
  gap: 1px;
}

.wsp-thumb-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #e9e7f5 center / cover no-repeat;
}

.wsp-thumb-primary,
.wsp-thumb-extra {
  position: absolute;
  right: 2px;
  bottom: 2px;
  padding: 1px 3px;
  border-radius: 3px;
  color: #fff;
  font-size: 8px;
  line-height: 1.2;
}

.wsp-thumb-primary {
  background: #6c5cff;
}

.wsp-thumb-extra {
  background: rgba(29, 29, 31, 0.78);
  font-size: 11px;
}

.wsp-item-info {
  min-width: 0;
  flex: 1;
}

.wsp-item-name,
.wsp-item-tags {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wsp-item-name {
  font-size: 13px;
  font-weight: 600;
}

.wsp-item-tags {
  margin-top: 3px;
  color: #8e8e93;
  font-size: 12px;
}

.wsp-item-count {
  flex: 0 0 auto;
  color: #8e8e93;
  font-size: 11px;
  white-space: nowrap;
}

.wsp-secondary-button {
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: #f2f2f7;
  color: #3a3a3c;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.wsp-secondary-button:hover {
  background: #e5e5ea;
}

.wsp-close-button {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f2f7;
  color: #636366;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.wsp-close-button:hover {
  background: #e5e5ea;
  color: #1d1d1f;
}

.wsp-empty {
  padding: 28px 16px;
  color: #8e8e93;
  font-size: 13px;
  text-align: center;
}
