.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: var(--min-h-card);
  padding: var(--spacing-2) 0;
  border-bottom: 1px solid var(--color-border);

  &:last-child {
    border-bottom: none;
  }

  label {
    display: flex;
    align-items: center;
    gap: var(--spacing-2-5);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    cursor: pointer;

    &:has(input:disabled) {
      opacity: 0.4;
      cursor: not-allowed;
    }
  }

  input[type="radio"] {
    appearance: none;
    width: var(--size-icon-sm);
    height: var(--size-icon-sm);
    border: 1px solid var(--color-border-hover);
    border-radius: 50%;
    background: var(--color-bg-input);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color var(--duration-fast) ease, opacity var(--duration-fast) ease;

    &:hover:not(:disabled) { border-color: var(--color-text-tertiary); }
    &:checked { border-color: var(--color-text-primary); }

    &:checked::after {
      content: "";
      position: absolute;
      top: 3px;
      left: 3px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--color-text-primary);
    }

    &:disabled {
      cursor: not-allowed;
      opacity: 0.3;
    }
  }
}

.nameBlock {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.name {
  font-weight: var(--font-weight-medium);
}

.desc {
  font-weight: var(--font-weight-normal);
  color: var(--color-text-tertiary);
}

.technicalName {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-tertiary);
}

.downloaded {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  font-size: var(--font-size-sm);
  color: var(--color-success);
  background: var(--color-success-bg-light);
  padding: var(--spacing-0-75) var(--spacing-2-5);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
}

.downloadSection {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--spacing-1);
}

.downloadBtn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1-5);
  padding: var(--spacing-1) var(--spacing-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;

  &:hover:not(:disabled) {
    background: var(--color-bg-hover);
    border-color: var(--color-border-hover);
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

.error {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background: var(--color-error-bg-light);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-2);
}

.errorIcon {
  flex-shrink: 0;
  font-size: var(--font-size-base);
}

.errorText {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  line-height: 1.4;
}

.errorCloseBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size-icon-md);
  height: var(--size-icon-md);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-base);
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  font-size: var(--font-size-xl);
  line-height: 1;
  padding: 0;
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease, border-color var(--duration-fast) ease;

  &:hover {
    color: var(--color-text-primary);
    background: var(--color-error-border);
    border-color: var(--color-error-border);
  }
}

.actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.deleteBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size-icon-lg);
  height: var(--size-icon-lg);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease, border-color var(--duration-fast) ease;

  &:hover {
    color: var(--color-error);
    background: var(--color-error-bg-light);
    border-color: var(--color-error-border);
  }
}

.confirmDeleteBtn {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-0-75) var(--spacing-2-5);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-error);
  background: var(--color-error-bg-light);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) ease;

  &:hover {
    background: var(--color-error-border-hover);
  }
}

.progress {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
  min-width: 180px;
}

.progressInfo {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.progressSize {
  color: var(--color-text-tertiary);
}

.progressBarRow {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.progressBar {
  flex: 1;
  height: 6px;
  background: var(--color-bg-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progressFill {
  height: 100%;
  background: var(--color-text-primary);
  border-radius: var(--radius-sm);
  transition: width var(--duration-base) ease;
}

.cancelBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size-icon-md);
  height: var(--size-icon-md);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-base);
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease, border-color var(--duration-fast) ease;

  &:hover {
    color: var(--color-text-secondary);
    background: var(--color-bg-hover);
    border-color: var(--color-border);
  }
}

.recommendedBadge {
  display: inline-flex;
  align-items: center;
  margin-left: var(--spacing-2);
  padding: var(--spacing-0-75) var(--spacing-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-success);
  background: var(--color-success-bg-light);
  border-radius: var(--radius-full);
}
