/* Selection catalog cards. Card physics lives in shared paper/catalog layers. */

.selection-card {
  width: 100%;
  min-width: var(--vk-card-selection-min-width);
  max-width: var(--vk-card-selection-max-width);
  min-height: 172px;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) 4px;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--vk-radius-shell);
  text-decoration: none;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: var(--vk-card-selection-min-width) 172px;
  will-change: transform, box-shadow;
}

.selection-card:hover {
  text-decoration: none;
}

.selection-card-create {
  grid-template-rows: minmax(0, 1fr);
}

.selection-card-create-surface {
  height: 100%;
}

.selection-card-create-icon {
  color: currentColor;
}

.selection-card-create:hover .selection-card-create-icon {
  color: var(--vk-text-primary);
}

.selection-card-top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
}

.selection-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--vk-form-control-radius);
}

.selection-card-icon .lucide {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.selection-card-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.selection-card-title {
  margin: 0;
  color: var(--vk-text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-card-collection,
.selection-card-description {
  margin: 0;
  color: var(--vk-text-primary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selection-card-description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  align-self: center;
  max-height: 60px;
  min-height: 0;
  white-space: normal;
}

.selection-card-progress-label {
  min-height: 13px;
  color: var(--vk-text-primary);
  opacity: 0.62;
  text-align: center;
  font-size: 11px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.02em;
}

.selection-card-progress {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--vk-progress-track);
  overflow: hidden;
}

.selection-card-progress::before {
  content: "";
  display: block;
  width: var(--selection-card-progress, 0%);
  height: 100%;
  background: var(--vk-progress-viewed);
}
